on - Methods - Rubric Editor API

Rubric Editor API Methods

on()

Registers an event listener for the specified event.

You would want to use this to execute a callback function whenever the specified event is triggered.

Examples

editor.on('change', function (rubric) {
    console.log('rubric has changed', rubric);
});

Arguments

  • event string

    The name of the event to listen for.

  • callback function

    The function to execute when the event is triggered.

Return value

None (undefined).

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.