79126695

Date: 2024-10-25 17:15:51
Score: 0.5
Natty:
Report link

I haven't found the official way of doing this but the editor uses a contenteditable div which you can target with .toastui-editor-contents. The below works:

document.querySelector('.toastui-editor-contents').addEventListener('input', fn);

The answer here explains how to detect a 'change' event for contenteditable elements.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: dashingdove