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)

#110863 Using Column Layout Feature but custom css is removed?

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 Tuesday, 26 April 2022 10:03 BST

bri-2.0
Hi,

I am using the column feature layout in an article, it works really well - but when I add additional css for styling as soon as I 'save and close' the article new css is removed.

If I do not toggle back to the preview view and remain in code view I can save the document and view my styles on the front end.

I have added div and css to the allow in the editor profile, checked the Joomla prohibited settings and just can't see the issue.

The attached shows the two classes I add to each column. They are the ones removed on save and close.



Thanks for your help
Britt

Attachments

Ryan
Please try JCE Pro 2.9.23 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.

bri-2.0
Hi Ryan,

I've installed and it now does not strip away the custom css, but it does still strip away additional column control css. See my examples to get an idea on what it changes.

e.g. if I set col-lg-4 col-md-4 on save the col-sm is reinstated.

Appreciate your help 😃

Thanks Britt




bri-2.0

Attachments

Ryan
Please try JCE Pro 2.9.23 Beta 7 - 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.

bri-2.0
Hi Ryan,

Its improved, but still stripping and replacing css. See the screens

The second column, removes the col-lg-8, retains if I do not go back to edit view mode. But as soon as I save and close the file and reopen, it has stripped away the new css on that row only. Oddly it retained the first col-lg-4?

It also adds back the unrequired col-sm which I don't use because I have to be more granular across devices.

Thanks again for helping with this, it's a great feature.
Britt

bri-2.0
And images I am getting an error on uploading small files under 300KB each, no sot sure why. I can email them if this is not able to be resolved. I have tried two different browsers and the error I get is

'The file 2022-04-22_09-21-50.png, which you are attempting to upload is exceeded the maximum file size.'

bri-2.0
you have max upload set to 0.25MB...so here are two very optimised images. I can't do much smaller than this.


Attachments

Ryan
When you create Columns, you select the Stack Width and Layout for the columns, which results in a set of classes being applied to the divs, in this case the col-sm and col-sm-8 values.

Removing these classes, or adding others, will change the original layout and stack width, and adding some classes that are used by Columns to create these layouts, such as the col-lg-8 value, will then change how the columns are processed.

If you want to add your own layout values, then I would suggest removing the data-wf-columns="1" attribute in the parent container, so that the layout is no longer processed as Columns, and you can add your own classes as required.

Ryan Demmer

Lead Developer / CEO / CTO

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