CKEditor 5 inline widget -> add space before

247 views Asked by At

I wrote and using my custom CKeditor5 plugin. It is an inline-widget according to their docs. As you see on the screenshot, the widget is directly next to the . of the line before. Is it somehow possible to add a space before the inline-widget on creation when the previous character is not a space?

I am using editor.model.change( writer => editor.model.insertContent to insert the widget. But from there I have no cursorposition or whatsoever to find out what the previous character is.

enter image description here

0

There are 0 answers