jQuery   发布时间:2022-04-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了jquery – 如何在CKEditor中添加IFrame工具?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在自定义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'] }
];
};

大佬总结

以上是大佬教程为你收集整理的jquery – 如何在CKEditor中添加IFrame工具?全部内容,希望文章能够帮你解决jquery – 如何在CKEditor中添加IFrame工具?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。