Its in the wiki.  Pretty simple, actually...

http://wiki.apache.org/myfaces/WYSIWYG_Editor

Just add the tiny mce code to your webapp, then on the page add the '
tinyMCE.init' function.  It wraps itself onto standard textarea's.


On 12/8/06, Alin Dosoniu <[EMAIL PROTECTED]> wrote:

 Hi,

I have a similar problem but using t:inputHtml control. When it is used
with ajax4jsf it does not work... the value from bean is not shown in the
control and if editing something into it and submit, the value does not get
to server.
Is there a tiny mce control in myfaces? Where can I find this control?
I will try to find such a triggerSave method for t:inputHtml.

Alin.

After you email I tried posting to ajax4jsf.  I'm not sure if it went
through.

However, I dug around the code for tinymce and figured out a way to do it,
which I'll share in case anybody has the same issue.

I figured the reason was that tinymce isn't actually modifying the
textarea's data when you edit it and might be attaching something to the
form's onsubmit event to save the value.  I'm not 100% of the mechanism, but
it appears to be something like that.

I added the following the ajax4jsf command button...

onclick="tinyMCE.triggerSave()"

This appears to save the formatted value to the textarea, which is then
sent to server.  Now the formatted text shows up.

In case anybody with tinymce experience knows what triggerSave does, and
its a bad thing, please let me know.

-Kevin


Reply via email to