Open githoniel opened 3 years ago
I dont think this is a bug. In this link instead of rendering image I rendered type of element. If you try copying and pasting it you can see that it works as expected.
It works because we are copying and pasting text content so it works but when copying and pasting image
we have to explicitly tell how to render these type of content.
For reference you can take a look at source code of image examples
I dont think this is a bug. In this link instead of rendering image I rendered type of element. If you try copying and pasting it you can see that it works as expected.
It works because we are copying and pasting text content so it works but when copying and pasting
image
we have to explicitly tell how to render these type of content.For reference you can take a look at source code of image examples
Image element is block void element in examples while in this issue it is inline void element
Description can't copy/cut node when select inline-void element alone
Recording just make a inline void element and press ctrl+c, it will not by copyed
Sandbox
https://codesandbox.io/s/slate-reproductions-forked-1omtu?file=/index.js
Expectation
after investigation, I found that inline void element will rendered with
contentEditable={false}
Environment