Jump to content

How to override css styles in CMS pages (added with TinyMCE)?


Recommended Posts

You should edit the styles in the /* global RTE fields */ section of global.css. If you need to override those styles for a specific element, click the HTML button in the TinyMCE toolbar, then add code like the following to the appropriate tag:

style="color: blue"



This will make just that element blue instead of whatever is defined in global.css.

Share this post


Link to post
Share on other sites

Ok, I get the idea.

But I was hoping to use some kind of class in the global css like this:

.importantTitle {
    font-size: 20px;
    color: #fff;     
}



and then from the "styles" menu in TinyMCE just select the style to be applied.

That way yo can say to a client:

"Use the importantTitle style for something you want to show a really important"...

BTW Thankyou Rocky!!

Share this post


Link to post
Share on other sites

I did a quick Google search for how to add items to the "Styles" dropdown in TinyMCE. It seems you just need to add your .importantTitle style to global.css, then edit the TinyMCE configuration to add that style to the "Styles" dropdown. I can't figure out how to do this though. I'll let you search and try to figure it out, so I can answer other questions on the forum.

Share this post


Link to post
Share on other sites
  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More