getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[nextgen-editor] Line breaks converted to   on page save leading to   stacking on repeated save #307

Open Currey opened 2 years ago

Currey commented 2 years ago

With Line Breaks enabled in settings, line breaks in content are converted to a double space upon save; That's all fine and dandy, as is Markdown standard practice. The issue arises when that page is saved again. Upon an additional save, the double space is converted to   and a new double space is added after it to retain the line break. Multiple saves can lead to      stacking.

I have tried replacing line breaks with <br>, unfortunately, they are converted back to markdown line break on save, and then the issue reoccurs.

I have Enable Non-breaking Space Transformations disabled as I require specific use of &nbsp; for typographic reasons, however, enabling the transformation option doesn't appear to have any effect.

This is particularly frustrating for content that is centred. In my current use case, I have an arrangement of team member's details (photo, name, title, role, etc.). Content is centred, and the title and role are separated by a line break. With each save, a &nbsp; is appended to the title, increasing the title line's width and off-centring it from the role line below it.

Perhaps an option to disable converting double spaces to &nbsp;? Or perhaps parse the markdown differently.

Appearance in editor

Screen Shot 2022-09-06 at 10 44 28 pm

Rendered appearance after single save

Screen Shot 2022-09-06 at 10 44 54 pm

Rendered appearance after multiple saves

Screen Shot 2022-09-06 at 10 46 00 pm

Markdown as viewed in Atom editor. Note the double space and line return far off to the right

Screen Shot 2022-09-06 at 10 48 47 pm