开发者

Substitute techniques for "document.execCommand"

I am currently working on a WYSIWYG web editor using only Jquery and CSS.

I was sort of annoyed by the inconsistencies of execCommand across all browsers.

Is there another technique you can achieve开发者_JAVA技巧 something similar to execCommand does. Such a detecting highlighted text and change its CSS settings?

If someone could inspire me with the right direction I really appreciate


For applying a CSS class to a range or selection, you can use my Rangy library and its CSS class applier module (demo). I'm also working on a replacement for document.execCommand() built on Rangy but that's in the fairly early stages at the moment (bold demo).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