ToolbarConfigNEW
ToolbarConfig:
{}Toolbar configuration
Example
Section titled “Example”
// Add custom action and toolbar buttoneditor.setActions([ { id: 'custom.save', label: 'Save', handler: async () => { const doc = await editor.currentDocument().saveDocument(); }, },]);editor.setToolbarConfig({ items: [ { type: 'separator', id: 'sep-custom' }, { type: 'action', id: 'save-btn', actionId: 'custom.save' }, ],});
// Create a minimal toolbar with essential formattingeditor.setToolbarConfig({ items: [ { type: 'built-in', id: 'undo', builtInType: 'undo' }, { type: 'built-in', id: 'redo', builtInType: 'redo' }, { type: 'separator', id: 'sep-1' }, { type: 'built-in', id: 'bold', builtInType: 'bold' }, { type: 'built-in', id: 'italic', builtInType: 'italic' }, { type: 'built-in', id: 'underline', builtInType: 'underline' }, { type: 'separator', id: 'sep-2' }, { type: 'built-in', id: 'align-left', builtInType: 'align-left' }, { type: 'built-in', id: 'align-center', builtInType: 'align-center' }, { type: 'built-in', id: 'align-right', builtInType: 'align-right' }, ],});
// Customize default toolbar by filtering/adding itemsconst customItems = [ { type: 'separator', id: 'custom-sep' }, { type: 'action', id: 'save-btn', actionId: 'custom.save' },];ToolbarItemfor the different types of toolbar items.UIOptions.toolbarfor setting toolbar during editor creation.
Properties
Section titled “Properties”items?
Section titled “items?”
optionalitems:ToolbarItem[]
Array of toolbar items to display