widgetedit.preview.changed - Events - Author API

Author API Events


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 once() method can be used to listen to this event.


// 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.