Skip to main content

Event Handling

Attaching Event Listeners#

You can attach event listeners with the richtext.events.on() method:

richtext.events.on("Change", function(action, canUndo, canRedo){    // your code here});

Related sample: RichText. Events

note

The names of events are case-insensitive.

Detaching Event Listeners#

To detach events, use richtext.events.detach():

var change = richtext.events.on("Change", function(action, canUndo, canRedo){     // your code here});richtext.events.detach(change);

Calling Events#

To call events, use richtext.events.fire():

richtext.events.fire("name", args);// where args is an array of arguments

The list of events is available in the API section.