JavaScript document.execCommand() own tags
Thanks to dandavis.
The following works very well:
document.execCommand("insertHTML", false, "<span class='own-class'>"+ document.getSelection()+"</span>");
Thanks to dandavis.
The following works very well:
document.execCommand("insertHTML", false, "<span class='own-class'>"+ document.getSelection()+"</span>");