Zum Inhalt springen

FONT TAG wird nicht mitgespeichert

Erstellt am 28. Januar 2009 · 2 Antworten · letzte Antwort am 19. Februar 2009

Tags: Frage

Floater ·

Hallo,

ich habe ein Problem, dass die Font-tags nicht mitgespeichert werden.

Für meinen RTE hatte ich konfiguriert, dass die Schriftgrößen auswählbar sind. das funktioniert auch.

Jedoch werden die Font-Tags nicht mitgespeichert.
Woran kann das liegen?

Besteht ausserdem die Möglichkeit eigene Schriftgrößen, bzw. entsprechende css-Klassen anzubieten, die keinen font-Tag nutzen?

Hier mal mein ROOT-Level-TS:

### CONFIG RTE
## DEFINE OWN COLORS
	RTE.colors {
		 farblos {
			name = (Farbe entfernen)
			value =
		 }
	    f1 {
	      name = schwarz
	      value = #000000
	    }
	    f2 {
	      name = rot
	      value = #E3001B
	    }
	    f3 {
	      name = gelb
	      value = #FFCC01
	    }
	    f4 {
	      name = gruen
	      value = #2F552F
	    }
	    f5 {
	      name = grau
	      value = #DDDDDD
	    }
	    f6 {
	      name = weiss
	      value = #FFFFFF
	    }		  	 	    
	    
	}	
## END DEFINE OWN COLORS

## DEFINE READABLE NAMES FOR STYLE CLASSES

	## CLASSES DEFINED IN CSS-FILE (RTE.default.contentCSS = xxx.css)
	  RTE.classes {
	  		 zitat {
	  		 	name = Zitat-Text
	  		 }	  
		    rahmenSchwarz  {
		      name = Rahmen Schwarz
		    }
		    rahmenRot  {
		      name = Rahmen Rot
		    }		 
		    rahmenGelb  {
		      name = Rahmen Gelb
		    }	
		    rahmenGruen  {
		      name = Rahmen Gruen
		    }	   
		    rahmenGrau  {
		      name = Rahmen Grau
		    }
		    rahmenWeiss  {
		      name = Rahmen Wei?
		    }	    
		    
			code {
				name = Quelltext
				value = font-family:"Lucida Console","Courier New",Courier,monospace; font-size:9px; background-color:##c0c0c0
			}
			noFormat {
				name = (entfernt alle HTML formatierungen)
				value =
			}
	  }
	  
## END DEFINE READABLE NAMES FOR STYLE CLASSES

## STANDARD SETTINGS FOR htmlArea PART 1

RTE.default {

	## DECLARE OWN COLORS
		colors = f1, f2, f3, f4, f5, f6, farblos
	## SWITCH OFF STANDARD COLORS
    	disableColorPicker = 1
		
	## ???
		classesLinks = header
		## Standardschriftformatierungen
		mainStyle_font = Arial
		mainStyle_size = 9pt
	
	## USER DEFINED ELEMENTS
		userElements {
			10 = Juristische Zeichen
			10.1 = ?
			10.1.description = Registered Trademark
			10.1.content = ®
			10.2 = ?
			10.2.description = Copyright
			10.2.content = ©
			10.3 = (TM)
			10.3.description = Trademark
			10.3.content = ™
			
			20 = Pfeile
			20.1 = <--
			20.1.description = Pfeil nach links
			20.1.content = &larr;
			20.2 = <==
			20.2.description = Doppelpfeil nach links
			20.2.content = &lArr;
			20.3 = -->
			20.3.description = Pfeil nach rechts
			20.3.content = &rarr;
			20.4 = ==>
			20.4.description = Doppelpfeil nach rechts
			20.4.content = &rArr;
		}
		## END USER DEFINED ELEMENTS
	}

#############

