API 참조

@univerjs/docs-toc

이 API 페이지의 본문은 현재 영어로 제공됩니다. 코드 시그니처와 식별자는 언어에 따라 바뀌지 않습니다.

Table-of-contents commands for Univer Docs. Register this model plugin after the Docs core plugins; add @univerjs/docs-toc-ui for the editor controls.

TypeScript
import { UniverDocsTocPlugin } from '@univerjs/docs-toc'univer.registerPlugin(UniverDocsTocPlugin)

Commands

Call commands through univerAPI.executeCommand() after opening a document and placing a text selection.

ExportParameters
InsertTableOfContentsCommandOptional unitId, levels, showPageNumbers, rightAlignPageNumbers, tabLeader, format, and title.
UpdateTableOfContentsCommandOptional unitId, rangeId, and mode: 'pageNumbersOnly' | 'entireTable'.
DeleteTableOfContentsCommandOptional unitId and rangeId.

The root also exports their parameter types, TableOfContentsFormat, TableOfContentsTabLeader, and findTableOfContentsAtOffset.

The updater evaluates outline-level TOC instructions (\o). Other Word switches remain in FIELD metadata but are not all evaluated. The inserted TOC is document content; the outline navigation panel is a separate feature.

This package has no stylesheet, locales, or Facade entry. See the table-of-contents guide.

이 가이드는 어떠셨나요?

© 2026 DreamNum Co., Ltd.