With the attached RteViewHelper.php (Tx_Fluid_ViewHelpers_Form_RteViewHelper) it is possible to render a form field with the rtehtmlarea.
Due to the fact that rtehtmlarea needs to make some modifications to the form tag (attribute "onsubmit") and adds some js before and beyond the form, it is necessary to modify the FormViewhelper.php (see attached patch_FormViewHelper.diff based on FormViewHelper.php in https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/fluid/trunk/ Revision 2522).
With this modifications the FormViewHelper gets the needed JS for all Rte form fields from the viewHelperVariableContainer which is filled in by the RteViewHelper and adds this to the returned content.
I'm working with extbase/fluid just since two weeks. So I hope my suggestion matches your coding guidelines. If not, please tell me, what could be better.
I didn't attach now files for v5. If you are interested i can do that later.
In conjunction with extensions based an extbase / fluid the RTE produces tags with ID's which are not valid:
<div id="pleasewaittx_meyxt_pi1[myobject][myfield] ...
<div id="editorWraptx_meyxt_pi1[myobject][myfield] ...
<textarea id="RTEareatx_meyxt_pi1[myobject][myfield] ...
The W3C Markup Validator says:
character "[" is not allowed in the value of attribute "id"
This happens in backend and frontend.
I reported this already to the bugtracker: http://bugs.typo3.org/view.php?id=15326
Updated by Frank Frewer about 11 years ago
- File RteViewHelper.php RteViewHelper.php added
- File RteConfiguration.php RteConfiguration.php added
- File ScriptViewHelper.php ScriptViewHelper.php added
according to the feedback you gave me in the newslist (http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-August/006220.html et al.) I modified the coding.
And, of course, this VH could be used by other VH too.
Additionally I wrote a intermediate class Tx_Fluid_Classes_Core_ViewHelper_RteConfiguration.
Updated by Jonas Götze about 11 years ago
It seems that there has been a change in current Fluid trunk which leads to an error with this wonderful view Helper.
The key of the formname in the viewHelperVariableContainer has to be 'formObjectName' instead of 'formName' (see RteViewHelper.php on line 95).