4 Replies Latest reply on Jan 11, 2010 1:07 AM by abcd1

    Saving the editor contents, fonts style

    abcd1

      Hi everyone

         in my application i have a rich:editor. when i click a save button the contents in the editor must get saved

         ie, the value, font, size, style, color must get saved in a text file. how can we do this with this component

       

         Also can we change the buttons. ie, B is for bold. i need to change the letter B to F. is it possible

       

      Thanks in advance

      vijay

        • 1. Re: Saving the editor contents, fonts style
          ilya_shaikovsky

          1) when you submitting the form you will get the result html placed in your model String property. You mean you need to parse it additionally? You could perform it in action.

           

          2) Such customization question better resolve using tinyMCE documentation as we do not changed original widget functionality and customization points.

          • 2. Re: Saving the editor contents, fonts style
            abcd1

            Thanks ilya

             

               i just need to save the content in the editor into a text file. i had done that.

            but there is another problem happening

             

            1.  when i am giving readonly property the header part is gone only the text area is showing..

             

            2. how can i give background color to the text area.

             

             

            My code is

             

            <h:panelGroup style="height:320px;width:400px;" >


            <rich:editor id="editor" readonly="#{formsta9.disableEditor}"   value="#{formsta9.editorValue}"


            theme="advanced" width="500" height="360" >


            <f:param name="theme_advanced_buttons1" value="fontselect,fontsizeselect,bold,italic,underline,justifyleft,


            justifycenter,justifyright,bullist,forecolor"/>


            <f:param name="theme_advanced_buttons2" value=""/>


            <f:param name="theme_advanced_toolbar_location" value="top"/>


            <f:param name="theme_advanced_toolbar_align" value="right"/>


            </rich:editor>    


            </h:panelGroup>

             

            why this is happening. i am using richfaces 3.3.2

            • 3. Re: Saving the editor contents, fonts style
              nbelaevski

              1.  when i am giving readonly property the header part is gone only the text area is showin

              Looks logical for me - r/o text cannot be edited, so controls were removed.

              2. how can i give background color to the text area.

              You can use rich-* CSS classes to customize components' look. User guide contains reference list of rich-* classes for each component. Also you can use Firebug/IE developer toolbar to find the necessary CSS class by inspecting the loaded page.

              • 4. Re: Saving the editor contents, fonts style
                abcd1

                Thanks nick

                i will porceed with that