0

I'm using Drupal 8 and am trying to make ckeditor truly wysiwyg.

To that end I've successfully gotten ckeditor to use a custom stylesheet by adding a ckeditor_sylesheets key to my theme's info.yml and my stylesheet's path as the value.

If within my custom stylesheet I create styles and assign them to a class, those styles are reflected within the form if I reference the class.

However, if within my stylesheet I define a style for an HTML element (e.g. h1, p, etc.) ckeditor ignores those styles.

This is the case regardless of how I set or unset "Limit allowed HTML tags and correct faulty HTML" and "Correct faulty and chopped off HTML" at /admin/config/content/formats.

As I mentioned, clearly ckeditor is accessing my stylesheet as styles assigned to classes work. Also, I can see the stylesheet in Chrome's inspector. If I inspect a HTML tag for which I've defined a style it shows me that user agent stylesheet is being used.

I don't think it matters but just in case; I'm using Seven for my administrative theme and my default theme is a sub-theme of bootstrap.

If someone could give me a clue I'd appreciate it.

1 Answer 1

0

So I resolved this problem by clearing cache. Not Drupal's cache (I'd tried that about a zillion times) Chrome's cache. Duh.

2
  • Just for the future: In case of browser caching doubts, Ctrl+F5 will do to reload ALL resources of the current page... Commented Mar 1, 2019 at 13:44
  • Thank you @Mario Steinitz for going the extra mile and providing a very useful tip re: clearing browser cache.
    – user92354
    Commented Mar 8, 2019 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.