Class: FUniver
The root Facade API object to interact with Univer. Please use newAPI
static method
to create a new instance.
Extends
FBaseInitialable
.IFUniverSheetsMixin
.IFUniverNetworkMixin
.IFUniverEngineFormulaMixin
.IFUnvierDataValidationMixin
.IFUniverSheetsFormulaMixin
.IFUniverCollaborationClientMixin
.IFUniverSheetsUIMixin
.IFUniverUIMixin
.IFUniverDocsUIMixin
.IFUniverFindReplaceMixin
.IFUniverCrosshairHighlightMixin
.IFUniverWatermarkMixin
.IFUniverSheetsZenEditorMixin
.IFUniverNodeRuntimeMixin
.IFUniverExchangeClientMixin
Properties
Property | Modifier | Type | Description |
---|---|---|---|
|
|
Get the available built-in colors for the crosshair highlight. |
Accessors
Enum
Get Signature
get Enum(): FEnum
Returns
Event
Get Signature
get Event(): FEventName
Returns
Util
Get Signature
get Util(): FUtil
Returns
FUtil
Methods
addEvent()
addEvent<T>(event, callback): IDisposable
Add an event listener
Type Parameters
Type Parameter |
---|
T extends keyof IEventParamConfig |
Parameters
Parameter | Type | Description |
---|---|---|
event | T | key of event |
callback | (params ) => void | callback when event triggered |
Returns
IDisposable
The Disposable instance, for remove the listener
Example
univerAPI.addEvent(univerAPI.event.UnitCreated, (params) => {
console.log('unit created', params);
});
addWatermark()
Call Signature
addWatermark(type, config): FUniver
Adds a watermark to the unit. Supports both text and image watermarks based on the specified type.
Parameters
Parameter | Type | Description |
---|---|---|
type | Text | The type of watermark to add. Can be either ‘Text’ or ‘Image’. |
config | ITextWatermarkConfig | The configuration object for the watermark. - If the type is ‘Text’, the config should follow the ITextWatermarkConfig interface. - If the type is ‘Image’, the config should follow the IImageWatermarkConfig interface. |
Returns
Throws
Throws an error if the watermark type is unknown.
Call Signature
addWatermark(type, config): FUniver
Parameters
Parameter | Type |
---|---|
type | Image |
config | IImageWatermarkConfig |
Returns
Call Signature
addWatermark(type, config): FUniver
Parameters
Parameter | Type |
---|---|
type | any |
config | any |
Returns
copy()
copy(): Promise<boolean>
Copy the current selected content of the currently focused unit into your system clipboard.
Returns
Promise
<boolean
>
createMenu()
createMenu(menuItem): FMenu
Create a menu build object. You can insert new menus into the UI.
Parameters
Parameter | Type | Description |
---|---|---|
menuItem | IFacadeMenuItem | the menu item |
Returns
the FMenu object
Example
univerAPI.createMenu({
id: 'custom-menu',
title: 'Custom Menu',
action: () => {},
}).appendTo('ribbon.start.others');
createSubmenu()
createSubmenu(submenuItem): FSubmenu
Create a menu that contains submenus, and later you can append this menu and its submenus to the UI.
Parameters
Parameter | Type | Description |
---|---|---|
submenuItem | IFacadeSubmenuItem | the submenu item |
Returns
the FSubmenu object
Example
univerAPI.createSubmenu({ id: 'custom-submenu', title: 'Custom Submenu' })
.addSubmenu(univerAPI.createSubmenu({ id: 'submenu-nested', title: 'Nested Submenu' })
.addSubmenu(univerAPI.createMenu({ id: 'submenu-nested-1', title: 'Item 1', action: () => {} }))
.addSeparator()
.addSubmenu(univerAPI.createMenu({ id: 'submenu-nested-2', title: 'Item 2', action: () => {} }))
)
.appendTo('contextMenu.others');
createTextFinderAsync()
createTextFinderAsync(text): Promise<FTextFinder>
Create a text-finder for the current univer.
Parameters
Parameter | Type | Description |
---|---|---|
text | string | The text to find. |
Returns
Promise
<FTextFinder
>
A promise that resolves to the text-finder instance.
Example
const textFinder = await univerAPI.createTextFinderAsync('Hello');
createUniverDoc()
createUniverDoc(data): FDocument
Create a new document and get the API handler of that document.
Parameters
Parameter | Type | Description |
---|---|---|
data | Partial <IDocumentData > | The snapshot of the document. |
Returns
FDocument API instance.
createUniverSheet()
createUniverSheet(data): FWorkbook
Parameters
Parameter | Type |
---|---|
data | Partial <IWorkbookData > |
Returns
Deprecated
use univerAPI.createWorkbook
instead.
createWorkbook()
createWorkbook(data): FWorkbook
Create a new spreadsheet and get the API handler of that spreadsheet.
Parameters
Parameter | Type | Description |
---|---|---|
data | Partial <IWorkbookData > | The snapshot of the spreadsheet. |
Returns
FWorkbook API instance.
Example
univerAPI.createWorkbook({ id: 'Sheet1', name: 'Sheet1' });
customizeColumnHeader()
customizeColumnHeader(cfg): void
Parameters
Parameter | Type | Description |
---|---|---|
cfg | IColumnsHeaderCfgParam | The configuration of the column header. |
Returns
void
Deprecated
use same API in FWorkSheet. Customize the column header of the spreadsheet.
Example
univerAPI.customizeColumnHeader({ headerStyle: { fontColor: '#fff', size: 40, backgroundColor: '#4e69ee', fontSize: 9 }, columnsCfg: ['MokaII', undefined, null, { text: 'Size', textAlign: 'left' }] });
customizeRowHeader()
customizeRowHeader(cfg): void
Parameters
Parameter | Type | Description |
---|---|---|
cfg | IRowsHeaderCfgParam | The configuration of the row header. |
Returns
void
Deprecated
use same API in FWorkSheet. Customize the row header of the spreadsheet.
Example
univerAPI.customizeRowHeader({ headerStyle: { backgroundColor: 'pink', fontSize: 9 }, rowsCfg: ['MokaII', undefined, null, { text: 'Size', textAlign: 'left' }] });
deleteWatermark()
deleteWatermark(): FUniver
Deletes the currently applied watermark from the unit.
This function retrieves the watermark service and invokes the method to remove any existing watermark configuration.
Returns
disposeUnit()
disposeUnit(unitId): boolean
Dispose the UniverSheet by the unitId
. The UniverSheet would be unload from the application.
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | The unit id of the UniverSheet. |
Returns
boolean
Whether the Univer instance is disposed successfully.
executeCommand()
executeCommand<P, R>(
id,
params?,
options?): Promise<R>
Execute a command with the given id and parameters.
Type Parameters
Type Parameter | Default type |
---|---|
P extends object | object |
R | boolean |
Parameters
Parameter | Type | Description |
---|---|---|
id | string | Identifier of the command. |
params ? | P | Parameters of this execution. |
options ? | IExecutionOptions | Options of this execution. |
Returns
Promise
<R
>
The result of the execution. It is a boolean value by default which indicates the command is executed.
exportXLSXBySnapshot()
exportXLSXBySnapshot(snapshot): Promise<File>
Export XLSX file by workbook data
Parameters
Parameter | Type | Description |
---|---|---|
snapshot | IWorkbookData | Workbook data |
Returns
Promise
<File
>
XLSX file
Deprecated
Please use exportXLSXBySnapshotAsync
instead.
exportXLSXBySnapshotAsync()
exportXLSXBySnapshotAsync(snapshot): Promise<File>
Export XLSX file by workbook data
Parameters
Parameter | Type | Description |
---|---|---|
snapshot | IWorkbookData | Workbook data |
Returns
Promise
<File
>
XLSX file
Example
const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot);
exportXLSXByUnitId()
exportXLSXByUnitId(unitId): Promise<File>
Export XLSX file by unit id
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | Unit id |
Returns
Promise
<File
>
XLSX file
Deprecated
Please use exportXLSXByUnitIdAsync
instead.
exportXLSXByUnitIdAsync()
exportXLSXByUnitIdAsync(unitId): Promise<File>
Export XLSX file by unit id
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | Unit id |
Returns
Promise
<File
>
XLSX file
Example
const file = await univerAPI.exportXLSXByUnitIdAsync(unitId);
getActiveDocument()
getActiveDocument(): FDocument
Get the currently focused Univer document.
Returns
The currently focused Univer document.
getActiveSheet()
getActiveSheet(): Nullable<{
workbook: ...;
worksheet: ...;
}>
Get the active sheet.
Returns
Nullable
<{
workbook
: …;
worksheet
: …;
}>
The active sheet.
Example
const target = univerAPI.getActiveSheet();
if (!target) return;
const { workbook, worksheet } = target;
getActiveUniverSheet()
getActiveUniverSheet(): FWorkbook
Returns
Deprecated
use univerAPI.getActiveWorkbook
instead
getActiveWorkbook()
getActiveWorkbook(): FWorkbook
Get the currently focused Univer spreadsheet.
Returns
The currently focused Univer spreadsheet.
Example
univerAPI.getActiveWorkbook();
getCollaboration()
getCollaboration(): FCollaboration
Get the collaboration instance to manage the collaboration issue of the current univer.
Returns
The collaboration instance.
Example
const collaboration = univerAPI.getCollaboration();
getCommandSheetTarget()
getCommandSheetTarget(commandInfo): Nullable<{
workbook: ...;
worksheet: ...;
}>
Get the target of the sheet.
Parameters
Parameter | Type | Description |
---|---|---|
commandInfo | ICommandInfo <object > | The commandInfo of the command. |
Returns
Nullable
<{
workbook
: …;
worksheet
: …;
}>
- The target of the sheet.
Example
univerAPI.addEvent(univerAPI.event.CommandExecuted, (commandInfo) => {
const target = univerAPI.getCommandSheetTarget(commandInfo);
if (!target) return;
const { workbook, worksheet } = target;
});
getComponentManager()
getComponentManager(): ComponentManager
Get the component manager
Returns
ComponentManager
The component manager
getCrosshairHighlightColor()
getCrosshairHighlightColor(): string
Get the color of the crosshair highlight.
Returns
string
the color of the crosshair highlight
Example
const color = univer.getCrosshairHighlightColor();
getCrosshairHighlightEnabled()
getCrosshairHighlightEnabled(): boolean
Get whether the crosshair highlight is enabled.
Returns
boolean
whether the crosshair highlight is enabled
Example
const enabled = univer.getCrosshairHighlightEnabled();
getCurrentLifecycleStage()
getCurrentLifecycleStage(): LifecycleStages
Get the current lifecycle stage.
Returns
LifecycleStages
- The current lifecycle stage.
getFormula()
getFormula(): FFormula
Returns
getHooks()
getHooks(): FHooks
Get hooks.
Returns
FHooks instance
Deprecated
use addEvent
instead.
getNetwork()
getNetwork(): FNetwork
Get the network API of Univer, with the help of which you can send HTTP requests.
Returns
getPermission()
getPermission(): FPermission
Get the PermissionInstance.
Returns
Deprecated
This function is deprecated and will be removed in version 0.6.0. Please use the function with the same name on the FWorkbook
instance instead.
getSheetHooks()
getSheetHooks(): FSheetHooks
Returns
Deprecated
use univerAPI.addEvent
as instead.
getSheetTarget()
getSheetTarget(unitId, subUnitId): Nullable<{
workbook: ...;
worksheet: ...;
}>
Get the target of the sheet.
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | The unitId of the sheet. |
subUnitId | string | The subUnitId of the sheet. |
Returns
Nullable
<{
workbook
: …;
worksheet
: …;
}>
- The target of the sheet.
Example
univerAPI.getSheetTarget('unitId', 'subUnitId');
getShortcut()
getShortcut(): FShortcut
Get the Shortcut handler to interact with Univer’s shortcut functionalities.
Returns
getUniverDoc()
getUniverDoc(id): FDocument
Get the document API handler by the document id.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The document id. |
Returns
The document API instance.
getUniverSheet()
getUniverSheet(id): FWorkbook
Get the spreadsheet API handler by the spreadsheet id.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The spreadsheet id. |
Returns
The spreadsheet API instance.
getURL()
getURL(): URL
Return the URL of the current page.
Returns
URL
the URL object
getUserManager()
getUserManager(): FUserManager
Returns
getWorkbook()
getWorkbook(id): FWorkbook
Parameters
Parameter | Type |
---|---|
id | string |
Returns
importDOCXToSnapshot()
importDOCXToSnapshot(file): Promise<IDocumentData>
Import DOCX file to document data
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<IDocumentData
>
Document data
Deprecated
Please use importDOCXToSnapshotAsync
instead.
importDOCXToSnapshotAsync()
importDOCXToSnapshotAsync(file): Promise<IDocumentData>
Import DOCX file to document data
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<IDocumentData
>
Document data
Example
const snapshot = await univerAPI.importDOCXToSnapshotAsync(file);
importDOCXToUnitId()
importDOCXToUnitId(file): Promise<string>
Import DOCX file to unit id
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<string
>
Unit id
Deprecated
Please use importDOCXToUnitIdAsync
instead.
importDOCXToUnitIdAsync()
importDOCXToUnitIdAsync(file): Promise<string>
Import DOCX file to unit id
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<string
>
Unit id
Example
const unitId = await univerAPI.importDOCXToUnitIdAsync(file);
importXLSXToSnapshot()
importXLSXToSnapshot(file): Promise<IWorkbookData>
Import XLSX file to workbook data
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<IWorkbookData
>
Workbook data
Deprecated
Please use importXLSXToSnapshotAsync
instead.
importXLSXToSnapshotAsync()
importXLSXToSnapshotAsync(file): Promise<IWorkbookData>
Import XLSX file to workbook data
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<IWorkbookData
>
Workbook data
Example
const snapshot = await univerAPI.importXLSXToSnapshotAsync(file);
importXLSXToUnitId()
importXLSXToUnitId(file): Promise<string>
Import XLSX file to unit id
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<string
>
Unit id
Deprecated
Please use importXLSXToUnitIdAsync
instead.
importXLSXToUnitIdAsync()
importXLSXToUnitIdAsync(file): Promise<string>
Import XLSX file to unit id
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File path or file object |
Returns
Promise
<string
>
Unit id
Example
const unitId = await univerAPI.importXLSXToUnitIdAsync(file);
isUIVisible()
isUIVisible(key): boolean
Get the visibility of a built-in UI part.
Parameters
Parameter | Type | Description |
---|---|---|
key | BuiltInUIPart | the built-in UI part |
Returns
boolean
the visibility example
univerAPI.isUIVisible(BuiltInUIPart.HEADER);
newBlob()
newBlob(): FBlob
Create a new blob.
Returns
The new blob instance
Example
const blob = univerAPI.newBlob();
newColor()
newColor(): ColorBuilder
Create a new color.
Returns
ColorBuilder
The new color instance
Example
const color = univerAPI.newColor();
newDataValidation()
newDataValidation(): FDataValidationBuilder
Creates a new instance of FDataValidationBuilder
Returns
A new instance of the FDataValidationBuilder class
Example
const rule = FUnvier.newDataValidation();
cell.setDataValidation(rule.requireValueInRange(range));
newDefinedName()
newDefinedName(): FDefinedNameBuilder
Create a new defined name builder.
Returns
- The defined name builder.
Example
univerAPI.newDefinedName();
newParagraphStyle()
newParagraphStyle(style?): ParagraphStyleBuilder
Create a new paragraph style.
Parameters
Parameter | Type | Description |
---|---|---|
style ? | IParagraphStyle | The paragraph style |
Returns
ParagraphStyleBuilder
The new paragraph style instance
Example
const paragraphStyle = univerAPI.newParagraphStyle();
newParagraphStyleValue()
newParagraphStyleValue(style?): ParagraphStyleValue
Create a new paragraph style value.
Parameters
Parameter | Type | Description |
---|---|---|
style ? | IParagraphStyle | The paragraph style |
Returns
ParagraphStyleValue
The new paragraph style value instance
Example
const paragraphStyleValue = univerAPI.newParagraphStyleValue();
newRichText()
newRichText(data?): RichTextBuilder
Create a new rich text.
Parameters
Parameter | Type | Description |
---|---|---|
data ? | IDocumentData |
Returns
RichTextBuilder
The new rich text instance
Example
const richText = univerAPI.newRichText();
newRichTextValue()
newRichTextValue(data): RichTextValue
Create a new rich text value.
Parameters
Parameter | Type | Description |
---|---|---|
data | IDocumentData | The rich text data |
Returns
RichTextValue
The new rich text value instance
Example
const richTextValue = univerAPI.newRichTextValue();
newTextDecoration()
newTextDecoration(decoration?): TextDecorationBuilder
Create a new text decoration.
Parameters
Parameter | Type | Description |
---|---|---|
decoration ? | ITextDecoration | The text decoration |
Returns
TextDecorationBuilder
The new text decoration instance
Example
const decoration = univerAPI.newTextDecoration();
newTextStyle()
newTextStyle(style?): TextStyleBuilder
Create a new text style.
Parameters
Parameter | Type | Description |
---|---|---|
style ? | ITextStyle | The text style |
Returns
TextStyleBuilder
The new text style instance
Example
const textStyle = univerAPI.newTextStyle();
newTextStyleValue()
newTextStyleValue(style?): TextStyleValue
Create a new text style value.
Parameters
Parameter | Type | Description |
---|---|---|
style ? | ITextStyle | The text style |
Returns
TextStyleValue
The new text style value instance
Example
const textStyleValue = univerAPI.newTextStyleValue();
onBeforeCommandExecute()
onBeforeCommandExecute(callback): IDisposable
Register a callback that will be triggered before invoking a command.
Parameters
Parameter | Type | Description |
---|---|---|
callback | CommandListener | The callback. |
Returns
IDisposable
The disposable instance.
Deprecated
use addEvent(univerAPI.event.BeforeCommandExecute, () => {})
instead.
onCommandExecuted()
onCommandExecuted(callback): IDisposable
Register a callback that will be triggered when a command is invoked.
Parameters
Parameter | Type | Description |
---|---|---|
callback | CommandListener | The callback. |
Returns
IDisposable
The disposable instance.
Deprecated
use addEvent(univerAPI.event.CommandExecuted, () => {})
instead.
onUniverSheetCreated()
onUniverSheetCreated(callback): IDisposable
Parameters
Parameter | Type |
---|---|
callback | (workbook ) => void |
Returns
IDisposable
Deprecated
Use univerAPI.addEvent(univerAPI.Event.UnitCreated, () => {})
openDialog()
openDialog(dialog): IDisposable
Open a dialog.
Parameters
Parameter | Type | Description |
---|---|---|
dialog | IDialogPartMethodOptions | the dialog options |
Returns
IDisposable
the disposable object
openSidebar()
openSidebar(params): IDisposable
Open a sidebar.
Parameters
Parameter | Type | Description |
---|---|---|
params | ISidebarMethodOptions | the sidebar options |
Returns
IDisposable
the disposable object
Deprecated
Please use openSidebar
instead.
openSiderbar()
openSiderbar(params): IDisposable
Open a sidebar.
Parameters
Parameter | Type | Description |
---|---|---|
params | ISidebarMethodOptions | the sidebar options |
Returns
IDisposable
the disposable object
Deprecated
Please use openSidebar
instead.
paste()
paste(): Promise<boolean>
Paste into the current selected position of the currently focused unit from your system clipboard.
Returns
Promise
<boolean
>
redo()
redo(): Promise<boolean>
Redo an editing on the currently focused document.
Returns
Promise
<boolean
>
redo result
registerComponent()
registerComponent(
name,
component,
options?): IDisposable
register an component.
Parameters
Parameter | Type | Description |
---|---|---|
name | string | - |
component | ComponentType | |
options ? | IComponentOptions | - |
Returns
IDisposable
Example
univerAPI.registerComponent('my-comp', () => React.createElement('h1', null, 'Custom Header'));
registerFunction()
registerFunction(config): IDisposable
Register a function to the spreadsheet.
Parameters
Parameter | Type | Description |
---|---|---|
config | IRegisterFunctionParams | The configuration of the function. |
Returns
IDisposable
The disposable instance.
Deprecated
Use univerAPI.getFormula().registerFunction
instead.
registerSheetColumnHeaderExtension()
registerSheetColumnHeaderExtension(unitId, ...extensions): IDisposable
Register sheet column header render extensions.
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | The unit id of the spreadsheet. |
…extensions | SheetExtension [] | The extensions to register. |
Returns
IDisposable
The disposable instance.
registerSheetMainExtension()
registerSheetMainExtension(unitId, ...extensions): IDisposable
Register sheet main render extensions.
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | The unit id of the spreadsheet. |
…extensions | SheetExtension [] | The extensions to register. |
Returns
IDisposable
The disposable instance.
registerSheetRowHeaderExtension()
registerSheetRowHeaderExtension(unitId, ...extensions): IDisposable
Register sheet row header render extensions.
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | The unit id of the spreadsheet. |
…extensions | SheetExtension [] | The extensions to register. |
Returns
IDisposable
The disposable instance.
registerUIPart()
registerUIPart(key, component): IDisposable
register an component to a built-in UI part
Parameters
Parameter | Type | Description |
---|---|---|
key | BuiltInUIPart | the built-in UI part |
component | any | the react component |
Returns
IDisposable
Example
univerAPI.registerUIPart(BuiltInUIPart.CUSTOM_HEADER, () => React.createElement('h1', null, 'Custom Header'));
runOnServer()
runOnServer(
scriptNameOrId,
func, ...
params): Promise<string>
Execute a function in a Uniscript on the server.
Parameters
Parameter | Type | Description |
---|---|---|
scriptNameOrId | string | The name or the ID of the Uniscript to run. Name should end with “.us”. |
func | string | The function in the Uniscript to run |
…params | any [] | Parameters to the function |
Returns
Promise
<string
>
setCrosshairHighlightColor()
setCrosshairHighlightColor(color): FUniver
Set the color of the crosshair highlight.
Parameters
Parameter | Type | Description |
---|---|---|
color | string | the color of the crosshair highlight |
Returns
the FUniver instance
Example
univer.setCrosshairHighlightColor('#FF0000');
setCrosshairHighlightEnabled()
setCrosshairHighlightEnabled(enabled): FUniver
Enable or disable crosshair highlight.
Parameters
Parameter | Type | Description |
---|---|---|
enabled | boolean | if crosshair highlight should be enabled |
Returns
the FUniver instance
Example
univer.setCrosshairHighlightEnabled(true);
setUIVisible()
setUIVisible(key, visible): FUniver
Set the visibility of a built-in UI part.
Parameters
Parameter | Type | Description |
---|---|---|
key | BuiltInUIPart | the built-in UI part |
visible | boolean | the visibility |
Returns
the FUniver object example
univerAPI.setUIVisible(BuiltInUIPart.HEADER, false);
showMessage()
showMessage(options): void
Show a message.
Parameters
Parameter | Type |
---|---|
options | IMessageProps |
Returns
void
Example
const message = univerAPI.showMessage({ key: 'my-message', content: 'Warning', duration: 0 });
someAction().then(() => message.dispose());
syncExecuteCommand()
syncExecuteCommand<P, R>(
id,
params?,
options?): R
Execute a command with the given id and parameters synchronously.
Type Parameters
Type Parameter | Default type |
---|---|
P extends object | object |
R | boolean |
Parameters
Parameter | Type | Description |
---|---|---|
id | string | Identifier of the command. |
params ? | P | Parameters of this execution. |
options ? | IExecutionOptions | Options of this execution. |
Returns
R
The result of the execution. It is a boolean value by default which indicates the command is executed.
undo()
undo(): Promise<boolean>
Undo an editing on the currently focused document.
Returns
Promise
<boolean
>
undo result
newAPI()
static newAPI(wrapped): FUniver
Create an FUniver instance, if the injector is not provided, it will create a new Univer instance.
Parameters
Parameter | Type | Description |
---|---|---|
wrapped | any | The Univer instance or injector instance. |
Returns
- The FUniver instance.