## STANDARD SETTINGS FOR htmlArea PART 2

	RTE.default {
	
		## DECLARE CSS-FILE FOR RTE-CLASSES
			contentCSS = fileadmin/templates/css/RTE.css
		## USE ALSO TAGS THAT ARE NOT DEFINED IN THIS CSS-FILE BUT IN THIS CONFIG, TOO
    		showTagFreeClasses = 1
			
		## NUR DIESE KLASSEN ERLAUBEN
	    ## HTMLAREA-CONTENT-BODY WIRD GEBRAUCHT, DAMIT DER RTE
	    ## SELBER ANGEPASST WERDEN KANN (SIEHE OBEN IN DER CSS-DATEI)
	    	proc.allowedClasses = (htmlarea-content-body, component-items, zitat, rahmenSchwarz, rahmenRot, rahmenGelb, rahmenGruen, rahmenGrau, rahmenWeisss)
	    
	    ## DER TEXT-DROPDOWNLISTE WEITERE EIGENE KLASSEN ZUWEISEN
	    	classesCharacter := addToList(zitat)
	    
	    ## DER ABSATZ-DROPDOWNLISTE NUR DIESE KLASSEN ERLAUBEN
	    	classesParagraph = (zitat, rahmenSchwarz, rahmenRot, rahmenGelb, rahmenGruen, rahmenGrau, rahmenWeiss)
	    
	    ## ZELLENFORMATIERUNG ERM?GLICHEN MIT DER KLASSE HELL
	    	classesTD = (hell)
			
		## RTE BEARBEITUNGSMENUES KONFIGURIEREN
			## NECESSARY TO SHOW TABLES	??
		 		proc.preserveTables = 1
			
			## HIDE SPECIAL PARAGRAPH TAGS (H1,H2,H3,H4,H5,H6,PRE,ADDRESS)
				hidePStyleItems = H4,H5,H6,PRE,ADDRESS
			
			## DEFINE IMAGE CLASS??
				classesImage = contentImage
			
			## HIDE SPECIAL FONT TYPES
				hideFontFaces = 2,5,6,7,8,9
			## HIDE SPECIAL FONT SIZES
				# hideFontSizes = 1,2,3
				hideFontSizes = 4,5,6,7
		
		## FORMAT SETTINGS (Initialisierung)
			enableWordClean = 1
			removeTrailingBR = 1
			removeComments = 1
			removeTags >
			removeTagsAndContents >
			
		## DEFINE MENUE TOOLBAR IN RTE			
			## SHOW THESE BUTTONS
				#hideButtons >
		 		showButtons = bgcolor, bgcolor, blockstyle, blockstylelabel, bold, celldelete, cellinsertafter, cellinsertbefore, cellmerge, cellproperties, cellsplit, chMode, columndelete, columninsertafter, columninsertbefore, columnsplit, findreplace, fontsize, formatblock, formatblocklabel, indent, insertcharacter, italic, line, link, orderedlist, redo, removeformat, rowdelete, rowinsertabove, rowinsertunder, rowsplit, showhelp, spellcheck, strikethrough, subscript, superscript, table, tableproperties, textcolor, textcolor, textstyle, textstylelabel, toggleborders, underline, undo, unorderedlist, left, right, center
	    
	    	## HIDE THESE BUTTONS
				#showButtons = *
				#hideButtons = about, acronym, copy, cut, emoticon, fontsize, fontstyle, image, inserttag, justifyfull, lefttoright, outdent, paste, righttoleft, rowproperties, textindicator, textstyle, user
				hideButtons = about, acronym, copy, cut, emoticon, fontstyle, image, inserttag, justifyfull, lefttoright, outdent, paste, righttoleft, rowproperties, textindicator, textstyle, user
			
	## Hier wird der RTE direkt angesprochen
		proc {
			## Formatierungseinstellungen (Initialisierung)
				denyTags >
				allowTags >
				#allowTags = table, tbody, tr, th, td, h1, h2, h3, h4, h5, h6, div, p, br, span, ul, ol, li, re, blockquote, strong, em, b, i, u, sub, sup, strike, a, img, nobr, hr, tt, q, cite, abbr, acronym, center, font, img
				allowTags = table, tbody, thead, tr, th, td, h1, h2, h3, h4, h5, h6, div, p, br, span, ul, ol, li, re, blockquote, strong, em, b, i, u, sub, sup, strike, a, img, nobr, hr, tt, q, cite, abbr, acronym, center, font, img
				allowTagsInTypolists >
				# allowTagsInTypolists = table, tbody, tr, th, td, h1, h2, h3, h4, h5, h6, div, p, br, span, ul, ol, li, re, blockquote, strong, em, b, i, u, sub, sup, strike, a, img, nobr, hr, tt, q, cite, abbr, acronym, center, font, img
				allowTagsInTypolists = table, tbody, thead, tr, th, td, h1, h2, h3, h4, h5, h6, div, p, br, span, ul, ol, li, re, blockquote, strong, em, b, i, u, sub, sup, strike, a, img, nobr, hr, tt, q, cite, abbr, acronym, center, font, img
			
			## DONT CONVERT <br> TO <p> 
				dontConvBRtoParagraph = 1
				
			## TAGS ALLOWED OUTSIDE OF <p> AND <div> 
				allowTagsQutside >
				allowTagsOutside = img, hr, span
				
			## HTML-PARSER SETTINGS
				HTMLparser_rte {
					## FORBIDDEN/ALLOWED TAGS
						denyTags >
						allowTags >
						allowTags < RTE.default.proc.allowTags
					## REMOVES HTML-COMMENTS
						removeComments = 1
	
					## Tags die nicht ?bereinstimmen werden nicht entfernt (protect / 1 / 0)
						keepNonMatchedTags = protect
				}
				
			## CONNECTION TO DATABASE
				entryHTMLparser_db = 1
				entryHTMLparser_db {
				
					## FORBIDDEN/ALLOWED TAGS
						removeTags >
						denyTags >
						allowTags >
						allowTags < RTE.default.proc.allowTags
					
					## TAGS WITHOUT ATTRIBUTES
						noAttrib = b, i, u, strike, sub, sup, strong, em, quote, blockquote, cite, tt, br, center
						rmTagIfNoAttrib = div
						htmlSpecialChars = 0
					
					## SETTINGS FOR SPECIAL TAGS
						tags {
							img >
							#font >
							#font.allowedAttribs = style, color, size, text
							span >
							span.allowedAttribs > style
								
							
							table >
							table.allowedAttribs = cellpadding, cellspacing, style, class, width
							table.fixAttrib.cellspacing.set = 0
							table.fixAttrib.cellpadding.set = 0
							# table.fixAttrib.width.set = 100%
							# table.fixAttrib.class.set = htmlarea-showtableborders
						}
				}
		}
	}

