Phenomenon
When attempting to paste images (from clipboard) into a contenteditable region, the behavior is inconsistent across browsers. Some browsers ignore the paste, while others may insert a placeholder or fail silently.
Reproduction example
- Copy an image to the clipboard (e.g., from an image editor or screenshot).
- Create a contenteditable div.
- Focus the contenteditable.
- Paste (Cmd+V or Ctrl+V).
- Observe what happens.
Observed behavior
- In Chrome on macOS, pasting images may be ignored or fail silently.
- No visual feedback indicates that the paste was attempted.
- The image data may be available in the clipboard but not inserted.
Expected behavior
- Images should be pasted as
<img>elements with appropriatesrcattributes. - Or, the
beforeinputevent should allow intercepting and handling image paste. - Clear feedback should indicate success or failure of the paste operation.