在ckeditor中为类添加样式

时间:2016-07-03 19:46:42

标签: javascript ckeditor

您好我为CKEDITOR创建了插件。我想做个通知框。当用户单击以添加通知框按钮并填写表单时。插件创建这些源代码:

#ifdef _DEBUG
  #undef _DEBUG
  #include <python.h>
  #define _DEBUG
#else
  #include <python.h>
#endif

一切正常。但现在我想为此添加一些风格。 ckeditor级别的样式不适用于生产。如何为CKeditor添加这些类的样式?

1 个答案:

答案 0 :(得分:1)

插件和小部件可以添加自己的样式表。例如:

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

请参阅文档here

相关问题