Do not fire clipboardInput event when editor is read-only #2679
Labels
package:clipboard
type:improvement
This issue reports a possible enhancement of an existing feature.
Milestone
When the editor is read-only paste pipeline should be disabled for the entire editor. It should be not possible to paste anything to the editor with no exception. So instead of checking if the editor is readonly in all
clipboardInput
listeners https://github.com/ckeditor/ckeditor5-clipboard/blob/ae4ea8586a272e7e5486fc5ff9d62d427992eb57/src/clipboard.js#L137-L142 we should stop this event as soon as possible.We already have an issue with image pasting. It's possible to paste an image even when the editor is read-only because of two things:
ImageUploadCommand
(by design)https://github.com/ckeditor/ckeditor5-image/blob/6908ec6bcdce8e382b34e65fb6d62aa5c860a0b4/src/imageupload/imageuploadediting.js#L49
BTW the comment above this line of code is outdated.
The text was updated successfully, but these errors were encountered: