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

defaultToolbarConfig>= v1.9.0

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.