5

After the release of Strapi 4, the CKEditor library for Strapi is no longer supported. And when trying to follow the documentation it is also not very clear if it is with component injection or some other procedure.

Strapi 4 Docs

WYSIWYG editor To change the current WYSIWYG, you can either install a third-party plugin, or take advantage of the bootstrap lifecycle (see Admin Panel API).

In the Strapi 4 presentation, Rémi de Juvigny, uses component injection, but it is only for the sidebar, not for changing any specific content-type collection.

Has anyone made any progress with this new version of Strapi and CKEditor?

  • 1
    Try this library, it doesn't seem stable but it works. https://www.npmjs.com/package/@colton75/strapi-plugin-ckeditor5. Best of luck! – Ankur Datta Dec 08 '21 at 10:11

1 Answers1

1

On Strapi V4 Now we should use:

app.addFields({type:'wysiwyg',Component:Editor})

insted of

strapi.registerFields({type:'wysiwyg',Component:Editor})

Eg.

import pluginPkg from '../../package.json';
import pluginId from './pluginId';
import Initializer from './components/Initializer';
import Editor from './components/Editor';
const name = pluginPkg.strapi.name;

export default {
  register(app) {
    
    app.registerPlugin({
      id: pluginId,
      initializer: Initializer,
      isReady: false,
      name,
    });

    app.addFields({type:'wysiwyg',Component:Editor})
  }
  
};