Textbox.io 2.x Documentation : editor.events.dirty.addListener()

Add a custom event listener to a Textbox.io editor dirty event with editor.events.dirty.addlistener().

You can detect that content has changed on an editor instance by attaching a callback function to the dirty event.

The dirty event only occurs when an instance's content has been updated or changed since it was set. See editor.content.isDirty() for more detail on the editor 'clean' and 'dirty' states.



// Add a custom event listener to the content dirty event
editor.events.dirty.addListener(function() {
        alert('The editor content is now dirty.');


callbackFunctionFunction executed when the editor's content state is considered dirty.


No return value.