1 Reply Latest reply on Oct 2, 2009 5:15 AM by juangon

    rich:editor auto resize to container

    juangon

      I have been searching for a while the possibility of resizing the rich:editor to a container width and/or heiight without sucess.

      In tinymce there is a way to make the editor adjustable to the container like this: http://tinymce.moxiecode.com/examples/example_14.php.

      As you can see in the URL above, there are some properties where you can select a mode (mode: textareas) and specify the textareas you want to apply those properties (editor_selector : "mceEditor").

      With this properties set, you can make all the textareas you want with that css class and then you can put any style you want (in my case with:100%).

      In rich:editor this is not possible because a textarea es created with a custom textarea class and id.

      Please, are there any workaround to set the rich:editor width in percentage?

      Thanks!

        • 1. Re: rich:editor auto resize to container
          juangon

          Today I am having extra inspiration and could solve this very big problem.

          I solved changing the tiny_mce css property in my custom css webapp file:

          .mceLayout{
           width:100% !important;
          }
          


          And be sure that the container's width outside the editor is 100%.
          Obviously, any width attribute in rich:editor (or rich:editor properties file) must be deleted.

          It's working ok in FF 3.5, IE6 and 7 (not tested in IE 8).