html5 - JavaScript document.execCommand() own tags -
i've found interesting! execcommand function applies many useful features. possible work own wraps? like:
document.execcommand("stylewithcss", false, "<span class='own-class'>");
everything related i've found pretty old… maybe 1 of knows workaround or something.
thanks dandavis.
the following works well:
document.execcommand("inserthtml", false, "<span class='own-class'>"+ document.getselection()+"</span>");
Comments
Post a Comment