5 Replies Latest reply on Oct 26, 2007 12:37 PM by Bas van den Berg

    Seam 1.2.1, AS 4.2.0 and TinyMCE

    Phil Haigh Novice

      Hi all

      "rlhr" wrote:
      Two things that are broken moving to JBoss AS 4.2 CR1 (This is not due to JBoss or Seam, but from switching from MyFaces the Sun JSF implementation)

      - TinyMCE: the content of the textarea is not saved. I have to investigate was going on there.




      Does anyone have a solution for this?

      cheers

      phil

        • 1. Re: Seam 1.2.1, AS 4.2.0 and TinyMCE
          Darryl Smith Newbie

           

          "pdhaigh" wrote:
          Hi all

          "rlhr" wrote:
          Two things that are broken moving to JBoss AS 4.2 CR1 (This is not due to JBoss or Seam, but from switching from MyFaces the Sun JSF implementation)

          - TinyMCE: the content of the textarea is not saved. I have to investigate was going on there.




          Does anyone have a solution for this?

          cheers

          phil


          var jobDescription = document.getElementById('modifyVacancyForm:jobDescription');
          jobDescription.value = tinyMCE.getContent('modifyVacancyForm:jobDescription');
          


          • 2. Re: Seam 1.2.1, AS 4.2.0 and TinyMCE
            Phil Haigh Novice

            Excellent, thanks! :-)

            Just in case anyone elses javascript is as weak as mine:

            function updateValue()
             {
             var textValue = document.getElementById('webpageForm:mainText');
             textValue.value = tinyMCE.getContent('webpageForm:mainText');
             }



            <h:form id="webpageForm" onsubmit="updateValue();">
             <h:inputTextarea id="mainText" value="#{webpage.text}" rows="10" cols="40"/>
            
            


            Is there a plan to resolve this issue, and negate the need for this workaround?

            • 3. Re: Seam 1.2.1, AS 4.2.0 and TinyMCE
              Phil Haigh Novice

              I'm guessing that's a no? This is actually quite a pain - because you can't use the work around in a multipart form.

              • 4. Re: Seam 1.2.1, AS 4.2.0 and TinyMCE
                Phil Haigh Novice

                I've since discovered that you also can't use the above workaround with tinymce mode set to

                mode : "exact"


                But, it seems there is a superior work around.. still a bit of a pain, but it works.

                Call the following on submitting the form.

                function updateValue()
                {
                 tinyMCE.execCommand('mceRemoveControl', false, 'idofmyeditorregion');
                }


                • 5. Re: Seam 1.2.1, AS 4.2.0 and TinyMCE
                  Bas van den Berg Newbie

                  Thanks for the post!

                  I had to make a small modification.


                  textValue.value =tinyMCE.getContent();


                  I'm using Seam 2.0

                  the 'superior' workaround did not work for me.