ckeditor 4加载自定义工具栏

时间:2015-05-26 15:49:53

标签: ckeditor

如果我使用:CKEDITOR.replace('editor1', { toolbar: 'Full' }); <br/> 我得到了自定义工具栏,但页面上没有文字

如果我使用:CKEDITOR.inline('editor1', { toolbar: 'Full' });<br/> 我得到了我的文字而不是完整的自定义工具栏, 我没有得到Source按钮
按钮定义...

> config.toolbar_Full = [
        { name: 'clipboard',   items: ['Source','Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },<br/>
        { name: 'editing',     items: ['Find', 'Replace', '-', 'SelectAll'] },<br/>
        { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline'] },<br/>
        { name: 'links',  items: ['Link', 'Unlink'] },<br/>
        { name: 'insert', items: ['Image', 'Table', 'HorizontalRule'] },<br/>
        { name: 'styles', items: ['Font', 'FontSize'] },<br/>
        { name: 'colors', items: ['TextColor', 'BGColor'] }<br/>
    ];<br/>

我也尝试过这样添加:{ name: 'document', items: ['Source'] },工具栏的其余部分。

我错过了什么?

1 个答案:

答案 0 :(得分:0)

  

我没有得到Source按钮

因为“源”按钮不适用于内联编辑器。您可以使用sourcedialog插件(请参阅此处的示例 - http://sdk.ckeditor.com/samples/sourcearea.html)。

相关问题