@univerjs/sheets-drawing-ui v0.5.4
Class: FDrawingEventNameMixin
Defined in: sheets-drawing-ui/src/facade/f-event.ts:145
Extends
Implements
IFDrawingEventNameMixin
Constructors
new FDrawingEventNameMixin()
new FDrawingEventNameMixin(): FDrawingEventNameMixin
Defined in: core/src/facade/f-event.ts:114
Returns
Inherited from
Properties
Property | Modifier | Type | Description | Inherited from | Defined in |
---|---|---|---|---|---|
BeforeClipboardChange | readonly | "BeforeClipboardChange" | Trigger this event before the clipboard content changes. Type of the event parameter is IBeforeClipboardChangeParam Example univerAPI.addEvent(univerAPI.Event.BeforeClipboardChange, (param) => { const {text, html} = param; console.log('debugger', text, html); // {text: '...', html: '...'} // if want to cancel the clipboard change param.cancel = true; }) | FEventName.BeforeClipboardChange | sheets-ui/src/facade/f-event.ts:160 |
BeforeClipboardPaste | readonly | "BeforeClipboardPaste" | Trigger this event before pasting. Type of the event parameter is IBeforeClipboardPasteParam Example univerAPI.addEvent(univerAPI.Event.BeforeClipboardPaste, (param) => { const {text, html} = param; console.log('debugger', text, html); // if want to cancel the clipboard paste param.cancel = true; }) | FEventName.BeforeClipboardPaste | sheets-ui/src/facade/f-event.ts:187 |
BeforeSheetEditEnd | readonly | "BeforeSheetEditEnd" | Event fired before a cell edit ends See IBeforeSheetEditEndEventParams Example univerAPI.addEvent(univerAPI.Event.BeforeSheetEditEnd, (params) => { const { worksheet, workbook, row, column, value, eventType, keycode, isZenEditor } = params; }); | FEventName.BeforeSheetEditEnd | sheets-ui/src/facade/f-event.ts:244 |
BeforeSheetEditStart | readonly | "BeforeSheetEditStart" | Event fired before a cell is edited See IBeforeSheetEditStartEventParams Example univerAPI.addEvent(univerAPI.Event.BeforeSheetEditStart, (params) => { const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; }); | FEventName.BeforeSheetEditStart | sheets-ui/src/facade/f-event.ts:211 |
CellClicked | readonly | "CellClicked" | Event fired when a cell is clicked Example univerAPI.getActiveWorkbook().addEvent('CellClicked', (p)=> console.log(p)); | FEventName.CellClicked | sheets-ui/src/facade/f-event.ts:264 |
CellHover | readonly | "CellHover" | Event fired when a cell is hovered Example univerAPI.getActiveWorkbook().addEvent('CellHover', (p)=> console.log(p)); | FEventName.CellHover | sheets-ui/src/facade/f-event.ts:290 |
CellPointerDown | readonly | "CellPointerDown" | Event fired when a cell is pointer down Example univerAPI.getActiveWorkbook().addEvent('CellPointerDown', (p)=> console.log(p)); | FEventName.CellPointerDown | sheets-ui/src/facade/f-event.ts:272 |
CellPointerMove | readonly | "CellPointerMove" | Event fired when move on spreadsheet cells Example univerAPI.getActiveWorkbook().addEvent('CellPointerMove', (p)=> console.log(p)); | FEventName.CellPointerMove | sheets-ui/src/facade/f-event.ts:298 |
CellPointerUp | readonly | "CellPointerUp" | Event fired when a cell is pointer up Example univerAPI.getActiveWorkbook().addEvent('CellPointerUp', (p)=> console.log(p)); | FEventName.CellPointerUp | sheets-ui/src/facade/f-event.ts:281 |
ClipboardChanged | readonly | "ClipboardChanged" | Trigger this event after the clipboard content changes. Type of the event parameter is IClipboardChangedParam Example univerAPI.addEvent(univerAPI.Event.ClipboardChanged, (param) => { const {text, html} = param; console.log('debugger', text, html); // {text: '...', html: '...'} }) | FEventName.ClipboardChanged | sheets-ui/src/facade/f-event.ts:173 |
ClipboardPasted | readonly | "ClipboardPasted" | Trigger this event after pasting. Type of the event parameter is IClipboardPastedParam Example univerAPI.addEvent(univerAPI.Event.ClipboardPasted, (param) => { const {text, html} = param; console.log('debugger', text, html); // {text: '...', html: '...'} }) | FEventName.ClipboardPasted | sheets-ui/src/facade/f-event.ts:199 |
DragOver | readonly | "DragOver" | Event fired when drag over spreadsheet cells Example univerAPI.getActiveWorkbook().addEvent('DragOver', (p)=> console.log(p)); | FEventName.DragOver | sheets-ui/src/facade/f-event.ts:306 |
Drop | readonly | "Drop" | Event fired when drop on spreadsheet cells Example univerAPI.getActiveWorkbook().addEvent('Drop', (p)=> console.log(p)); | FEventName.Drop | sheets-ui/src/facade/f-event.ts:315 |
SheetEditChanging | readonly | "SheetEditChanging" | Event fired when a cell is being edited See ISheetEditChangingEventParams Example univerAPI.addEvent(univerAPI.Event.SheetEditChanging, (params) => { const { worksheet, workbook, row, column, value, isZenEditor } = params; }); | FEventName.SheetEditChanging | sheets-ui/src/facade/f-event.ts:233 |
SheetEditEnded | readonly | "SheetEditEnded" | Event fired after a cell edit ends See ISheetEditEndedEventParams Example univerAPI.addEvent(univerAPI.Event.SheetEditEnded, (params) => { const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; }); | FEventName.SheetEditEnded | sheets-ui/src/facade/f-event.ts:255 |
SheetEditStarted | readonly | "SheetEditStarted" | Event fired after a cell is edited See ISheetEditEndedEventParams Example univerAPI.addEvent(univerAPI.Event.SheetEditStarted, (params) => { const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; }); | FEventName.SheetEditStarted | sheets-ui/src/facade/f-event.ts:222 |
_instance | static | null | FEventName | - | FEventName ._instance | core/src/facade/f-event.ts:87 |
Accessors
BeforeCommandExecute
Get Signature
get BeforeCommandExecute(): "BeforeCommandExecute"
Defined in: core/src/facade/f-event.ts:252
Event fired before a command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeCommandExecute, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeCommandExecute"
Inherited from
FEventName
.BeforeCommandExecute
BeforeOverGridImageChange
Get Signature
get BeforeOverGridImageChange(): "BeforeOverGridImageChange"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:146
Triggered before floating image change. Type of the event parameter is IBeforeOverGridImageChangeParam
Example
univerAPI.addEvent(univerAPI.Event.BeforeOverGridImageChange, (param) => {
const { workbook, images } = param;
// do something
console.log(workbook, images);
// Cancel the image change
param.cancel = true;
})
Returns
"BeforeOverGridImageChange"
Implementation of
IFDrawingEventNameMixin.BeforeOverGridImageChange
Overrides
FEventName.BeforeOverGridImageChange
BeforeOverGridImageInsert
Get Signature
get BeforeOverGridImageInsert(): "BeforeOverGridImageInsert"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:154
Triggered before floating image insertion. Type of the event parameter is IBeforeOverGridImageInsertParam
Example
univerAPI.addEvent(univerAPI.Event.BeforeOverGridImageInsert, (param) => {
const { workbook, insertImageParams } = param;
// do something
console.log(workbook, insertImageParams);
// Cancel the insertion operation
param.cancel = true;
})
Returns
"BeforeOverGridImageInsert"
Implementation of
IFDrawingEventNameMixin.BeforeOverGridImageInsert
Overrides
FEventName.BeforeOverGridImageInsert
BeforeOverGridImageRemove
Get Signature
get BeforeOverGridImageRemove(): "BeforeOverGridImageRemove"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:162
Triggered before floating image removal. Type of the event parameter is IBeforeOverGridImageRemoveParam
Example
univerAPI.addEvent(univerAPI.Event.BeforeOverGridImageRemove, (param) => {
const { workbook, images } = param;
// do something
console.log(workbook, images);
// Cancel the removal operation
param.cancel = true;
})
Returns
"BeforeOverGridImageRemove"
Implementation of
IFDrawingEventNameMixin.BeforeOverGridImageRemove
Overrides
FEventName.BeforeOverGridImageRemove
BeforeOverGridImageSelect
Get Signature
get BeforeOverGridImageSelect(): "BeforeOverGridImageSelect"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:170
Triggered before floating image selection. Type of the event parameter is IBeforeOverGridImageSelectParam
Example
univerAPI.addEvent(univerAPI.Event.BeforeOverGridImageSelect, (param) => {
const { workbook, selectedImages, oldSelectedImages } = param;
// do something
console.log(workbook, selectedImages, oldSelectedImages);
// cancel the event
param.cancel = true;
})
Returns
"BeforeOverGridImageSelect"
Implementation of
IFDrawingEventNameMixin.BeforeOverGridImageSelect
Overrides
FEventName.BeforeOverGridImageSelect
BeforeRedo
Get Signature
get BeforeRedo(): "BeforeRedo"
Defined in: core/src/facade/f-event.ts:207
Event fired before a redo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeRedo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeRedo"
Inherited from
BeforeSheetCreate
Get Signature
get BeforeSheetCreate(): "BeforeSheetCreate"
Defined in: sheets/src/facade/f-event.ts:46
Event fired before a sheet is created
See
Example
univerAPI.addEvent(univerAPI.event.BeforeSheetCreate, (params) => {
const { workbook, index, sheet } = params;
console.log('unit created', params);
});
Returns
"BeforeSheetCreate"
Inherited from
FEventName.BeforeSheetCreate
BeforeUndo
Get Signature
get BeforeUndo(): "BeforeUndo"
Defined in: core/src/facade/f-event.ts:222
Event fired before an undo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.BeforeUndo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"BeforeUndo"
Inherited from
CommandExecuted
Get Signature
get CommandExecuted(): "CommandExecuted"
Defined in: core/src/facade/f-event.ts:237
Event fired when a command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.CommandExecuted, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"CommandExecuted"
Inherited from
DocCreated
Get Signature
get DocCreated(): "DocCreated"
Defined in: core/src/facade/f-event.ts:132
Event fired when a document is created
See
IDocCreatedParam
Example
univerAPI.addEvent(univerAPI.event.DocCreated, (params) => {
const { unitId, type, doc, unit } = params;
console.log('doc created', params);
});
Returns
"DocCreated"
Inherited from
DocDisposed
Get Signature
get DocDisposed(): "DocDisposed"
Defined in: core/src/facade/f-event.ts:147
Event fired when a document is disposed
See
IDocDisposedEvent
Example
univerAPI.addEvent(univerAPI.event.DocDisposed, (params) => {
const { unitId, unitType, snapshot } = params;
console.log('doc disposed', params);
});
Returns
"DocDisposed"
Inherited from
LifeCycleChanged
Get Signature
get LifeCycleChanged(): "LifeCycleChanged"
Defined in: core/src/facade/f-event.ts:162
Event fired when life cycle is changed
See
ILifeCycleChangedEvent
Example
univerAPI.addEvent(univerAPI.event.LifeCycleChanged, (params) => {
const { stage } = params;
console.log('life cycle changed', params);
});
Returns
"LifeCycleChanged"
Inherited from
OverGridImageChanged
Get Signature
get OverGridImageChanged(): "OverGridImageChanged"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:150
Triggered after floating image change. Type of the event parameter is IOverGridImageChangedParam
Example
univerAPI.addEvent(univerAPI.Event.OverGridImageChanged, (param) => {
const { workbook, images } = param;
// do something
console.log(workbook, images);
})
Returns
"OverGridImageChanged"
Implementation of
IFDrawingEventNameMixin.OverGridImageChanged
Overrides
FEventName.OverGridImageChanged
OverGridImageInserted
Get Signature
get OverGridImageInserted(): "OverGridImageInserted"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:158
Triggered after floating image insertion. Type of the event parameter is IOverGridImageInsertedParam
Example
univerAPI.addEvent(univerAPI.Event.OverGridImageInserted, (param) => {
const { workbook, images } = param;
// do something
console.log(workbook, images);
})
Returns
"OverGridImageInserted"
Implementation of
IFDrawingEventNameMixin.OverGridImageInserted
Overrides
FEventName.OverGridImageInserted
OverGridImageRemoved
Get Signature
get OverGridImageRemoved(): "OverGridImageRemoved"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:166
Triggered after floating image removal. Type of the event parameter is IOverGridImageRemovedParam
Example
univerAPI.addEvent(univerAPI.Event.OverGridImageRemoved, (param) => {
const { workbook, removeImageParams } = param;
// do something
console.log(workbook, removeImageParams);
})
Returns
"OverGridImageRemoved"
Implementation of
IFDrawingEventNameMixin.OverGridImageRemoved
Overrides
FEventName.OverGridImageRemoved
OverGridImageSelected
Get Signature
get OverGridImageSelected(): "OverGridImageSelected"
Defined in: sheets-drawing-ui/src/facade/f-event.ts:174
Triggered after floating image selection. Type of the event parameter is IOverGridImageSelectedParam
Example
univerAPI.addEvent(univerAPI.Event.OverGridImageSelected, (param) => {
const { workbook, selectedImages } = param;
// do something
console.log(workbook, selectedImages);
})
Returns
"OverGridImageSelected"
Implementation of
IFDrawingEventNameMixin.OverGridImageSelected
Overrides
FEventName.OverGridImageSelected
Redo
Get Signature
get Redo(): "Redo"
Defined in: core/src/facade/f-event.ts:177
Event fired when a redo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.Redo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"Redo"
Inherited from
SheetCreated
Get Signature
get SheetCreated(): "SheetCreated"
Defined in: sheets/src/facade/f-event.ts:34
Event fired after a sheet is created
See
Example
univerAPI.addEvent(univerAPI.event.SheetCreated, (params) => {
const { workbook, worksheet } = params;
console.log('unit created', params);
});
Returns
"SheetCreated"
Inherited from
FEventName.SheetCreated
Undo
Get Signature
get Undo(): "Undo"
Defined in: core/src/facade/f-event.ts:192
Event fired when an undo command is executed
See
ICommandEvent
Example
univerAPI.addEvent(univerAPI.event.Undo, (event) => {
const { params, id, type } = event;
console.log('command executed', event);
});
Returns
"Undo"
Inherited from
WorkbookCreated
Get Signature
get WorkbookCreated(): "WorkbookCreated"
Defined in: sheets/src/facade/f-event.ts:58
Event fired after a workbook is created
See
Example
univerAPI.addEvent(univerAPI.event.WorkbookCreated, (params) => {
const { unitId, type, workbook, unit } = params;
console.log('unit created', params);
});
Returns
"WorkbookCreated"
Inherited from
FEventName.WorkbookCreated
WorkbookDisposed
Get Signature
get WorkbookDisposed(): "WorkbookDisposed"
Defined in: sheets/src/facade/f-event.ts:70
Event fired after a workbook is disposed
See
Example
univerAPI.addEvent(univerAPI.event.WorkbookDisposed, (params) => {
const { unitId, unitType, snapshot } = params;
console.log('unit disposed', params);
});
Returns
"WorkbookDisposed"
Inherited from
FEventName.WorkbookDisposed
Methods
extend()
static extend(source): void
Defined in: core/src/facade/f-event.ts:98
Parameters
Parameter | Type |
---|---|
source | any |
Returns
void
Inherited from
get()
static get(): FEventName
Defined in: core/src/facade/f-event.ts:88