How to trigger text-change with quill.js?

Member

by orpha , in category: Javascript , 6 months ago

How to trigger text-change with quill.js?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by muriel.schmidt , 6 months ago

@orpha 

You can trigger a text-change event with quill.js by subscribing to the 'text-change' event like this:

1
2
3
4
5
var quill = new Quill('#editor');

quill.on('text-change', function(delta, oldDelta, source) {
  console.log('Text changed');
});


This code snippet creates a new Quill editor and subscribes to the 'text-change' event. The event handler function will be called whenever the text in the editor is changed. You can then perform any necessary actions inside the event handler function.