CKEditor 4.22.1 error throws an error regarding version is not secure
Asked Answered
P

3

12

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?

Primalia answered 8/2 at 4:33 Comment(0)
S
18

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>"
/>

Solfeggio answered 8/2 at 5:5 Comment(2)
I am using a library named "ckeditor4-react" and the library doesn't provide an option to add the versionCheck option to the config file.Primalia
Updated answer to take into account your react layerSolfeggio
P
6

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…

Pallium answered 10/2 at 11:49 Comment(0)
C
0

add line versionCheck: false

     CKEDITOR.replace( 'U'R_text_area_name', {
                versionCheck: false,
filebrowserBrowseUrl: '/ckfinder/ckfinder.html',filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?type=Images'...,
Cereal answered 10/7 at 17:26 Comment(1)
Your answer is as the same as above answersRepetitive

© 2022 - 2024 — McMap. All rights reserved.