Textbox.io 2.x Documentation : editor.events.dirty

The dirty event is triggered when an editors content is modified or has been explicitly set by editor.content.setDirty(true).


editor.events.dirty.addListener()Binds a function to an editor instance's dirty event.
editor.events.dirty.removeListener()Removes a function from an editor instance's dirty event.



editor.events.dirty.addListener(function () {
	// do something
	console.log('editor content is now dirty', editor.element())