@univerjs-pro/sheets-history-ui
v1.6.0
Published
Sheet edit history UI integration for Univer Pro.
Readme
@univerjs-pro/sheets-history-ui
Sheets ribbon and UI integration for Univer Pro version history.
Package Overview
| Package | UMD global | CSS | Locales | Facade entry | Worker entry |
| --- | --- | :---: | :---: | :---: | :---: |
| @univerjs-pro/sheets-history-ui | UniverProSheetsHistoryUi | Yes | Yes | No | No |
Installation
pnpm add @univerjs-pro/sheets-history-ui
# or
npm install @univerjs-pro/sheets-history-uiUsage
Start with the integration setup for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
Configure historyServerUrl when registering the plugin after the host's Sheets and collaboration
plugins. This is the same option used by Docs, Slides, Bases and Boards history UI plugins.
import '@univerjs-pro/sheets-history-ui/lib/index.css';
import { UniverSheetsHistoryUIPlugin } from '@univerjs-pro/sheets-history-ui';
univer.registerPlugin(UniverSheetsHistoryUIPlugin, {
historyServerUrl: '/universer-api/history',
univerContainerId: 'univer-container',
});The URL is the prefix for the existing history list, creator and changeset endpoints. This option does not change the server API. Both desktop and mobile history viewers use it.
If omitted, the default is /universer-api/history.
Integration Notes
- Import the package stylesheet once in your application.
- Merge the locale resources for each language enabled by your application.
- Register this plugin after the product UI, history, license, and collaboration plugins.
