Jump to content

CKEditor custom markup


Claus
 Share

Recommended Posts

How do I go about adding custom markup to my Body-fields? I want to add some spans, but they are all removed if I add them in the ‘Source’ window.  I can see that the Body-field is edited by CDEditor, but how do I add a custom ‘mystyles.js’ to it? (If that indeed is what I need to do). The guides I have have found on this seem outdated.

Link to comment
Share on other sites

45 minutes ago, Claus said:

How do I go about adding custom markup to my Body-fields? I want to add some spans, but they are all removed if I add them in the ‘Source’ window.  I can see that the Body-field is edited by CDEditor, but how do I add a custom ‘mystyles.js’ to it? (If that indeed is what I need to do). The guides I have have found on this seem outdated.

Figured it out. I needed to enable it under Admin>Setup>Fields>Body>Input>CKEditor Toolbar by adding ‘Styles’ there, and then editing the ‘mystyles.js’ and adding its path to ‘Custom Editor JS Styles Set’. Works like a treat.

  • Like 1
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

×
×
  • Create New...