]> BookStack Code Mirror - bookstack/commit
Updated strategy for empty newline sections
authorDan Brown <redacted>
Tue, 1 Mar 2022 17:26:06 +0000 (17:26 +0000)
committerDan Brown <redacted>
Tue, 1 Mar 2022 17:26:06 +0000 (17:26 +0000)
commit5947f59a04fa8165141ac23ca89fbdcdb16848ad
tree399eb4a3f068e1f50b2c2536124f73e1a8a5bd77
parent1843d80fb7b8d0bb930bbfc75ecce835ea7e2108
Updated strategy for empty newline sections

- For some reason, TinyMCE would handle empty paragraphs with a '&nbsp'
  by default but this would be removed when the paragraph had an
  attribute. This was fine in the old editor.
- This changes the approach to use '<br>' tags within elements
  for "spaced emptiness".
- For compatbility with any existing empty paragraphs, I updated the
  styles to show default height for empty paragraph sections.
- This also makes changes to help preserve encoded &nbsp; html tags
  since they were getting converted along the journey.

Related to #3302
app/Entities/Tools/PageContent.php
resources/js/wysiwyg/config.js
resources/sass/_pages.scss
tests/Entity/PageContentTest.php