Facade API
Learn how to use Facade API in a Univer Boards application.
Facade API is the application-facing layer over Univer services and unit models. It covers the common Board operations: creating a board, reading the active page, adding elements, updating containers, and managing swimlanes.
Caution
Board mutations are synchronous and return boolean or a nullable handle. Check the return value before reading the result.
Enable the facade entry
Boards is distributed as Web SDK plugins. Import the facade entry for the Board capability that the application uses:
TypeScript
import { FUniver } from '@univerjs/core/facade'import '@univerjs-pro/boards/facade'Create the API object after the Univer instance and the required plugins are registered:
TypeScript
const univerAPI = FUniver.newAPI(univer)Next steps
The Facade extension is now enabled. The following pages describe the next topics:
- General API covers shared commands, events, undo and redo, UI extensions, networking, enums, and utilities.
- Univer Boards API describes how to create and read Boards.
- Elements and the Boards facade reference describe Board operations in detail.
How is this guide?