Jennifer Stock Posted February 18, 2015 Share Posted February 18, 2015 I am having trouble getting the CKEditor to include a custom style set. I put this in the Custom EditorJS Styles Set input box for the body field (Context: None(default)): mystyles:/site/templates/styles/mystyles.js That file reads like this: CKEDITOR.stylesSet.add( 'mystyles', [ { name: 'Inline Codex', element: 'code' }, { name: 'Inline Quotation', element: 'q' }, { name: 'Button', element: 'a', attributes: { 'class': 'uw-btn' } }, { name: 'Left Aligned Photo', element: 'img', attributes: { 'class': 'align_left' } }, { name: 'Right Aligned Photo', element: 'img', attributes: { 'class': 'align_right' } }, { name: 'Centered Photo', element: 'img', attributes: { 'class': 'align_center' } }, { name: 'Small', element: 'small' }, { name: 'Deleted Text', element: 'del' }, { name: 'Inserted Text', element: 'ins' }, { name: 'Cited Noodle Work', element: 'cite' } ] ); I've checked everything multiple times and I can't figure out what I'm doing wrong. Thanks, Jenn Link to comment Share on other sites More sharing options...
Jennifer Stock Posted February 18, 2015 Author Share Posted February 18, 2015 Hi. I just tried to add the style set to another input field that has the CKEditor enabled and it is successfully reading my custom styles. Is there something special about the "body" field vis-a-vis custom styles + CKEditor? J It's working now for the body field too. I guess I was experiencing a caching effect. Link to comment Share on other sites More sharing options...
alejandro Posted July 20, 2016 Share Posted July 20, 2016 Hello, it happened exactly to me: no way to display custom styles to "body" field for 2 days, but after enabling successfully to another rich text field they appeared in body field too. Link to comment Share on other sites More sharing options...
alejandro Posted January 3, 2017 Share Posted January 3, 2017 Hello. Now it´s happening again with other field. I really don't find how to show the custom styles... It´s enabled for other fields and working. Link to comment Share on other sites More sharing options...
alejandro Posted January 3, 2017 Share Posted January 3, 2017 Well, I found a solution, duplicate mystyles.js file (or whatever name), change the name and use it for the conflicting field. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now