GrapesJS / ckeditor

This plugin replaces the default Rich Text Editor with the one from CKEditor
BSD 3-Clause "New" or "Revised" License
103 stars 102 forks source link

Adding a ckeditor plugin within grapesjs #4

Closed ghost closed 7 years ago

ghost commented 7 years ago

How can I add a plugin for ckeditor, which is initialized from within grapesjs script, and the config is inside grapesjs config.

ghost commented 7 years ago

I've successfully added a plugin in ckeditor_root/plugins/myplugin/ but it doesn't suit me, it can't be as a standalone plugin directory, I need it to be in gjs config or so.

artf commented 7 years ago

Hi @rafal-olszewski just as explained here http://docs.ckeditor.com/#!/guide/dev_plugins you have to drop your plugin inside plugins directory and call it via extraPlugins option, in grapesjs:

var editor = grapesjs.init({
      container : '#gjs',
      plugins: ['gjs-plugin-ckeditor'],
      pluginsOpts: {
        'gjs-plugin-ckeditor': {
          options: {
            extraPlugins: 'plugin-name',
          }
        }
      }
  });