CKEditor, how to remove blank paragraphs before and between widgets

If you have an empty paragraph before the widgets, you cannot delete it, nor can you delete an empty paragraph after or between widgets, except by viewing the source.

This can be seen on the CKEditor demo page here: http://ckeditor.com/demo#widgets

just clear all content to run, add a paragraph, add a widget and try to delete the first paragraph.

Please note that in my configuration, I do not fill in the blank paragraphs with an inextricable space, and I get the same behavior, so this does not look like a link. enter image description here

This really creates a problem for the content management system.

+5
source share
1 answer

This is a known issue, but there is no patch yet. This will require additional rules for deleting and returning, so if the current paragraph is already empty, it should delete it, and not focus the widget. This code can land, for example, here: https://github.com/ckeditor/ckeditor-dev/blob/3a10930/core/selection.js#L339-L365 .

+6
source

All Articles