Jump to content

TinyMCE Editor Style File


Pete
 Share

Recommended Posts

Hi all,

With CKEditor there was a way to have a stylesheet to change the style of things inside the editor. Is there a way of having a CSS file for that in for the TinyMCE fields?

I know you can do some of this in the settings, but it's a bit restrictive when you want to use SVG and advanced CSS selectors.

I have had a few occasions where clients want to have the styles in the editor match the site exactly and for some lists we've used SVG for list bullets etc and it's just easier to match up with a CSS file.

Link to comment
Share on other sites

Yes! Either in the TinyMCE module settings, or in each field there are options for overriding the json config of the TinyMCE instance, and you can do sth like:

image.png.2300d0dd5cf1914d610a5625fae0b384.png

site/templates/assets/tiny.css is my custom css file.

In all fairness, I have only tested this in the global module config, not in the individual field context.

  • Like 2
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...