Copy html from selection element.
npm install @jswork/copy-selection-element
import copySelectionElement from "@jswork/copy-selection-element";
const el = document.querySelector(".content");
const successful = copySelectionElement(el);
if (successful) {
// do somthing...
}
Code released under the MIT license.