You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#114854 P-tag added before and after if first paragraph has a class and JCE and SPPB backend editor is used

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Friday, 06 October 2023 16:21 BST

jvdh
Hello, I use Joomla 4.3.4, JCE 2.9.50 FREE and SP Page Builder PRO 5.1.3. I think there is a bug in JCE. The problem also occurred with the previous versions of JCE. The problem If SP Page Builder PRO and JCE is used as backend editor the following HTML:
<p class="mb-0">Test text.</p>
Converts to:
<p> </p>
<p class="mb-0">Test text.</p>
<p> </p>
If you for example edit the text. The problem only occurs [list] [*]If the backend editor of SP Page Builder Pro is used in combination with JCE. [*]If the first paragraph has a class. In the example I have the "mb-0". But it also occurs when you use the class "text-center". [/list] The problem does not occur [list] [*]If the frontend editor of SP Page Builder Pro is used in combination with JCE. [*]If I use the default TinyMCE editor. [*]If the first paragraph has no class. The second paragraph may have a class. [/list] So there is a problem if the first paragraph tag has a class. Regards, Jeroen

Ryan
This actually appears to be caused by some code in SP PageBuilder, which is wrapping the content in

tags. As the content is already a paragraph, the invalid HTML is then destructured by JCE to create correct HTML, resulting in the additional

tags before and after. The code in question in the administrator/components/com_sppagebuilder/assets/editor/dist/js/bundle.min.js file is:


e = e.startsWith("<p>") ? e : "<p>".concat(e, "</p>");

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

jvdh
When editing in the frontend it works.
But does Joomshaper need to look at this?

Ryan
But does Joomshaper need to look at this?


Yes, this is Joomshaper code.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.