Recommended Configuration for htmlArea
By: Lucas Thurston
So we’ve configured some superficial aspects of htmlArea. Now it gets trickier, and much more advanced, but may not be something most admins need to configure. What follows is a brief summary of why transformations are necessary. For more information about RTE transformations, go here.
Transformations are necessary because of a simple fact: the output produced and understood by the RTE, and the frontend output that is produced by TYPO3, and the way text content is stored in the database are all unique. Here’s how:
Content stored in the database
Ideally, content in the database is slim, trim, and ready for processing into HTML output. Paragraph tags are few, since a line-break represents a new paragraph and having one would be redundant. Any paragraph tag that has an attribute, however, will be present, since that makes it more unique. Also present in the database are TYPO3’s link tags, which create smart links on the frontend. For instance, a link to page id 50 looks like this in the database: <link 50>Link text</link>. After processed for output, the link is converted into a proper HTML link (including processing into a realURL link if that extension is installed).
Content in the RTE
RTE content is processed to be easily human-readable and editable. This means that frequently you may see b and i tags when viewing the source of a content element in the RTE, but they are transformed into strong and em tags when saved (the more semantic alternatives).
Outputted content
Outputted content should look like, well, like HTML. Preferably XHTML. This transformation is handled by parseFunc. If you don’t know about parseFunc, take a look at the TSREF and the cObj API.
RTE transformations only handle the back-and-forth between the 1st and 2nd formats. From “RTE.default.proc” on in our htmlArea configuration we’ve got a transformation configuration to be applied when data is moved from the database to the RTE. The “RTE.default.proc.entryHTMLparser_db” transforms content going from RTE to the database.
Posted on Wednesday, May 10, 2006 at 11:54 AM.