-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.5.4, 5.0
-
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."