Constructor
new SectionContextMenu(x, y, options)
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
x | number | Preferred left position in viewport pixels. | ||||||||||||||||||||||||||||
y | number | Preferred top position in viewport pixels. | ||||||||||||||||||||||||||||
options | object | Options and callback functions for the menu.Properties
|
Example
new SectionContextMenu(event.clientX, event.clientY, {
number: 2,
name: 'Introduction',
onEditName: () => focusSectionNameInput(),
onRemove: () => workspace._removeSectionBreakWithHistory(beforeSegStart),
onDismiss: () => {},
});