3 Replies Latest reply on Sep 20, 2007 9:03 AM by Bieth Bruno

    Rich Text Editor

    Hannes Schulz Newbie


      does anyone know a rich text editor that can be used with sun jsf 1.2? I found FCK Faces but it only works with myfaces.

      Any hints would be great.


        • 1. Re: Rich Text Editor
          Bieth Bruno Newbie


          I've something working fine with TinyMCE.
          There's post about how to use it with ajax : http://www.jboss.com/index.html?module=bb&op=viewtopic&t=109794

          This is how I use it (with ajax re-rendering):
          - copy the tinymce scripts into your project
          - add this script (init-tiny.js) :

           theme : "advanced",
           theme_advanced_toolbar_location : "top",
           theme_advanced_statusbar_location : "bottom",
           theme_advanced_toolbar_align : "left",
           // everything on the first line
           theme_advanced_buttons1 : "bold,italic,underline,justifyleft,justifycenter,justifyright ,fontselect,fontsizeselect,forecolor,backcolor",
           theme_advanced_buttons2 : "",
           theme_advanced_buttons3 : "",
           theme_advanced_resize_horizontal : false,
           theme_advanced_resizing : true,
           convert_newlines_to_brs : true
          function updateValue(control)
           var textareas = document.getElementsByTagName('textarea');
           for( i = 0; i < textareas.length; i ++ ) {
           if( textareas[ i ].id == control ) {
           textareas[ i ].value = tinyMCE.getContent(control);
          function addMCE(control) {
           tinyMCE.execCommand('mceAddControl', false, control);
           tinyMCE.switchClassCache = [];
          function cleanMCE() {
           tinyMCE.idCounter = 0;
           tinyMCE.instances = new Array();

          - to add the editor, add this attribute to your ajax tag :
          oncomplete="addMCE( 'yourFormComponentId:yourTxtAreaComponentId' );"

          - to remove the editor, add this attribute to your ajax tag :

          - add this attribute to your form tag (otherwise the textarea value is not updated) :

          PS: You should post this on the richfaces forum.

          • 2. Re: Rich Text Editor
            Hannes Schulz Newbie

            thanks for your fast response.

            is it possible to confgure the resource path and upload images with this editor?


            • 3. Re: Rich Text Editor
              Bieth Bruno Newbie

              donno, I haven't used it with resources