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.

#117171 Editor changes code after saving (css class "col-md" to only "col")

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 cufe on Sunday, 13 April 2025 14:48 BST

cufe

Situation:
In an article with the Editor turned on, I select to insert columns, select 2 columns, the editor inserts 2 columns. I see the "col-md" class correctly in the code. However, as soon as I am in Editor mode and save the article, after switching to code, I only see the "col" class. As a result, the article layout is displayed incorrectly.

Correctly:

<div class="row" data-wf-columns="1">
<div class="col-md">aaa</div>
<div class="col-md">bbb</div>
</div>

Incorrectly:

<div class="row" data-wf-columns="1">
<div class="col">aaa</div>
<div class="col">bbb</div>
</div>


Solution:
The editor will not change the CSS class "col-md" to the class "col" after saving. It must keep the class "col-md" even after saving. The editor must not change predefined CSS classes in the code even if the user has defined their own.

Joomla 5.2.6
JCE Pro 2.9.84
Bootstrap 5.2.3 (Template)

Ryan

Please try JCE Pro 2.9.85 Beta - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Ryan Demmer

Lead Developer / CEO / CTO

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

cufe

The problem persists.

I also tried changing the code in bulk from "col" to "col-md" and just by switching from code preview to editor and back to code preview, this process changed the html code back to "col" (even without saving the article).

Ryan

Please make sure to clear your browser cache after installing the beta, then reload the page to refresh the editor.

Ryan Demmer

Lead Developer / CEO / CTO

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

cufe

Solved, thank you Ryan.