Function: useMenu()
ts
function useMenu(editor, options): UseMenuResult;Menu button with one checked choice (e.g. the block type picker). Options are read once.
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
options | MenuOptions |
Returns
Example
tsx
const blockType = useMenu(editor, { items: basicBlockTypeItems(), label: 'Text style' })