With a div contenteditable, when executing document.execCommand('insertImage', null, img_url);, it will add an image element in that div, but is there any way to add a class attribute for that image element? I don’t think insertHTML is a good solution for compatibility issue.
With a div contenteditable, when executing document.execCommand(‘insertImage’, null, img_url); , it will add an
Share
I think you could use CSS CLass applier: http://code.google.com/p/rangy/wiki/CSSClassApplierModule