Typo3 How to render RTE content of an extension


When writing your own Typo3 extension you may come to the day where you need to enter some free HTML content. This content may also include some links. No Problem so far. But if you save the stuff to the db Typo3 transforms the text. For example all a-Tags are written as Test and so on.
So when you like to render the text you need to revert the transformation. (At this point it doesn’t matter if you are using FlexForms or the traditional TCA configuration).
All you need to do is to call this method and everything goes fine:

$outputText=$this->pi_RTEcssText($dbtext);

OR you can below code in ajax file also

$parseFunc = $GLOBALS['TSFE']->tmpl->setup['lib.']['parseFunc_RTE.'];
$str = $this->cObj->parseFunc($rows1['description'],$parseFunc);

If you have any query then feel free to contact me at Jainish Senjaliya

Advertisements

One thought on “Typo3 How to render RTE content of an extension

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s