API

@univerjs/drawing-ui

この API ページの本文は現在英語です。コードのシグネチャと識別子は表示言語によって変わりません。

Shared drawing UI components and services for Univer.

TypeScript
import { UniverDrawingUIPlugin } from '@univerjs/drawing-ui'univer.registerPlugin(UniverDrawingUIPlugin, {})

Entry Points

  • Locale: @univerjs/drawing-ui/locale/*

The root entry exports IImagePopupMenuProps for custom image popup components. Its popup.extraProps contains menu items and optional unitId, subUnitId, drawingId, and toolbar variant. Use it with COMPONENT_IMAGE_POPUP_MENU when registering an override.

OLE previews

registerOlePreviewRenderer(type, renderer) registers a factory receiving IOlePreviewContext and returning an IDisposable. Host UI packages register their Office preview renderers; applications can supply one for a custom host.

createOlePreviewViewer(options) creates an isolated temporary Univer instance and returns its disposer. Supply container, data, type, the host's locale, theme, and config services, a register(univer) callback for the product plugins, and setReadonly(permissions, unitId) to enforce read-only permissions. An optional onResize(render) callback handles product-specific layout. Dispose the viewer when its container closes. The viewer does not add a persisted document to the host or participate in its collaboration session.

IUniverDrawingUIConfig

TypeScript
import type { MenuConfig } from '@univerjs/ui'export interface IUniverDrawingUIConfig {  menu?: MenuConfig}

このガイドはいかがですか?

© 2026 DreamNum Co., Ltd.