5 Replies Latest reply on May 29, 2008 10:49 AM by starf666

    Rich Text Editor

    starf666

      Hello,

      I know there has been some discussion about such a feature but as far as I can see there is no Rcihfaces implementation of it yet. I experimented with the editor form the dojo toolkit but as the generated text cannot be binded to a component on a backing bean, getting text in and out of the editor is quite a pita. I want to edit text that is stored in the DB and will be displayed on the web site later. Are there any recommendations on how to that until Richfaces will implement such a feature (which is planned afaik).

      Regards,
      Martin

        • 1. Re: Rich Text Editor
          eklam

          You can use, fckeditor:

          www.fckeditor.net

          I used it, and it was way to easy... you include the package in your root web app, and define in you page:

           <script type="text/javascript">
           window.onload = function()
           {
           var oFCKeditor = new FCKeditor( 'formID:xxx:yyy:yourTextAreaId' ) ;
           oFCKeditor.BasePath = "/fckeditor/" ;
           oFCKeditor.ReplaceTextarea() ;
           }
           </script>


          PS: You not even need the "FCKEditor Java package"

          • 2. Re: Rich Text Editor
            ilya_shaikovsky

            rich:editor plammed to be implemented in 3.3.0

            • 3. Re: Rich Text Editor
              fabmars

              As far as I know, it's planned by the RF guys: http://wiki.jboss.org/auth/wiki/RichFacesWhatIsNewIn3_3_0
              http://jboss.com/index.html?module=bb&op=viewtopic&t=133022

              I have a strong requirement for this feature on my project as well, and in order to have something working until RF3.3 is out, I made some JSF component based on FCKeditor. Really not perfect but far enough for my needs. There was a story about this here: http://jboss.com/index.html?module=bb&op=viewtopic&t=134642

              There is also a sourceforge project with a JSF component for FCKeditor, but I didn't use it, I don't remember why (probably some integration issue with RF): http://sourceforge.net/projects/fck-faces/

              Another thing else I'm counting on a lot: https://scales.dev.java.net/
              It has a Rich text editor, which is very cool, but the integration with RF is still hazardous. If you check issue nr.1 there, that I issued months ago, you'll see it was updated THIS morning and jdlee is going to put the priority on improving integration of these components with 3rd party frameworks.

              One advice though: whatever you choose, if your JSF implementation is the RI, make sure to use the 1.2.09 beta 1, the previous ones had a bug with long strings (issue 717)... https://javaserverfaces.dev.java.net/

              • 4. Re: Rich Text Editor
                starf666

                Thanks for the input so far. I managed to implement the Apache Tomahawk library which provides an implementation of the Kupu RIch Text Editor. It works fine so far in the Eclipse browser as well as in IE but Firefox gives me an annoying message where it tells me that some prefix is not know. I might check your custom JSF component, as any plain js-variant won't do.

                • 5. Re: Rich Text Editor
                  starf666

                  If anybody is interested in a workaround until Rich Faces Editor is released: Integrating Tomahawk and the Kupu Editor worked finally even with Firefox. But I had to modify one class of the Tomahawk source code to make it work. Seems they forgot to declare a namespace for a few tags in the renderer class of the inputHTML element. If anybody is interested I will mail the modified tomahawk.jar.