4 Replies Latest reply on Oct 2, 2009 2:54 AM by mdabrowa

    rich:editor, adding spaces in the lists

    mdabrowa

      I created a nested list such as this:
      abc
      Generated html code:

      <ul>
      <li>a
      <ul>
      <li>b</li>
      </ul>
      </li>
      <li>c</li>
      </ul>


      On every submit a space character is added after item "a". This can be seen in a HTML preview.

      This is very important for me because I need to know if there was any change in the edited text.

      This problem also occurs in the RichFaces LiveDemo example. The steps required to repeat the problem:
      1. Select advanced editor.
      2. Prepare a list such as the above.
      3. Check HTML preview.
      4. Switch to the simple editor.
      5. Switch back to the advanced editor.
      6. Check HTML preview.

      After element "a" will be two spaces because there were two submits of a value. If you repeat the procedure there will be two new spaces.

      Does anyone know a way to solve this problem?

        • 1. Re: rich:editor, adding spaces in the lists
          alex.kolonitsky

          The spaces are added by TinyMCE. You can change it by TinyMCE options remove_linebreaks and apply_source_formatting.

          • 2. Re: rich:editor, adding spaces in the lists
            mdabrowa

            Alex, your solution does not work. Could you confirm it?

            This is my configuration:

            theme="advanced"
            mode="textareas"
            theme_advanced_toolbar_location="bottom"
            theme_advanced_toolbar_align="left"
            plugins="fullscreen"
            theme_advanced_buttons1="formatselect,fontselect,fontsizeselect,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,numlist,bullist,outdent,indent,|,backcolor,forecolor,removeformat,|,undo,redo,|,fullscreen,|,link,unlink,|,code,"
            theme_advanced_buttons2=""
            theme_advanced_buttons3=""
            gecko_spellcheck="true"
            apply_source_formatting="true"
            remove_linebreaks="true"
            



            • 3. Re: rich:editor, adding spaces in the lists
              alex.kolonitsky

              Please try to set
              apply_source_formatting=false
              remove_linebreaks=false

              • 4. Re: rich:editor, adding spaces in the lists
                mdabrowa

                Nothing has changed.

                I'm not sure if these options work. I do not see any difference after changing from true to false.

                However, I am sure that the config is loaded because the changes in the buttons and plugins work.