onSelectionChange()

This method registers a callback function as an event handler. The event is triggered when the user changes the element selection in the editor.

Syntax

Copy

Parameters

NameTypeDescription
handler(elements: Element[]) => voidCallback function that receives an array of selected elements.

Example

Copy
Did this help?