如何在CkEditor的替换功能中禁用插件

How to disable a plugin in the replace function of CkEditor?

本文关键字:插件 功能 替换 CkEditor      更新时间:2024-06-15

我想禁用某些CKEditor textareas上的图像上传。我不想通过config.js文件来做这件事,因为它将禁用所有的textareas。如何使用.replaces方法执行此操作?

示例:

CKEDITOR.replace("meTextarea", {
   // what should I write here to disable the plugin?
});

提前感谢

您可以简单地将选项传递给CKEDITOR.replace()函数:

CKEDITOR.replace('meTextarea', {
   removePlugins: 'filebrowser'
});

在此处阅读有关设置配置的更多信息:设置配置。

如果您无法从给定的函数中禁用if,请在css 中尝试此操作

.ck-file-dialog-button
{
  display:none !important;
}

这将在不干扰用户界面的情况下隐藏图像上传按钮。

.ck-dropdown{
    display:none !important;
}