Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85540

TinyMCE does not support empty lines

XMLWordPrintable

    • MOODLE_405_STABLE, MOODLE_500_STABLE

      When (intentionally) adding a blank line within a paragraph, i.e. an empty paragraph, in the TinyMCE editor the space is visible. However, when viewing the content the empty line does not show. If the empty line is formatted as a header, the empty line can be viewed.

      Editor: Add 5 lines, the first with text, the second empty, the third with text, the fourth empty but formatted as a header and the fifth with text

      Page/forum post: The second line has disappeared from view

      According the forum https://moodle.org/mod/forum/discuss.php?d=457056&parent=1838994 "Atto saved an empty paragraph as <p><br></p> and because the <br> element was there, the browser rendered the paragraph on screen as a blank line. Tiny only saves them as <p></p> and consecutive empty paragraphs are not rendered in the browser (or rather, rendered with no height).

      Tiny knows the line breaks are there because when you edit the page, the <br> elements are being placed in, but they are not there when the saved page is rendered. There is almost certainly some trickery in the background converting carriage return characters to <p><br></p> in the editor but just <p></p> when the saved copy is viewed."

            Unassigned Unassigned
            anna.sparkfore Anna Elvnejd
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 9 minutes
                9m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.