Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@univerjs/docs

npm version license downloads

@univerjs/docs provides the document data model and core rich-text operations for Univer Docs, independent of the UI layer.

Package Overview

Package UMD global CSS Locales Facade entry Worker entry
@univerjs/docs UniverDocs No No Yes Yes

Installation

pnpm add @univerjs/docs
# or
npm install @univerjs/docs

Usage

Start with the integration setup for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.

import { UniverDocsPlugin } from '@univerjs/docs';

univer.registerPlugin(UniverDocsPlugin);

Worker usage

On the main thread, import UniverDocsLayoutWorkerPlugin from @univerjs/docs. Register it alongside UniverDocsPlugin and set workerFactory to a function that creates the layout worker.

In the worker entry, import UniverDocsWorkerPlugin from @univerjs/docs/worker:

import { UniverDocsWorkerPlugin } from '@univerjs/docs/worker';

univer.registerPlugin(UniverDocsWorkerPlugin);

Integration Notes

  • Import @univerjs/docs/facade when using this package through Univer Facade APIs.

Resources