Relative Content

Tag Archive for ckeditor5

custom classes for images in ckeditor 5

I’m having a hard time figuring out how to add an option to the toolbar that I can click to add a class to an image (class=”img-fluid”). I’d be happy with either a predefined button in the “Styles” drop down, or even a button on the image toolbar (either to type or a pre-defined button. I have tried 100 different ways, and I can’t seem to get any to work. Also, is there a way to automatically insert a class on an image that is uploaded (ie through ckfinder). Any help would be greatly appreciated. Thanks!

Why does CKEditor5 wrap images in a which renders as an “HTML Object” block?

I am in the process of updating an app from using CKEditor 4 to 5 (way late to the party, I know).
Why does CKEditor5 wrap my images in a span tag? I am not using any image plugins, the images are supported through the GeneralHtmlSupport plugin.
The span/HTML Object wrapper is affecting the flow of content and overriding some styles set on images. Is there any way to eliminate this?

Trouble programatically updating data in CKEditor 5

I am upgrading CKEditor from version 4 to 5. I have a custom plugin for adding images that uses a dialog that is shared in other parts of the application that do not use CKEditor, so the dialog is not created with CKEditor API (it is a Vue component).

CKEditor 5 model-createpositionat-offset-required error

I’m building an attachments plugin for CKEditor 5. Working from the inline widget example, I’ve been able to create the functionality for adding and removing a custom widget. I’m adding server-side checks to ensure that attachments are valid in case paste or undo cause attachment widgets to be created. If they aren’t, the client needs to replace the attachment widget with some error text. So far I’ve been able to remove the widget, but inserting a text node causes an exception: ‘CKEditorError: model-createpositionat-offset-required’. The exception isn’t thrown until after the callback function returns.

keditor5 HTML embed content disappears when I go back to edit

We recently upgraded from ckeditor 4 to ckeditor 5.
We have some complex tables in our pages (header rows alternating with body rows) that are modified by ckeditor 5’s filtering mechanism (all header rows are moved to the top).
I installed the ckeditor 5 HTML Embed module that should let me keep my tables but the HTML snippet disappears every time I go back to editing.