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 Online

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

#114247 tag and Yootheme Pro

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 channingb on Thursday, 10 August 2023 16:12 BST

channingb
Hello JCE Team:

I am finding that the <p></p> tag is automatically added to my articles in Yootheme Pro Page Builder even though I have JCE set to: No Container & Linebreak on Enter in both Global and the Profile (tested inherent too).

During testing, I would go into the builder, use JCE to edit and remove all the tags. Upon saving, the <p> tag returns.

One drawback with the <p> tag being added is when I am creating lists. Only the first item will have the li element. I know how to fix this, but my clients will struggle.

I have gone through a few threads that note the challenge with the Yootheme editor. In the recent past, everything seemed to work well until this current project.

If I have missed something, my apologies and I appreciate your guidance.

Systems
Pro JCE 2.9.38
Joomla 4.3.3
Yootheme 4.0.7

Ryan
I am finding that the

tag is automatically added to my articles in Yootheme Pro Page Builder even though I have JCE set to: No Container & Linebreak on Enter in both Global and the Profile (tested inherent too).
If this is only happening when you save the content in Yootheme, and not when you switch to the Code tab when editing in JCE, then you can assume the paragraphs are being added by Yootheme, or the Yootheme text editor. Although JCE supports a No Container & Linebreak option, Tinymce - the editor used by Yootheme for the Text elements - does not by default, and will always wrap content in a paragraph or div it is not already in some form of block element.

Ryan Demmer

Lead Developer / CEO / CTO

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

channingb
Hi Ryan:

Thanks for your reply. So, if I switch to the Code tab in JCE, are you saying that is potentially adding the <p> tag?

I don't use TinyMCE or the Youtheme editor. I have even switched TinyMCE plugin to do linebreak upon Enter. I have even turned the plugin off but I am guessing that this does not affect the Yootheme editor.

I have a ticket in with Yootheme too. Would really like to figure this out on behalf of our clients.

Channing

Ryan
So, if I switch to the Code tab in JCE, are you saying that is potentially adding the

tag?



No, you won't see the

being added in the Code tab in JCE, as you say it is only being added on saving. JCE does not edit code on saving, but moving from JCE in Yootheme back to the Yootheme text editor is possibly making the addition.

I don't use TinyMCE or the Youtheme editor. I have even switched TinyMCE plugin to do linebreak upon Enter. I have even turned the plugin off but I am guessing that this does not affect the Yootheme editor.


Yootheme uses a version of Tinymce when editing a Text element. It is not the same as the Joomla version of Tinymce.

https://cdn.joomlacontenteditor.net/tmp/114247-tag-and-yootheme-pro.jpg

Ryan Demmer

Lead Developer / CEO / CTO

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

channingb
Thanks Ryan. So, thinking that when I am JCE then press OK, the cursor does appear in the Yootheme editor. So perhaps at that moment it triggers the adding of the tag. The cursor does not appear in the Yootheme editor when I begin editing content.

Ryan
So perhaps at that moment it triggers the adding of the tag.


Yes, this is what is happening. By default Tinymce will wrap any content that is not already in a block element in a paragraph container. This is different to the Enter Key linebreak behaviour.

Ryan Demmer

Lead Developer / CEO / CTO

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

channingb
Thanks again. When I hear back from Yootheme, will keep posted. Appreciate your time and service.

channingb
Hi Ryan:

Yootheme did not have an answer except that is normal behavior and some funky workarounds. I will keep hounding them. Is there any way you can guide me to have this problem alleviated? I cut and paste a document into JCE modal. All is good if I style in there. But if I have to go back after saving, then we end up with those <p> tags which then means if I add any element, H tags, p tags, etc, it will surround the whole paragraph or page with that tag. And, of course, the issue with the ul.

Thank you.

Channing

Ryan
Is there any way you can guide me to have this problem alleviated?


Unfortunately not, this is entirely due to the settings for the Yootheme version of Tinymce. Also, Tinymce 6 no longer supports the forced_root_block:false Tinymce option available in previous versions which allows for content to no be wrapped in block elements, so even if Yootheme did implement it (I think they are currently using Tinymce 5), then if/when they did upgrade to Tinymce 6, this would no longer be available.

Tinymce 6 is also the default Joomla editor in Joomla 5.

Ryan Demmer

Lead Developer / CEO / CTO

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

channingb
Thank you Ryan. There are little workarounds when editing but still, not quite as streamlined as it once was.

Regards,

Channing