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

ToolbarBuiltInItemNEW

ToolbarBuiltInItem:

{
type: "built-in";
builtInType: "undo" | "redo" | "bold" | "italic" | "underline" | "strikethrough" | "subscript" | "superscript" | "text-color" | "highlight-color" | "align-left" | "align-center" | "align-right" | "align-justify" | "bulleted-list" | "numbered-list" | "decrease-indent" | "increase-indent" | "clear-formatting" | "formatting-marks" | "zoom" | "mobile-lock" | "font-family" | "font-size" | "style-menu" | "line-spacing-menu" | "page-setup-menu" | "insert-menu" | "table-menu" | "download-menu" | "ui-settings-menu";
}

Built-in toolbar item - uses original toolbar components directly

These are pre-built toolbar components that come with the SDK. Each has its own UI and functionality built-in.

import { defaultToolbarConfig } from '@nutrient-sdk/document-authoring';
// Add undo/redo buttons
editor.setToolbarConfig({
items: [
{ type: 'built-in', id: 'undo-btn', builtInType: 'undo' },
{ type: 'built-in', id: 'redo-btn', builtInType: 'redo' },
],
});
// Add text formatting buttons
editor.setToolbarConfig({
items: [
{ type: 'built-in', id: 'bold-btn', builtInType: 'bold' },
{ type: 'built-in', id: 'italic-btn', builtInType: 'italic' },
{ type: 'built-in', id: 'underline-btn', builtInType: 'underline' },
],
});
// Add dropdown menus
editor.setToolbarConfig({
items: [
{ type: 'built-in', id: 'font-menu', builtInType: 'font-family' },
{ type: 'built-in', id: 'size-menu', builtInType: 'font-size' },
{ type: 'built-in', id: 'insert', builtInType: 'insert-menu' },
],
});

ToolbarConfig for full toolbar configuration.

type: "built-in"


id: string

Unique ID for this toolbar item


builtInType: "undo" | "redo" | "bold" | "italic" | "underline" | "strikethrough" | "subscript" | "superscript" | "text-color" | "highlight-color" | "align-left" | "align-center" | "align-right" | "align-justify" | "bulleted-list" | "numbered-list" | "decrease-indent" | "increase-indent" | "clear-formatting" | "formatting-marks" | "zoom" | "mobile-lock" | "font-family" | "font-size" | "style-menu" | "line-spacing-menu" | "page-setup-menu" | "insert-menu" | "table-menu" | "download-menu" | "ui-settings-menu"

The type of built-in toolbar component to use