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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -