You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Unregister the addImageBlobHook using editor.removeHook('addImageBlobHook')
Drag & drop an image to the editor on Firefox (121.0.1) note: drop on an area of the editor outside of existing text, preferably on an empty editor.
The image will be added and in the Markdown view, it is rendered as a base64 data url.
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):
OS: Windows 10 Enterprise
Firefox 121.0.1
TUI editor 3.2.2
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: