Facade API
Learn how to enable Facade API in a Univer Slides application.
Univer's plugin architecture exposes low-level services and unit models, and Facade API provides a simpler entry point that applications use directly. This page covers only how to enable that layer in a Slides application; the Core Features pages describe how to operate presentations and slides.
Caution
Some Facade methods are asynchronous. When the next step depends on the change, await the change before reading the result.
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 the required plugins have been registered:
const univerAPI = FUniver.newAPI(univer)Preset mode
Univer Slides does not provide a preset mode yet. Slides is distributed as Web SDK plugins, so Facade API is enabled through plugin mode.
Next steps
Continue with Univer Slides API for presentation units and the common domain entry points. Add the optional APIs from Table, Charts, Printing, and Import and export only when the application uses those packages.
How is this guide?