Created By: @Sazzad Sazib
You Can modify this and work in your own project
Note: to get onChange add this
document.getElementById("editor").addEventListener("input", function(e) {
console.log(e.target.innerHTML)
}, false);
// dont foget to use removeEventListenr