@univerjs/docs-toc-ui
此 API 頁面目前提供英文內容。程式碼簽名與識別符不隨介面語言變更。
Ribbon controls, context menus, configuration dialog, and active-range highlighting for a document table of contents.
TypeScript
import { UniverDocsTocPlugin } from '@univerjs/docs-toc'import { UniverDocsTocUIPlugin } from '@univerjs/docs-toc-ui'import DocsTocUIEnUS from '@univerjs/docs-toc-ui/locale/en-US'import { LocaleType } from '@univerjs/core'import '@univerjs/docs-toc-ui/lib/index.css'univerAPI.loadLocales(LocaleType.EN_US, DocsTocUIEnUS)univer.registerPlugin(UniverDocsTocPlugin)univer.registerPlugin(UniverDocsTocUIPlugin)Merge DocsTocUIEnUS into the application's locales configuration before opening a document. This package requires Docs, Docs UI, and the render engine. It accepts menu?: MenuConfig and exports DocsTocUIMenuSchema for menu customization. It has no Facade entry.
The current Docs core and advanced presets do not include these plugins; register both explicitly. See the table-of-contents guide.
你覺得這篇文檔如何?