Skip to content
Document Authoring DA  API Docs v1.9.1
npmGitHub

defaultToolbarConfigNEW

const defaultToolbarConfig: ToolbarConfig

Get the default toolbar configuration. Can be used as-is or customized.

import { defaultToolbarConfig } from '@nutrient-sdk/document-authoring';
// remove the first two items
editor.setToolbarConfig({
...defaultToolbarConfig,
items: defaultToolbarConfig.items.slice(2),
});
// add a custom item
editor.setToolbarConfig({
...defaultToolbarConfig,
items: [...defaultToolbarConfig.items, myCustomItem],
});

CustomAction for the shape of custom items.