0

I'm using CKEditor to allow editing of template-based HTML newsletters with inline CSS. Each newsletter may have unique CSS styles to be applied to it.

How can add the document-specific styles to the Styles selection menu in the editor? I know I refer to a CSS file, but such file does not exist, as the styles are in the edited document.

1
  • does my answer answer your question? Commented Mar 6, 2012 at 1:45

1 Answer 1

1

If you are wanting to add more options to the styles then you need to edit the following file

ckeditor/plugins/styles/styles/default.js

OR

see the documentation for doing so here http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles

OR

see this being discussed on SO here Adding custom styles to CKEditor

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, the second link was useful. The styles are document-specific, so I'll have to convert them to json on the back end and insert them into the page loading the CKEditor instance. Wish there was a way to add the styles as pure CSS...

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.