Support copying HTML to the clipboard.
Currently we have support for:
clipboard.copyText("Hello world");
Request is for:
clipboard.copyHTML("<b>Hello world</b>");
Use Case
Phil is a web developer instructor who is making documentation using Adobe XD. He is creating a plugin to export SVG to the web.
In his plugin he uses the clipboard API to copy the SVG to the clipboard but when he pastes it into other programs and web interfaces the code is mangled into less than and greater than encoding.
Example, <svg
instead of <svg
.
He noticed that if he copies the code to the clipboard as HTML the formatting is preserved when pasting into other programs.