开发者

execCommand("BackColor",false,"#000000") is causing my Whole Editable Iframe's Background Color TO Change!

开发者 https://www.devze.com 2023-03-22 16:37 出处:网络
ok I am making a WYSIWYG editor in Javascript and I Ran Into Problems when I execute: idframe.document.execCommand(\"BackColor\",false,\"#000000\");

ok I am making a WYSIWYG editor in Javascript and I Ran Into Problems

when I execute:

idframe.document.execCommand("BackColor",false,"#000000");

My Whole Iframe's Background Color Changes to Black. Even When There Is a Selection Made by The User. Thin only seems to happen in Firefox & Opera But Not in Internet Explorer & Chrome.This I开发者_运维知识库s Kinda Weird.


Use 'hilitecolor' instead, for none IE browsers. 'BackColor' on these browsers act differently from IE. It's used to change whole document color not just selected text.

0

精彩评论

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