Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

1.9 KB
Raw Blame

@univerjs/engine-render

npm version license downloads

@univerjs/engine-render is Univer's canvas rendering engine. It handles document layout, rendering primitives, interaction layers, scrolling, and zooming.

Package Overview

Package UMD global CSS Locales Facade entry Worker entry
@univerjs/engine-render UniverEngineRender No No No Yes

Installation

pnpm add @univerjs/engine-render
# or
npm install @univerjs/engine-render

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 { UniverRenderEnginePlugin } from '@univerjs/engine-render';

univer.registerPlugin(UniverRenderEnginePlugin);

Worker usage

On the main thread, import UniverRenderEnginePlugin from @univerjs/engine-render.

In the worker entry, import DocumentLayoutSession from @univerjs/engine-render/worker:

import { DocumentLayoutSession } from '@univerjs/engine-render/worker';

DocumentLayoutSession is a layout utility, not a plugin. For Docs layout workers, use the Docs worker setup, which manages the session lifecycle.

Resources