<p>I'm currently writing a TYPO3 extension which is configured with a list of <code>tt_content</code> UID's.
These point to content elements of type "text" and i want to render them by my extension.</p>

<p>Because of TYPO3s special way of transforming the text you enter in the rich text editing when it enters the database, and again transforming it when it is rendered to the frontend, i can not just output the database contents of the <code>bodytext</code> field.</p>

<p>I want to render these texts as they would usually get rendered by TYPO3.
How do I do that? </p>

[{'answer_id': 71272, 'author': 'Jan Hančič', 'author_id': 185527, 'author_profile': 'https://Stackoverflow.com/users/185527', 'pm_score': 4, 'selected': True, 'text': "<p>I had the same problem a couple of months ago. Now I must say that I am no typo3 developer, so I don't know if this is the right solution.</p>\n\n<p>But I used something like this:</p>\n\n<p><code>$output .= $this-&gt;pi_RTEcssText( $contentFromDb );</code></p>\n\n<p>in my extension and it works.</p>\n"}, {'answer_id': 2592788, 'author': 'cweiske', 'author_id': 282601, 'author_profile': 'https://Stackoverflow.com/users/282601', 'pm_score': 3, 'selected': False, 'text': '<h2>PHP</h2>\n\n<p>That works for me; it renders any content element with the given ID:</p>\n\n<pre><code>function getCE($id)\n{\n    $conf[\'tables\'] = \'tt_content\';\n    $conf[\'source\'] = $id;\n    $conf[\'dontCheckPid\'] = 1;\n    return $GLOBALS[\'TSFE\']-&gt;cObj-&gt;cObjGetSingle(\'RECORDS\', $conf);\n}\n</code></pre>\n\n<p>See <a href="http://lists.typo3.org/pipermail/typo3-dev/2007-May/023467.html" rel="nofollow noreferrer">http://lists.typo3.org/pipermail/typo3-dev/2007-May/023467.html</a></p>\n\n<p>This does work for non-cached plugins, too. You will get a string like <code>&lt;!--INT_SCRIPT.0f1c1787dc3f62e40f944b93a2ad6a81--&gt;</code>, but TYPO3 will replace that on the next INT rendering pass with the real content.</p>\n\n<h2>Fluid</h2>\n\n<p>If you\'re in a fluid template, the <a href="https://fluidtypo3.org/viewhelpers/vhs/master/Content/RenderViewHelper.html" rel="nofollow noreferrer">VHS <code>content.render</code> view helper</a> is useful:</p>\n\n<pre><code>&lt;v:content.render contentUids="{0: textelementid}"/&gt;\n</code></pre>\n\n<p>If your fluidcontent element has a grid itself, you can render the elements with flux\' own <code>content.get</code> or <code>content.render</code> view helper:</p>\n\n<pre><code>&lt;f:section name="Configuration&gt;\n    ... &lt;flux:grid.column name="teaser"/&gt; ...\n&lt;/f:section&gt;\n&lt;f:section name="Main&gt;\n    &lt;flux:content.render area="teaser"/&gt;\n&lt;f:section&gt;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/71223', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4186/']