GrapesJS / ckeditor

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

Upgrade ckeditor version error #88

Open casesolved-co-uk opened 1 month ago

casesolved-co-uk commented 1 month ago

I'm using plugin version 1.0.1 but am getting the following error when editing a text component:

Screen Shot 2024-07-12 at 23 49 28

It wants version 4.21.0 to go to 4.24.0

Trying to upgrade it looks like only the typescript definitions are used: "@types/ckeditor4": "^4.20.0" Which only goes up to 4.20.7

The website says this:

Keep CKEditor 4safe and secure CKEditor 4 reached its End-of-Life with no updates, security patches or bug fixes.

Looks like they're on ckeditor version 5:

https://www.npmjs.com/package/ckeditor5 https://github.com/ckeditor/ckeditor5#

Are there any plans to upgrade?

Related:

30

63

allphat commented 1 month ago

you can pass an option to the editor plugin. the ckeditor4 option to pass is "versionCheck: false"

patriktoth67 commented 6 days ago

Hello!

After adding this option, I still see the error popup.

I can't seem to figure out what the issue is.

<script setup>
import grapesjs from "grapesjs";
import "grapesjs/dist/css/grapes.min.css";
import grapesjsPresetNewsletter from "grapesjs-preset-newsletter";
import grapesjsPluginCkeditor from "grapesjs-plugin-ckeditor";
import grapesJSMJML from "grapesjs-mjml";

const editor = grapesjs.init({
        container: "#gjs",
        fromElement: true,
        plugins: [grapesjsPresetNewsletter, grapesjsPluginCkeditor, grapesJSMJML],
        pluginsOpts: {
            [grapesjsPluginCkeditor]: {
                versionCheck: false,
            },
        },

        ...

Any ideas why?

allphat commented 6 days ago

you have to declare versionCheck under "options" something like this

const editor = grapesjs.init({
        container: "#gjs",
        fromElement: true,
        plugins: [grapesjsPresetNewsletter, grapesjsPluginCkeditor, grapesJSMJML],
        pluginsOpts: {
            [grapesjsPluginCkeditor]: {
              options: {  
                versionCheck: false,
                //other options...
               }
            },
        },

        ...
patriktoth67 commented 6 days ago

Ahh thank you for the quick help!:)

casesolved-co-uk commented 5 days ago

There's an example here: https://github.com/GrapesJS/ckeditor/issues/30#issuecomment-2217455678