我正在自定义CKEditor工具栏.我想添加IFrame,怎么做?
我试过的代码:
CKEDITOR.replace( 'editor1',{
toolbar :
[
['SpellChecker','Bold','Italic','Underline','Subscript','Superscript'],['NumberedList','BulletedList','-','Blockquote','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','SpecialChar','IFrame'],'/',['Styles','Format','Font','FontSize' ],['TextColor','BGColor'],['Maximize']
]
});
最佳答案
我在自己的项目中使用ckeditor,我的配置文件看起来像这样.我用小写的’f’引用IFrame插件.
CKEDITOR.editorConfig = function (config) {
config.toolbar = 'Full';
config.toolbar_Full =
[
{ name: 'document',items: ['Source','Save','NewPage','Preview','Print','Templates'] },{ name: 'clipboard',items: ['Cut','Copy','Paste','PasteText','PasteFromWord','Undo','Redo'] },{ name: 'editing',items: ['Find','Replace','SelectAll','SpellChecker','Scayt'] },{ name: 'forms',items: ['Form','CheckBox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']
},{ name: 'basicstyles',items: ['Bold','Strike','Superscript','RemoveFormat'] },{ name: 'paragraph',items: ['NumberedList','Outdent','Indent','CreateDiv','JustifyBlock','BidiLtr','BidiRtl']
},{ name: 'links',items: ['Link','Anchor'] },{ name: 'insert',items: ['Image','Smiley','PageBreak','Iframe'] },{ name: 'styles',items: ['Styles','FontSize'] },{ name: 'colors',items: ['TextColor','BGColor'] },{ name: 'tools',items: ['Maximize','ShowBlocks','About'] }
];
};