开发者

RichText :inserthtml not working properly in Firefox

开发者 https://www.devze.com 2023-03-13 22:22 出处:网络
I am trying to insert some te开发者_高级运维xt content at the cursor position in my contentEditable iframe

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

0

精彩评论

暂无评论...
验证码 换一张
取 消