I want retrieve the text content from a contentEditable div through javascript. What are the options of doing this? I've tried innerHTML but it doesn't work.
Why not use textContent for this:
var contenteditable = document.querySelector('[contenteditable]'), text = contenteditable.textContent;
http://jsfiddle.net/E4W8y/1/
2.1m questions
2.1m answers
60 comments
57.0k users