简体   繁体   English

如何将自定义插件添加到 ckeditor4-vue?

[英]How do I add custom plugins to ckeditor4-vue?

I have some custom plugins that are made for the base ckeditor 4 and I want to add them to the ckeditor4-vue for a new project that I working on.我有一些为基础 ckeditor 4 制作的自定义插件,我想将它们添加到我正在处理的新项目的 ckeditor4-vue 中。 How should I integrate them with the vue ckeditor?我应该如何将它们与 vue ckeditor 集成?

I already have a config file from my original work calling the plugins and how they are integrated in the toolbar if that helps.我已经从我的原始工作中获得了一个配置文件,调用插件以及它们如何集成到工具栏中,如果有帮助的话。

Thanks in advance!提前致谢!

I just added their names on config我刚刚在配置中添加了他们的名字

config: {
    toolbarGroups: this.toolbarGroups,
    height: this.height,
    language: this.language,
    extraPlugins: 'fakeobjects,iframe,sourcedialog',
    removePlugins: 'sourcearea'
}

Here is my solution.这是我的解决方案。 First you have to download ckeitor's source files.首先你必须下载 ckeitor 的源文件。 And specify "editor-url" where you specify the path to the local ckeditor's sources.并指定“editor-url”,您可以在其中指定本地 ckeditor 源的路径。 After that you can install any plugins as you do in simple ckeditor4.之后,您可以像在简单的 ckeditor4 中一样安装任何插件。 Here is the the guid https://ckeditor.com/docs/ckeditor4/latest/guide/dev_plugins.html这是指南https://ckeditor.com/docs/ckeditor4/latest/guide/dev_plugins.html

<ckeditor
   :editor-url="/js/ckeditor/"
   v-model="text"
   :config="{
      ...
      extraPlugins: 'iframe',
   }"
></ckeditor>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM