Facade API
Learn how to use Facade API in a Univer Boards application.
Facade API provides an application-facing layer over Univer services and unit models. Use it for common Board operations such as creating boards, reading active pages, 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 used by your application:
TypeScript
import { FUniver } from '@univerjs/core/facade'import '@univerjs-pro/boards/facade'Create the API object after the Univer instance and required plugins are registered:
TypeScript
const univerAPI = FUniver.newAPI(univer)Next steps
The Facade extension is now enabled. Continue with:
- General API for shared commands, events, undo and redo, UI extensions, networking, enums, and utilities.
- Univer Boards API for creating and reading Boards.
- Elements and the Boards facade reference for detailed Board operations.
How is this guide?