Listening to changes of contenteditable

suggest change

change does not fire for a contenteditable element. keydown and keyup do. keypress is deprecated. The input event fires when the contents change, including changes that do not come from the keyboard. contenteditableHtmlElement below is an element whose contenteditable attribute is set:

contenteditableHtmlElement.addEventListener("input", function() {
    console.log("contenteditable element changed");
});

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents