[TYPO3-rte] When and how I have to use HTMLparser_db/rte
Stanislas Rolland
typo3 at sjbr.ca
Thu Nov 26 07:19:26 CET 2009
Hi Stefan,
>
> I just whant to write a german documentation about RTE. Now I have some
> problems in understanding HTMLparser_db/rte. Notice: I have no problems
> with entry/exitHTMLparser! They work as expected.
>
> But when I type something like this, it will not work:
>
> HTMLparser_db.tags.h1.fixAttrib.class.set = changed
>
> In my RTE stands (chMode):
>
> <h1 class="unchanged">TestTestTest</h1>
>
> Here is my hole TSconfig:
>
> RTE.classes >
> RTE.classesAnchor >
> RTE.default >
>
> RTE.default {
> overruleMode = ts_css
> showButtons = bold, italic, chMode
> proc {
> HTMLparser_db.tags.h1.fixAttrib.class.set = changed
> }
> }
Make sure that class "changed" is allowed by property:
RTE.default.proc.allowedClasses
>
> I thought there is a mistake, but there is no error, because this works:
>
> RTE.classes >
> RTE.classesAnchor >
> RTE.default >
>
> RTE.default {
> overruleMode = ts_css
> showButtons = bold, italic, chMode
> proc {
> HTMLparser_db.tags.b.remap = i
> }
> }
>
> and this one don't works:
>
> RTE.classes >
> RTE.classesAnchor >
> RTE.default >
>
> RTE.default {
> overruleMode = ts_css
> showButtons = bold, italic, chMode
> proc {
> HTMLparser_db.tags.h1.remap = h2
> }
> }
See this page:
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/5/2/#id4510827
Note that there is a default value for RTE.default.proc.allowTags that
includes neither tag h1, nor tag h2 (while tags i and b are both in the
default list).
See also tha comments on the recommended value for this property on this
page:
http://typo3.org/documentation/document-library/extension-manuals/rtehtmlarea_manual/1.7.4/view/5/1/
Regards,
Stanislas
More information about the TYPO3-project-rte
mailing list