I have some html code, for example,
<div><span style="background:yellowgreen">name:</span><span>Rose</span></div>
,
I want to copy and paste the code into rich text format, which can resolve the html code into real DOM.
I know that there is js clipBoardData, zeroClipBoard, clipBoard-polyfill, but they all have a compatibility problem. I want to write one, which can work for most browsers, how can I do this? some idea?
In my mind, each browser can resolve html
code, and the stuff I copied also written in html
, when I paste it in someplace, such as textarea
in some website, the browser can interpret the stuff and display it. But how to achieve this? Thanks in advance!
test
to my clipboard, then past it into my email(output page), I want to see it interprettest
into html view(large and bold fonts) – Feeoly Dec 12 '18 at 08:42