开发者

Rich Text Editing - designMode vs contentEditable

开发者 https://www.devze.com 2023-01-12 16:00 出处:网络
When creating a cross-browser rich text editor.Which would you use a开发者_开发技巧nd why? Keep in mind that pasting has to be resilient to stand against multiple sources (notepad, word, other websit

When creating a cross-browser rich text editor. Which would you use a开发者_开发技巧nd why?

Keep in mind that pasting has to be resilient to stand against multiple sources (notepad, word, other websites) and it should not be dependent on any Javascript libraries.


You probably want contentEditable. designMode applies to the document, contentEditable to a specific element and its children.

http://blog.whatwg.org/the-road-to-html-5-contenteditable

0

精彩评论

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

关注公众号