CKEditor 4 - 自定义工具栏中的syntaxhighlight

时间:2013-03-15 14:01:09

标签: ckeditor

这也发布在(http://ckeditor.com/forums/Support/syntaxhighlight-in-customised-toolbar

我已经下载了CULLditor的FULL版本并添加了Syntaxhighlighter接口(来自http://ckeditor.com/addon/syntaxhighlight)。我在我的网站的不同位置使用编辑器用于不同的用途,因此希望能够在每次使用时设置自定义工具栏。使用过CKEditor 3(和FCKEditor!)后,我习惯在config.js文件中设置命名工具栏,但我无法显示Syntaxhighlighter接口按钮。

我的config.toolbar代码如下(注意'insert'工具栏中的'Code'按钮),任何帮助都将不胜感激!

config.toolbar = [
    { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Templates'] },
    { name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Paste', 'PasteText', 'PasteFromWord' ] },
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'SelectAll' ] },
    { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
    { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar', 'Code' ] },
    '/',
    { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
    { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
    '/',
    { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
    { name: 'others', items: [ '-' ] },
];

请帮忙......

0 个答案:

没有答案