[TYPO3-mvc] question about form view helper (potential RTE view helper?)

Nathan Lenz typo3 at k9tfk.com
Tue May 12 17:19:57 CEST 2009


Greetings,
I am playing around with creating a
Tx_Fluid_ViewHelpers_Form_RtetextareaViewHelper class and quickly ran
into a couple problems that I wasn't sure how to solve.

One approach would be to create an instance of tx_rtehtmlarea_pi2 and
make it work.  The problems I ran into is that tx_rtehtmlarea_pi2 needs
the name of the table, field and current row being rendered.  This
doesn't really fit with the new domain driven design principles.

The next approach would be to create something new, extending
tx_rtehtmlarea_base maybe.

This made me ask,..

Is it possible for a form element view helper to modify the onSubmit
attribute of the form it belongs to?

One way would be to use the Rtetextarea View Helper to write javascript
that would use the DOM to insert itself into the onSubmit attribute of
it's parent <form> tag.  This seems like a hack, but it is unobtrusive
and contains the RTE into a single view helper.

It might also be possible to pass in an RTE object of some sort to both
the Form View Helper and the Rtetextarea View Helper(s).

Just some thoughts,
--Nathan


More information about the TYPO3-project-typo3v4mvc mailing list