gpt4 book ai didi

jquery - 如何在CKEditor中添加IFrame工具?

转载 作者:行者123 更新时间:2023-12-03 22:59:50 28 4
gpt4 key购买 nike

我正在自定义 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', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv',
'-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl']
},
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
{ name: 'insert', items: ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe'] },
'/',
{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
{ name: 'colors', items: ['TextColor', 'BGColor'] },
{ name: 'tools', items: ['Maximize', 'ShowBlocks', '-', 'About'] }
];
};

关于jquery - 如何在CKEditor中添加IFrame工具?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12740735/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com