Skip to content

Function: useToolbar() ​

ts
function useToolbar(editor, options): UseToolbarResult;

Accessible toolbar behaviour. Options are read once, like useEditor().

Parameters ​

ParameterType
editorEditor
optionsToolbarOptions

Returns ​

UseToolbarResult

Example ​

vue
<div v-bind="toolbar.getRootProps()">
  <button v-for="item in toolbar.items" :key="item.id" v-bind="toolbar.getItemProps(item.id)">…</button>
</div>