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)

#117213 Disable highlighting of operator

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 TimR on Monday, 19 May 2025 14:02 BST

TimR

Hi,

when i add sample code to an article the operators are highlighted.
Is there a way to disable this?
A workaround can be to remove the .operator class from it

But i assume there is an option somewhere to disable this behavior that i overlooked?

I have attached a screenshot with some random code as an example.

Thank you.


Attachments

Ryan

But i assume there is an option somewhere to disable this behavior that i overlooked?

No, this appears to be default styling by the Prism library.

Try adding this to your template stylesheet:

pre .token.operator {
    background: inherit;
}

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 added a css override for the operator background color in Code Sample 2.0 - https://www.joomlacontenteditor.net/downloads/plugins/editor/code-sample

Ryan Demmer

Lead Developer / CEO / CTO

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

TimR

Thanks, i added it to my stylesheet and it did the trick