224
Views
2
Comments
[CKEditor] Custom Styles
Question
ckeditor
Web icon
Forge asset by CKEditor Team

Did anyone succeed in adding custom style classes without changing the style.js file?

I've tried the CKEditor.config and CKEditor.editorConfig without success. 

Best regards

2023-12-30 21-08-17
Artuur De Maeyer
 
MVP

I'm having the same issue

This link suggests to change the config.js file:

https://stackoverflow.com/questions/15659390/ckeditor-automatically-strips-classes-from-div

'

To allow style tag (<style type="text/css">...</style>):

config.extraAllowedContent = 'style';

'

But I'm looking to just use the Config input parameter to allow the style tag in the HTML.

Because I don't want to change the JavaScript resource files.

Any suggestions?

Kind regards,

Art

2023-12-08 14-41-30
Necmettin Sahinbay

Hi all,

Did you clear cached files from browser before test it?

Regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.