Open lupinitylabs opened 5 months ago
By the way, this phenomenon only occurs when dragging the image to the toastui-editor
div. It does not happen if it is dragged into the toastui-editor-contents
div (so, for example, into existing text).
This should make the issue relatively easy to spot and to fix. Either we have two drop targets here that are handled differently or we can at least remove the editor toastui-editor
class div drop target?
Describe the bug
When I remove the default addImageBlobHook, drag & drop of images does not do anything on Chrome, which is expected behavior. However, Firefox still renders the image as a Base64 representation even with no registered hooks.
To Reproduce
Steps to reproduce the behavior:
editor.removeHook('addImageBlobHook')
note: drop on an area of the editor outside of existing text, preferably on an empty editor.
Expected behavior
I would expect consistent behavior across all browsers, i.e. not having base64 data urls being produced in Firefox with deactivated hooks.
Desktop (please complete the following information):
Additional context
It would probably be a good idea to have an option to deactivate the editor acting as a drag and drop target altogether. The described issue is a highly problematic with users dragging or pasting images in, resulting in megabytes of text and a bad UX if the form value has a max length validation or if you have to filter out those images afterwards, resulting in images just being gone.