I am trying to insert some te开发者_高级运维xt content at the cursor position in my contentEditable iframe
for the following content(<span style='fontweight:bold'>ab</span>
)
ab... Here i place the cursor after ab and if if i execute the following command
document.execCommand('insertHTML',false,"c")
The resulting html is as follows
<span style='fontweight:bold'>ab</span>c
What i required is
<span style='fontweight:bold'>abc</span>
Note: This issue is only in Firefox, In chrome and safari i get the expected behavior which is needed for me.
Please suggest a way to get this behavior in FF
精彩评论