[TYPO3] RTE backend parser not allowing "font" tags

James Corell jcorell at e-p-c-s.com
Wed Feb 14 22:45:47 CET 2007


Hi!

I'm still struggling to understand the RTE and the content parser. I've
managed to restrict the RTE to the "p" and "blockquote" tags, the classes I
want, and kept the "align" and "class" vars.

Now I need to add the font size and font color features from the RTE. But,
the RTE uses the "font" tag, which causes two problems:

1) "font" tags aren't CSS compliant, and I'd rather use "span style=" tags.
2) "font" tags are being stripped out by the parser, and I can't figure out
how to stop it.

Any ideas? My page TS is listed below.

-------------------------
James Corell
EPCS, 111 W. Mitchell St. Suite E, Gaylord, MI 49735
DSL for Businesses - Websites That Work!
jcorell at e-p-c-s.com www.e-p-c-s.com
989-732-1366 (fax 989-732-0893)

---PageTS begins here---

RTE.classes {
  bodytext {
    name = Body Text
    value = font-family: Verdana; font-size: 10pt;
    }
  HD {
    name = Orange Header
    value = font-family: Verdana; font-size: 12pt; color: #FF9900;
font-weight: bold;
    }
  }
RTE.default {
  disabled = 0
  contentCSS = fileadmin/template/rte.css
  useCSS = 1
  enableWordClean = 1
  disableEnterParagraphs = 0
  showButtons = fontsize, textcolor, blockstylelabel, blockstyle,
textstylelabel, textstyle, format block, cut, copy, paste, bold, italic,
underline, left, center, right, orderedlist, unorderedlist, outdent, indent,
link, image, line, user, chMode
  hideButtons = table, emoticon, fontstyle, bgcolor, class
  hidePStyleItems = H1,H2,H3,H4,H5,H6,PRE
  classesParagraph = bodytext, HD
  classesCharacter = bodytext, HD
  showTagFreeClasses = 1
  }
RTE.config.tt_content.bodytext.proc {
  allowedClasses = bodytext, HD
  allowedTags = p, blockquote, font
  }
RTE.default.proc {
  keepPDIVattribs = align,style,class
  entryHTMLparser_db.tags {
  div.fixAttrib.style.unset >
  div.fixAttrib.align.unset >
  div.fixAttrib.class.unset >
  span.fixAttrib.style.unset >
  span.fixAttrib.align.unset >
  span.fixAttrib.class.unset >
  p.fixAttrib.style.unset >
  p.fixAttrib.align.unset >
  p.fixAttrib.class.unset >
  font.fixAttrib.style.unset >
  font.fixAttrib.align.unset >
  font.fixAttrib.class.unset >
}




More information about the TYPO3-english mailing list