1
votes

I created a custom content element with a "bodytext" field like this:

bodytext;Text;;richtext:rte_transform[flag=rte_enabled|mode=ts_css],
rte_enabled;LLL:EXT:cms/locallang_ttc.xlf:rte_enabled_formlabel

The text editor doesn't work properly. The links for example are formated like this:

<link 88 - internal-link>test</link>

which doesn't work in the frontend.

RTE is also throwing a lot of info and errors in the backend, here is a screenshot of firebug:

enter image description here

If I use a core content element like "text & media" RTE does work perfectly .. So I guess there is some configuration missing in my extension ?

1

1 Answers

2
votes

How did you set up your custom content element? In which file did you set up your bodytext field shown above?

The link formatting like <link></link> is the normal and correct behavior of the RTE. By this way, links can be rendered dynamically having the pageid saved and they will still work even if the domain or pagetitle of the target page changes - this would not work if links would be saved "hard" like <a href="xy">. However, those link tags have to be rendered using the lib.parseFunc_RTE when outputting the content. For example if you use Fluid for output, just use <f:format.html>{yourBodytextVariable}</f:format.html> and you will get correct links (f:format.html uses lib.parseFunc_RTE by default). Check out your Typoscript Object Browser to find out more about the lib.parseFunc_RTE object and check out this doc: https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Parsefunc/Index.html