How can I append custom css file fo ck editor ?

How can I append custom css file fo ck editor ?

casuistcasuist Posts: 41Questions: 16Answers: 0

I found this method.
https://docs.ckeditor.com/ckeditor4/latest/guide/plugin_sdk_styles.html

CKEDITOR.plugins.add( 'example', {
init: function( editor ) {
var pluginDirectory = this.path;
editor.addContentsCss( pluginDirectory + 'styles/example.css' );
}
} );

How ?

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    It looks like you could just run that snippet before the initialisation of DataTables or Editor. It is referencing the global CKEDITOR variable and adding to its plug-in tree with a object / funciton that will be initialised when a new CKEditor is created.

    Allan

This discussion has been closed.