When pasting, extract the contents of the clipboard and convert the format before pasting

I want to implement that in a rich text editor, when pasting, the html content in the clipboard is automatically converted to markdown content and then pasted into the editor, as if js does not support access to the clipboard. Do you have any solutions?


enter control event onpaste


js can get clipboard content. Chrome browser and IE use different codes, which need to be judged and dealt with. Many can be found on the Internet. You can search

.
Menu