6 Replies Latest reply on Mar 21, 2007 9:42 PM by xiaocase

    TinyMCE with jsf and ajax4jsf/richfaces

    xiaocase

      When i use TinyMCE with jsf and ajax4jsf/richfaces, the content can't get in managedbean....
      I'm using jsf1.1, facelets1.1.11, ajax4jsf1.1.0,richfaces3.0;
      The xhtml code:


      //<![CDATA[
      tinyMCE.init({
      mode: "textareas",
      theme: "advanced",
      table_inline_editing: true,
      plugins: "contextmenu,table,paste,",
      theme_advanced_statusbar_location: "bottom",
      theme_advanced_resizing: true,
      theme_advanced_resize_horizontal: false,
      theme_advanced_toolbar_location: "top"
      });
      //]]>


      And when i use these codes::
      tinyMCE.init({
      mode: "textareas",
      theme: "advanced",
      table_inline_editing: true,
      editor_selector: "richEditor",
      plugins: "contextmenu,table,paste,",
      theme_advanced_statusbar_location: "bottom",
      theme_advanced_resizing: true,
      theme_advanced_resize_horizontal: false,
      theme_advanced_toolbar_location: "top"
      });

      I just add one row:::editor_selector: "richEditor",
      The tinyMCE can't work....

      Why??
      Please help....

        • 1. Re: TinyMCE with jsf and ajax4jsf/richfaces
          xiaocase

          I'm sorry, losed the xhtml code::




          //<![CDATA[
          tinyMCE.init({
          mode: "textareas",
          theme: "advanced",
          table_inline_editing: true,
          plugins: "contextmenu,table,paste,",
          theme_advanced_statusbar_location: "bottom",
          theme_advanced_resizing: true,
          theme_advanced_resize_horizontal: false,
          theme_advanced_toolbar_location: "top"
          });

          //]]>

          • 2. Re: TinyMCE with jsf and ajax4jsf/richfaces

            It looks like the second post does not contain it also. Use [ code ] in your posts to surround the code to avoid missing something inside it.

            • 3. Re: TinyMCE with jsf and ajax4jsf/richfaces
              xiaocase

              O, I'm sorry,, The codes are:::

              <script type="text/javascript" src="../scripts/tiny_mce/tiny_mce.js"></script>
              
               <script type="text/javascript">
              
               //<![CDATA[
               tinyMCE.init({
               mode: "textareas",
               theme: "advanced",
               table_inline_editing: true,
               plugins: "contextmenu,table,paste,",
               theme_advanced_statusbar_location: "bottom",
               theme_advanced_resizing: true,
               theme_advanced_resize_horizontal: false,
               theme_advanced_toolbar_location: "top"
               });
              
               //]]>
              
               </script>
              
              <h:inputTextarea required="true" id="name" value="#{person.name}" cols="120" rows="15">
               <a4j:support event="onkeyup" reRender="repeater" />
               </h:inputTextarea>
              


              • 4. Re: TinyMCE with jsf and ajax4jsf/richfaces
                xiaocase

                Why this sample can't work???
                Is there any help???
                Thank you

                • 5. Re: TinyMCE with jsf and ajax4jsf/richfaces

                  It cannot work because of nature of the TinyMCE editor.
                  When you apply TinyMCE to one of the textarea, the new iframe is created, but the textarea is accomplished with style="display:none".
                  When user edits the text the iframe is updated, but not the textarea. textarea reminds invisible. You have no chance to do something "onkeyup" attached to the textarea as soon as textarea is not changed during the editing.

                  • 6. Re: TinyMCE with jsf and ajax4jsf/richfaces
                    xiaocase

                    Is there any examples to show how it works with jsf????
                    Thank you very much!!