CKEditor how to create custom styles?

Is there a way to create custom styles in Ckeditor?

Screenshot:

enter image description here

As you can see in the screenshot, I want to create a new drop-down menu (for example, the Styles drop-down menu) to contain these yellow and green markers and possibly the others that I want.

I saw the documents, but they only show how to create custom buttons to add to the toolbar, but I donโ€™t know how to add a custom drop-down menu with styles on the toolbar.

Any help would be greatly appreciated. Thank you for your help.

+2
source share
1 answer

I believe that you need to create a plugin to make this work. An example can be found here: http://ckeditor.com/forums/CKEditor-3.x/Custom-drop-down

Also, it looks like addOn for CKeditor is here: http://ckeditor.com/addon/strinsert

This addOn adds lines to your content, but you can look at the code and see how to make it add styles.

+2
source

Source: https://habr.com/ru/post/1481929/


All Articles