You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Kevin Galligan <kg...@gmail.com> on 2006/12/07 21:50:29 UTC

tiny mce and ajax4jsf

I'm using facelets and myfaces (1.1.5-SNAPSHOT).  I use the tiny mce editor
for formatted text.  Recently I tried adding ajax4jsf to certain pages.
This works great for plain textareas, but when the text area is a tiny mce
one, it doesn't work.

I know this is pretty specific, but I'm hoping somebody tried the same and
can get it to work.  Its not absolutely required, but I'd like to have the
formatted text and the ajax.

Thanks in advance,
-kevin

Re: tiny mce and ajax4jsf

Posted by Alin Dosoniu <ad...@hotmail.com>.
Kevin,

Thank you, I will try to use it.

Alin.
  ----- Original Message ----- 
  From: Kevin Galligan 
  To: MyFaces Discussion 
  Sent: Friday, December 08, 2006 4:29 PM
  Subject: Re: tiny mce and ajax4jsf

  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.

Re: tiny mce and ajax4jsf

Posted by Kevin Galligan <kg...@gmail.com>.
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 <ad...@hotmail.com> 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
>
>

Re: tiny mce and ajax4jsf

Posted by Alin Dosoniu <ad...@hotmail.com>.
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

Re: tiny mce and ajax4jsf

Posted by Kevin Galligan <kg...@gmail.com>.
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

On 12/7/06, Jeff Bischoff <jb...@klkurz.com> wrote:
>
> Kevin,
>
> You might try asking this on the Ajax4jsf mailing list or the tinymce
> forum... unless you already sent it to the ajax list, and I just haven't
> gotten it yet? :)
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Kevin Galligan wrote:
> > I'm using facelets and myfaces (1.1.5-SNAPSHOT).  I use the tiny mce
> editor
> > for formatted text.  Recently I tried adding ajax4jsf to certain pages.
> > This works great for plain textareas, but when the text area is a tiny
> mce
> > one, it doesn't work.
> >
> > I know this is pretty specific, but I'm hoping somebody tried the same
> and
> > can get it to work.  Its not absolutely required, but I'd like to have
> the
> > formatted text and the ajax.
> >
> > Thanks in advance,
> > -kevin
> >
>
>
>

Re: tiny mce and ajax4jsf

Posted by Jeff Bischoff <jb...@klkurz.com>.
Kevin,

You might try asking this on the Ajax4jsf mailing list or the tinymce 
forum... unless you already sent it to the ajax list, and I just haven't 
gotten it yet? :)

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Kevin Galligan wrote:
> I'm using facelets and myfaces (1.1.5-SNAPSHOT).  I use the tiny mce editor
> for formatted text.  Recently I tried adding ajax4jsf to certain pages.
> This works great for plain textareas, but when the text area is a tiny mce
> one, it doesn't work.
> 
> I know this is pretty specific, but I'm hoping somebody tried the same and
> can get it to work.  Its not absolutely required, but I'd like to have the
> formatted text and the ajax.
> 
> Thanks in advance,
> -kevin
>