How do I pass in config info to CKEditor using the jQuery adapter?

后端 未结 7 742
感动是毒
感动是毒 2021-02-05 06:49

I\'m using the latest CKeditor with jQuery adapter.

I have successfully got it to work, and display.

However, as I am completely new to CKeditor, how d

7条回答
  •  情书的邮戳
    2021-02-05 07:26

    Not sure if this is a new feature of CKEDITOR, but just want to share my solution (in case it helps anyone looking for this now):

    $("textarea.youreditor").ckeditor
    (
        {
            customConfig: "/path/to/custom/config.js"
        }
    );
    

    ... and my config looks like this (simply copied the default config.js):

    CKEDITOR.editorConfig = function(config)
    {
        config.toolbar_Full =
        [
            { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
            { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
            { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
            { name: 'colors', items : [ 'TextColor','BGColor' ] }
        ];  
    };    
    

提交回复
热议问题