var content = document.querySelector('[contenteditable]');
// 1. Listen for changes of the contenteditable element
content.addEventListener('input', function(event) {
// 2. Retrive the text from inside the element
console.log(content.innerHTML);
});