• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 2.1.3
    • 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 2.1.1
    • None
    • Standalone with MySQL backend on a Windows server 2003. JDK j2sdk 1.4.2_10.
      I have this problem on Windows 2K and XP, with IE6 or Firefox 1.5.

      After typing a text using the integrated TinyMCE editor, you want to apply Headings effects to one line and all the lines are transformed.
      Similarly, if you want to apply a List effect to a few lines the whole text is considered as a single paragraph.

      Here attached are some snapshots of the problem.

      A sample of a normal behavior is demonstrated at: http://tinymce.moxiecode.com/example_word.php?example=true

      The issue seems to be caused by these lines in the file wiki-textarea.vm:
      force_p_newlines: false,
      force_br_newlines: true

        1. RichTextProblem.jpg
          118 kB
          Christian Barthelemy
        2. TestTinyMCE.ZIP
          1.36 MB
          Christian Barthelemy

            [CONFSERVER-5049] Bad behaviour of the Wysiwyg editor with paragraphs

            Tom Davies added a comment -

            Fixed

            Tom Davies added a comment - Fixed

            I should have said that I am not the author of this code as it is part of the TinyMCE samples delivered with their package.

            Here are their explanations:


            This example shows you how TinyMCE can be configurated to function with Word content in the best possible way. TinyMCE is configured to auto convert/cleanup pasted Word content in this example. It's has also a custom CSS that makes paragraphs marginless as in Word.


            Christian

            Christian Barthelemy added a comment - I should have said that I am not the author of this code as it is part of the TinyMCE samples delivered with their package. Here are their explanations: This example shows you how TinyMCE can be configurated to function with Word content in the best possible way. TinyMCE is configured to auto convert/cleanup pasted Word content in this example. It's has also a custom CSS that makes paragraphs marginless as in Word. Christian

            Tom Davies added a comment -

            Thanks Christian – we are going to go with those settings.

            I'm not quite sure what the MS Office styles are for – is it to make pasted office docs look better before they are saved?

            Regards,
            Tom

            Tom Davies added a comment - Thanks Christian – we are going to go with those settings. I'm not quite sure what the MS Office styles are for – is it to make pasted office docs look better before they are saved? Regards, Tom

            Here attached a standalone version of TinyMCE simulating similar settings as the one integrated in Confluence.
            It works well with both IE and Firefox as far as I can judge.

            Changes are:
            1) In the TinyMCE-Standalone.htm file (this changes would normally be in wiki-textarea.vm) the force_p_newlines and force_br_newlines parameters are not set.

            2) Added the following at the end of editor_content.css:
            /* Fix for MS Office style paragraphs (MsoNormal) */
            p

            { margin: 0px; padding: 0px; }

            /* Fix for MS Office unindeted lists */
            .unIndentedList

            { margin: 0px; padding: 0px; list-style-position: inside; }

            .unIndentedList li

            { padding: 0px; }

            /* Fix for MS Office UL lists */
            ul

            { margin-top: 0px; margin-bottom: 0px; }

            Christian Barthelemy added a comment - Here attached a standalone version of TinyMCE simulating similar settings as the one integrated in Confluence. It works well with both IE and Firefox as far as I can judge. Changes are: 1) In the TinyMCE-Standalone.htm file (this changes would normally be in wiki-textarea.vm) the force_p_newlines and force_br_newlines parameters are not set. 2) Added the following at the end of editor_content.css: /* Fix for MS Office style paragraphs (MsoNormal) */ p { margin: 0px; padding: 0px; } /* Fix for MS Office unindeted lists */ .unIndentedList { margin: 0px; padding: 0px; list-style-position: inside; } .unIndentedList li { padding: 0px; } /* Fix for MS Office UL lists */ ul { margin-top: 0px; margin-bottom: 0px; }

            Unzip and launch TinyMCE-Standalone.htm from the TestTinyMCE folder

            Christian Barthelemy added a comment - Unzip and launch TinyMCE-Standalone.htm from the TestTinyMCE folder

            Tom Davies added a comment -

            I've changed the tinyMCE config to use paragraphs instead of breaks (shift-enter can be used when you don't want a new paragraph).

            There is still a bug – in tinyMCE you should be able to select part of a paragraph, apply a style to it (e.g. h1) and end up with part of the paragraph having the style, i.e.:

            <p>asasdasd<br />
            asdasdsad<br/>
            asdsad<br />
            </p>

            Goes to:

            <p>asasdasd<br />
            </p>
            <h4> asdasdsad</h4>
            <p> asdsad<br />
            </p>

            This doesn't work in IE with the original tinyMCE, but our modifications mean that it doesn't work in Firefox either.

            Tom Davies added a comment - I've changed the tinyMCE config to use paragraphs instead of breaks (shift-enter can be used when you don't want a new paragraph). There is still a bug – in tinyMCE you should be able to select part of a paragraph, apply a style to it (e.g. h1) and end up with part of the paragraph having the style, i.e.: <p>asasdasd<br /> asdasdsad<br/> asdsad<br /> </p> Goes to: <p>asasdasd<br /> </p> <h4> asdasdsad</h4> <p> asdsad<br /> </p> This doesn't work in IE with the original tinyMCE, but our modifications mean that it doesn't work in Firefox either.

            Thank you Dave,

            I never used shift + enter key, oly enter key to separate the lines.
            I reproduced the problem on your own server at http://confluence.atlassian.com/x/g0oC using IE.
            Using Firefox 1.5 at http://confluence.atlassian.com/x/hEoC the problem didn't appear. So it seems to be a IE specific problem.

            My IE is 6.0.2800.1106 on Windows 2K.

            Christian Barthelemy added a comment - Thank you Dave, I never used shift + enter key, oly enter key to separate the lines. I reproduced the problem on your own server at http://confluence.atlassian.com/x/g0oC using IE. Using Firefox 1.5 at http://confluence.atlassian.com/x/hEoC the problem didn't appear. So it seems to be a IE specific problem. My IE is 6.0.2800.1106 on Windows 2K.

            Christian,

            We've tried to reproduce this error and was only successful if we enter a few lines of test data in the following fashion:

            ----- start test data ----
            (select paragraph style)
            (type 'one') (press shift + enter key)
            (type 'two') (press shift + enter key)
            (type 'three') (press shift + enter key)
            ------ end test data -------

            Using shift enter preserves the paragraph style across lines. When a heading is now applied to the first line, the whole paragraph gets it.

            However, it should be noted, that normally, when a user hits the 'enter' key, the paragraph style is not preserved or disappears. This is why we weren't able to reproduce the problem here withtout forcing the paragraph style. This can also be said of the bullets.

            Can you confirm this for us?

            Cheers,
            Dave

            dave (Inactive) added a comment - Christian, We've tried to reproduce this error and was only successful if we enter a few lines of test data in the following fashion: ----- start test data ---- (select paragraph style) (type 'one') (press shift + enter key) (type 'two') (press shift + enter key) (type 'three') (press shift + enter key) ------ end test data ------- Using shift enter preserves the paragraph style across lines. When a heading is now applied to the first line, the whole paragraph gets it. However, it should be noted, that normally, when a user hits the 'enter' key, the paragraph style is not preserved or disappears. This is why we weren't able to reproduce the problem here withtout forcing the paragraph style. This can also be said of the bullets. Can you confirm this for us? Cheers, Dave

              Unassigned Unassigned
              9a68215e9d40 Christian Barthelemy
              Affected customers:
              1 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: