GrapesJS / ckeditor

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

`Plugin gjs-plugin-ckeditor not found` although following the readme #43

Closed SirajKakeh closed 1 year ago

SirajKakeh commented 3 years ago

I'm trying to work the bare minimum of this plugin as per the instructions found in the Readme.md. My current code structure is: index.html:

  . . .
  <script src="node_modules/grapesjs/dist/grapes.min.js"></script>
  <script src="node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js"></script>
  <script src="node_modules/grapesjs-plugin-ckeditor/src/index.js"></script>

  </head>

<body>
  <div id="gjs"></div>
</body>
<script>
  const editor = grapesjs.init({
    container: '#gjs',
    components: '<div class="txt-red">Hello world!</div>',
    style: '.txt-red{color: red}',
    plugins: ['gjs-plugin-ckeditor'],
    pluginsOpts: {
        'gjs-plugin-ckeditor': {/* ...options */}
    }
  });
</script>

but I'm getting this warning: Plugin gjs-plugin-ckeditor not found can you please link or refer an updated way to run this? also I have no problem creating a pr for the readme as soon as I figure this out

BilalMustafa-cs commented 3 years ago

@SirajKakeh do you solved this issue? i'm facing the same. kindly share if u solved.

@artf please help to solve this issue.

ronaldohoch commented 3 years ago

Readding the code, i was able to do it putting the ckeditor code before the script of the plugin.

<script src="./js/grapes/grapes.min.js"></script>
...other plugins
<script src="./js/custom-ckeditor/ckeditor.js"></script>
<script src="./js/grapes/plugins/grapesjs-plugin-ckeditor.min.js"></script>

Also, o have needed to create a custom build and removing the lines from 47 to 55.