Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CKEditor 4.22.1 error throws an error regarding version is not secure

Currently, I am using CKEditor in my React app. To integrate into the react application I use ckeditor4-react of version 4.1.2. It was working completely fine but today the editor shows an error "This CKEditor 4.22.1 (Standard) version is not secure. Consider upgrading to the latest one, 4.24.0-lts.".

I do not want to upgrade the version and I just want to remove the error. How can I remove it?

like image 335
Shiva Aryal Avatar asked Dec 21 '25 19:12

Shiva Aryal


2 Answers

Solution 1 (Preferred)

You can add config.versionCheck = false; to the config.js file within the ckeditor directory.

// ckeditor/config.js

CKEDITOR.editorConfig = function( config ) {
    config.versionCheck = false;
};

Solution 2 (Hacky)

Alternatively, a more "hacky" method is to manually increment the version number to one that doesn't throw an error.

The version is declared in ckeditor.js in the first line. Look for:

version:"4.22.1"

and simply update it to

version:"99.4.22.1"

Note (!)

Please be aware that you will be running a version of ckeditor with known vulnerabilities with both of these methods.

React Library Specific

Because you're using a wrapper library "ckeditor4-react" you'll need to work out how that library passes config values to the core ckeditor4 library. The documentation here says you can do it in the following way:

<CKEditor
  config="{{versionCheck: false}}"
  initData="<p>Initial content in here</p>"
/>

like image 148
cam Avatar answered Dec 24 '25 09:12

cam


If you are using FOSCKEditorBundle with Symfony, add this to your configuration file // config/packages/fos_ckeditor.yaml

         versionCheck : false

Or in basic init step , e.g:

...

ClassicEditor
    .create(document.querySelector('#editor'), {
        versionCheck: false
    })

...

source: This CKEditor 4.22.1 version is not secure. Consider upgrading…

like image 27
Zatla00 Avatar answered Dec 24 '25 08:12

Zatla00



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!