It is possible to drop images in text editor even if we set explicitly formats allowed. It does not work on insert/paste but it works when you drag and drop an image. Tried to add logic like in the other events to only allow whitelisted formats but couldn't find the method, and modules are registered previous quill instance is created.
Steps for Reproduction
Expected behavior:
If Image is not allowed in formats, editor should not modify text/html.
Actual behavior:
An img node is created after you drop an image
Include browser, operating system and respective versions
Chrome 69.0.3497.100
High Sierra
Version:
1.3.6
See #1108
I have to agree with the expected behaviour. Since image is removed in whitelisted format it should not be allowed at all.
In the meantime, I ended up disabling drop event on the editor instance. Works but user can't drop anything including text and stuff. Well, I guess they can just copy & paste for those.
My solution : add editor div ondragover="return false;"
Most helpful comment
My solution : add editor div ondragover="return false;"