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.

#109738 Change Backgroundcolor of the Editor Content field

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 thefbione on Tuesday, 21 June 2022 13:52 BST

elian
Hi Ryan,

hope you´re fine!
I need to change the Backgroundcolor of the Content field from the editor e.g. to see my transparent Images:
https://www.screencast.com/t/x06pnhVEIH

Is that possibly?
Thanks,
Dennis

Ryan
Add the following to the template.css or editor.css file, changing the hex colour value to whatever you require

.mceContentBody {
    background-color: #eee;
}

Ryan Demmer

Lead Developer / CEO / CTO

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

thefbione
Hello,
i try to do this, but unable to modify the background color.
Where i have to put this code ?

Because i have tested in the custom css of my template (the frontend template), tested in the css of the admin template, nothing change.
This will be great if one time this function can be inserted in the editor, just have the possibility to change the background color in one click...

Ryan
My suggestion above will only change the background colour of the editor content when editing, not the background colour of the content displayed in the front-end.

Where i have to put this code ?
Because i have tested in the custom css of my template (the frontend template), tested in the css of the admin template, nothing change.


This should be added to one of your template stylesheets, not the admin template. The editor may not be loading the custom css file unless you have configured it to do so.

Which template are you using?

Ryan Demmer

Lead Developer / CEO / CTO

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

thefbione
I use Yootheme Pro builder.
I have a custom css field in the parameters of template, but it dos not change anything.
And yes, i want to change only the editing field.

Ryan
Please send me a login - https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

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

Ryan
I have a custom css field in the parameters of template, but it dos not change anything.


Where is this set? I can't find it. Is it in the main theme.css file for the template?

Ryan Demmer

Lead Developer / CEO / CTO

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

thefbione
Ho yes sorry, was deleted.
I have put it in :
Admin panel => 3rd Party module => Yootheme => Parameters => Custom code => CSS/LESS

Ryan
This is working now. I updated your css to:

.mceContentBody.fond-noir {
  background-color: #eee;
}

Ryan Demmer

Lead Developer / CEO / CTO

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

thefbione
OK, great.
.fond-noir, that is me added it in the jce configuration for the css style in my test...
Is it necessary ?

Ryan
.fond-noir, that is me added it in the jce configuration for the css style in my test...
Is it necessary ?


No, I've just changed it back and it does not appear to be necessary. If you are not seeing the grey background, clear your browser cache.

Ryan Demmer

Lead Developer / CEO / CTO

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

thefbione
It is OK.
Thank you very much !