Rich Text Editing - designMode vs contentEditable

Gary picture Gary · Aug 18, 2010 · Viewed 8.6k times · Source

When creating a cross-browser rich text editor. Which would you use and 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.

Answer

jvenema picture jvenema · Aug 18, 2010

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