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

editor.events.focus is a grouping of methods related to the focus event for a Textbox.io Editor instance. 

The focus event is triggered when an editor receives focus.

Methods

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

 

 

Example
editor.events.focus.addListener(function () {
	// do something
	console.log('this editor has focus', editor.element())
});