widgetfactory / jce

JCE - A Content Editor for Joomla
https://www.joomlacontenteditor.net
GNU General Public License v2.0
35 stars 12 forks source link

xtd-button readmore breaks page layout #113

Closed Chrissi2812 closed 2 years ago

Chrissi2812 commented 2 years ago

Describe the bug Using the xtd-button for Readmore JCE has Problems creating the correct markup for Joomla to get the intro- & fulltext.

I have tried to fix the bug in Joomla (https://github.com/joomla/joomla-cms/pull/31087) but sems like the fix will never get implemented there.

To Reproduce Steps to reproduce the behavior: First it will put the readmore inside a wrapping <p> tag and when switching between Code and Editor View it will "fix" the error by closing the tags with a &nbsp inside that would add extra whitespace later. Both will result in the output to be what the user wanted. We noticed it just because a customer of us has broken his page multiple times because of this.

Expected behavior The Readmore insert should close the other tags.

Screenshots

Description Image
After pressing the xtd-button image
After swithcing between Code & Editor image

https://user-images.githubusercontent.com/6141652/161576958-07ec0013-dd5c-4e14-89ec-882c0649796a.mp4

Desktop (please complete the following information):

Additional context This seems only to happen if the xtd-button is used.

ryandemmer commented 2 years ago

JCE has its own Readmore button in the editor toolbar, which fixes this issue.