Symfony – CKEditor 5 – How to insert image with image plugin?

I installed CKEditor 5 on my symfony project. I took the classic mode. And in the rendering, it contains an Image plugin:

enter image description here

But it seems that it is not functional. I can choose an image in my files, but nothing happens when I want to insert it.

How can I activate this plugin?

I use webpack-encore, and at the moment I have this:

app.js

//CKEditor

const ClassicEditor  = require("@ckeditor/ckeditor5-build-classic");
global.ClassicEditor  = ClassicEditor;

twig template

<script>
    ClassicEditor
        .create( document.querySelector( '#message_content' ))
        .catch( error => {
            console.error( error );
        } );
</script>

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *