Facade API
Learn how to enable Facade API in a Univer Slides application.
Univer's plugin architecture exposes low-level services and unit models, while Facade API provides a simpler application-facing entry point. This page only covers enabling that layer in a Slides application; the Core Features pages explain how to operate presentations and slides.
Caution
Some Facade methods are asynchronous. Await a mutation before reading the result when the next step depends on that change.
Preset mode
Univer Slides does not currently provide a preset mode. Slides is distributed as Web SDK plugins, so enable Facade API through plugin mode.
Plugin mode
Installation
Import the core Slides Facade entry before creating the API object:
import { FUniver } from '@univerjs/core/facade'import '@univerjs-pro/slides/facade'Optional Slides packages, such as Tables, Charts, Import & Export, and Printing, document their own Facade entries on their feature pages.
Usage
Create the API object after the Univer instance and required plugins are registered:
const univerAPI = FUniver.newAPI(univer)Next steps
Continue with Univer Slides API for presentation units and common domain entry points. Add optional APIs from Table, Charts, Printing, and Import and export only when your application uses those packages.
How is this guide?