pub struct NodeMenu<O> { /* private fields */ }Expand description
LexicalNodeMenuPlugin: a menu anchored at the node node_key, open
while it is set and the node exists; set_node_key
is the nodeKey prop.
Implementations§
Source§impl<O: MenuOption + 'static> NodeMenu<O>
impl<O: MenuOption + 'static> NodeMenu<O>
Sourcepub fn new(
editor: &Editor,
on_select_option: MenuSelectOption<O>,
command_priority: i8,
) -> Self
pub fn new( editor: &Editor, on_select_option: MenuSelectOption<O>, command_priority: i8, ) -> Self
A closed node menu that runs on_select_option for the chosen
option, with no query, whose keyboard commands are at
command_priority (JS’s commandPriority, COMMAND_PRIORITY_LOW
by default).
The menu.
Sourcepub fn set_node_key(&self, key: Option<NodeKey>)
pub fn set_node_key(&self, key: Option<NodeKey>)
positionOrCloseMenu() for a new nodeKey: opens the menu at the
node when it exists, and closes it without a key.
Trait Implementations§
Auto Trait Implementations§
impl<O> !RefUnwindSafe for NodeMenu<O>
impl<O> !Send for NodeMenu<O>
impl<O> !Sync for NodeMenu<O>
impl<O> !UnwindSafe for NodeMenu<O>
impl<O> Forget for NodeMenu<O>
impl<O> Freeze for NodeMenu<O>
impl<O> Move for NodeMenu<O>
impl<O> Unpin for NodeMenu<O>
impl<O> UnsafeUnpin for NodeMenu<O>where
MenuState<O>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more