## ????	
	RTE.default.FE < RTE.default
	
## DEFINE THIS SO COLORED TEXT CAN BE STORED
	RTE.default {
    	proc.entryHTMLparser_db.tags.span.fixAttrib.style.unset >
   		#proc.entryHTMLparser_db.removeTags := removeFromList(font)
    	#removeTags := removeFromList(font)
    	proc.entryHTMLparser_db.tags.font.allowedAttribs = color
	}
	
## DEFINE LINK HANDLING IN RTE
	## SO NO LINK-IMAGES ARE INSERTET
	RTE.classesAnchor {
        internalLink {
                class >
                type = page
                image >
                titleText >               
        }
        externalLink {
                class >
                type = url
                image > 
                titleText >
        }
        externalLinkInNewWindow {
                class >
                type = url
                image >
                titleText >
        }
        internalLinkInNewWindow {
                class >
                type = page
                image >
                titleText >
        }
        download {
                class >
                type = file
                image >
                titleText >
        }
        mail {
                class >
                type = mail
                image >
                titleText >
        }
}
	
### END CONFIG RTE


### CONFIG FOR USING ALIGN BUTTONS (ACTIVEATED IN showButtons)

RTE.default {
        # Der RTE soll CSS verwenden.
        # Funktioniert im Firefox;
        # im IE nicht unterst?tzt...
        #useCSS = 1

        # Zum Positionieren n?tig.
        tags.p.allowedAttribs = style,class,align
}


### ?bernahme in die Datenbank / den Quellcode ###
# Mit <p align="..."> wird Text im IE mittig oder rechts gesetzt.
# Ab typo3 4.2: <p style="text-align: right;">

### RTE.default.proc
### Transformation zwischen RTE-Feld und Datenbank ###
RTE.default.proc {
        # class wird f?r die Ausrichtung
        # links, zentriert, rechts verwendet.
        keepPDIVattribs = style,class,align

        HTMLparser_rte {
                allowTags < RTE.default.proc.allowTags
        }

        ### Speichere in Datenbank - Inhalt in die Datenbank
        entryHTMLparser_db.tags {
                p.fixAttrib.align.unset >
                div.fixAttrib.align.unset >

                # zur Ausrichtung von Abs?tzen
                p.allowedAttribs = class,style,align
        }
}

### END CONFIG FOR USING ALIGN BUTTONS


TCEMAIN.clearCacheCmd = all 
#Dies bewirkt das der FE Cache aller Seiten geleert wird wenn auf irgendeiner Seite eine Änderung stattgefunden hat.

Danke und viele Grüße,
Floater

DarkNemesis ·

Einen Tipp nicht, aber das gleiche Problem 🙁 Es reicht schon das ich nach der Auswahl, der Farbe in die Code ansicht wechsel, da ist nichts zu sehen was die Farbe auch nur ansatzweise ändern würde.

Hier meine TSConfig.

RTE.default {
  contentCSS=fileadmin/includes/rte.css
  showButtons = *
  hideButtons = strikethrough, lefttoright, righttoleft, spellcheck, fontstyle, fontsize, showhelp
  keepButtonGroupTogether = 1
}

RTE.config.tt_content.bodytext.proc.allowedClasses = smalltext,bluebox,box,code,mono,file,directory
RTE.config.tt_news.bodytext.proc.allowedClasses = smalltext,bluebox,box,code,mono,file,directory
RTE.fonts {
  face1 {
    name = Verdana
    value = verdana,helvetica,sans-serif
  }
  face2 {
    name = Verdana
    value = verdana,helvetica,sans-serif
  }
  face3 {
    name = Verdana
    value = verdana,helvetica,sans-serif
  }
  face4 {
    name = Verdana
    value = verdana,helvetica,sans-serif
  }
}
RTE.default.fontFace = face1, face2, face3, face4

RTE.colors {
  color1 {
    name = Text - Rot
    value = #990000
  }
  color2 {
    name = Text - Blau
    value = #000099
  }
  color3 {
    name = Text - Gruen
    value = #009900
  }
  color4 {
    name = Text - Grau
    value = #666666
  }
}
RTE.default.colors = color1, color2, color3, color4