Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/464.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript CKEditor:在文本部分粘贴url时如何删除自动嵌入行为(4.7版)_Javascript_Ckeditor_Ckeditor4.x - Fatal编程技术网

Javascript CKEditor:在文本部分粘贴url时如何删除自动嵌入行为(4.7版)

Javascript CKEditor:在文本部分粘贴url时如何删除自动嵌入行为(4.7版),javascript,ckeditor,ckeditor4.x,Javascript,Ckeditor,Ckeditor4.x,我使用的是CKEditor版本4.7 在config.js文件中,我集成了一些插件,用于在外部站点(如youtube、twitter、facebook等)上自动嵌入链接 但是,对于某些页面,当我在ckeditor的文本部分复制url时,我看到了一种自动嵌入行为。我需要禁用它,如果只有在我单击选项卡上的特定图标时才有这种行为,那会更好。只有当我单击该图标,而不是简单地将链接url粘贴到CKEditor上时,才可以显示iframely embedded?好的,我找到了解决方案,有属性removePl

我使用的是CKEditor版本4.7

在config.js文件中,我集成了一些插件,用于在外部站点(如youtube、twitter、facebook等)上自动嵌入链接


但是,对于某些页面,当我在ckeditor的文本部分复制url时,我看到了一种自动嵌入行为。我需要禁用它,如果只有在我单击选项卡上的特定图标时才有这种行为,那会更好。只有当我单击该图标,而不是简单地将链接url粘贴到CKEditor上时,才可以显示iframely embedded?

好的,我找到了解决方案,有属性removePlugins为每个组件执行此操作,在这种情况下,我删除了Embeddebase和嵌入插件,如下所示:

CKEDITOR.replace('text1', {
       allowedContent : true,
       autoParagraph: false,
       removePlugins: 'embedbase, embed',
       toolbar : [ ['Source'], ['Bold','Italic','Underline'], [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ], [ 'Styles', 'Format' ], ]});
CKEDITOR.replace('text1', {
       allowedContent : true,
       autoParagraph: false,
       removePlugins: 'embedbase, embed',
       toolbar : [ ['Source'], ['Bold','Italic','Underline'], [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ], [ 'Styles', 'Format' ], ]});