preview.changed - Events - Question Editor API

Question Editor API Events

preview:changed

Fires whenever the preview pane is updated, due to authors changing Question or Feature (Widget) attributes.

You would want to be notified about this event firing, because you might want to take some action once the preview is rendered, for example.

The on() or once() methods can be used to listen to this event.

Examples

// Run each time the event is fired
authorApp.on('widgetedit:preview:changed', function () {
    console.log('This code executes when the preview pane has updated.');
});

// Run only once, the first time the event is fired
authorApp.once('widgetedit:preview:changed', function () {
    console.log('This code executes only once, when the preview pane has updated.');
});
Was this article helpful?

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