@coco-vexel/coco-office-editor 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -1
- package/dist/index.cjs +1454 -26172
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1454 -25963
- package/dist/{model-DB6aN6uJ.d.cts → model-DNNBhhCB.d.cts} +4 -3
- package/dist/{model-DB6aN6uJ.d.ts → model-DNNBhhCB.d.ts} +4 -3
- package/dist/{native-B6B649CC.d.ts → native-OrEUvS8p.d.ts} +5 -1
- package/dist/native-TMv552dv.d.cts +317 -0
- package/dist/native-TMv552dv.d.ts +317 -0
- package/dist/{native-Ct9nN06K.d.cts → native-f2y3N8N5.d.cts} +5 -1
- package/dist/ppt-native.cjs +14 -5270
- package/dist/ppt-native.d.cts +1 -1
- package/dist/ppt-native.d.ts +1 -1
- package/dist/ppt-native.js +14 -5268
- package/dist/ppt.cjs +14 -5362
- package/dist/ppt.d.cts +3 -306
- package/dist/ppt.d.ts +3 -306
- package/dist/ppt.js +14 -5346
- package/dist/read-only-1_LQCO1d.d.cts +7 -0
- package/dist/read-only-1_LQCO1d.d.ts +7 -0
- package/dist/spreadsheet.cjs +11 -4219
- package/dist/spreadsheet.d.cts +15 -3
- package/dist/spreadsheet.d.ts +15 -3
- package/dist/spreadsheet.js +11 -4156
- package/dist/word-editing.cjs +2 -812
- package/dist/word-editing.d.cts +1 -1
- package/dist/word-editing.d.ts +1 -1
- package/dist/word-editing.js +2 -803
- package/dist/word-native.cjs +1484 -13349
- package/dist/word-native.d.cts +2 -2
- package/dist/word-native.d.ts +2 -2
- package/dist/word-native.js +1484 -13242
- package/dist/word-prosemirror.cjs +1 -489
- package/dist/word-prosemirror.d.cts +1 -1
- package/dist/word-prosemirror.d.ts +1 -1
- package/dist/word-prosemirror.js +1 -483
- package/dist/word.cjs +1316 -16541
- package/dist/word.d.cts +5 -4
- package/dist/word.d.ts +5 -4
- package/dist/word.js +1316 -16409
- package/package.json +3 -3
- package/src/styles/editor.css +1 -0
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/ppt-native.cjs.map +0 -1
- package/dist/ppt-native.js.map +0 -1
- package/dist/ppt.cjs.map +0 -1
- package/dist/ppt.js.map +0 -1
- package/dist/spreadsheet.cjs.map +0 -1
- package/dist/spreadsheet.js.map +0 -1
- package/dist/word-editing.cjs.map +0 -1
- package/dist/word-editing.js.map +0 -1
- package/dist/word-native.cjs.map +0 -1
- package/dist/word-native.js.map +0 -1
- package/dist/word-prosemirror.cjs.map +0 -1
- package/dist/word-prosemirror.js.map +0 -1
- package/dist/word.cjs.map +0 -1
- package/dist/word.js.map +0 -1
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { PptSlideSize, PptSlideBackgroundModel, PptShapeKind, PptTextStyle, PptTextParagraph, PptTextBodyProperties, PptImageCropModel, PptChartModel, PptTableModel, PptGradientFillModel, PptShapeStyle, PptCustomGeometryModel, PptShapeModel, PptSlideModel, PptPresentationModel, PptShapeGeometry, Presentation } from '@coco-vexel/coco-office/ppt';
|
|
2
|
+
|
|
3
|
+
type PptSceneNodeKind = PptShapeKind;
|
|
4
|
+
interface PptSceneRect {
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
rotation?: number;
|
|
10
|
+
flipHorizontal?: boolean;
|
|
11
|
+
flipVertical?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface PptSceneNode {
|
|
14
|
+
id: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
kind: PptSceneNodeKind;
|
|
17
|
+
bounds: PptSceneRect;
|
|
18
|
+
text?: string;
|
|
19
|
+
textStyle?: PptTextStyle;
|
|
20
|
+
textParagraphs?: PptTextParagraph[];
|
|
21
|
+
textBody?: PptTextBodyProperties;
|
|
22
|
+
imagePath?: string;
|
|
23
|
+
imageCrop?: PptImageCropModel;
|
|
24
|
+
imageFillRect?: PptImageCropModel;
|
|
25
|
+
imageOpacity?: number;
|
|
26
|
+
chart?: PptChartModel;
|
|
27
|
+
table?: PptTableModel;
|
|
28
|
+
fillColor?: string;
|
|
29
|
+
fillGradient?: PptGradientFillModel;
|
|
30
|
+
opacity?: number;
|
|
31
|
+
lineColor?: string;
|
|
32
|
+
lineGradient?: PptGradientFillModel;
|
|
33
|
+
lineOpacity?: number;
|
|
34
|
+
lineWidth?: number;
|
|
35
|
+
lineCap?: string;
|
|
36
|
+
lineDash?: string;
|
|
37
|
+
lineHeadEnd?: string;
|
|
38
|
+
lineTailEnd?: string;
|
|
39
|
+
shadow?: PptShapeStyle['shadow'];
|
|
40
|
+
presetGeometry?: string;
|
|
41
|
+
presetAdjustments?: Record<string, number>;
|
|
42
|
+
customGeometry?: PptCustomGeometryModel;
|
|
43
|
+
threeD?: NonNullable<PptShapeModel['raw']>['threeD'];
|
|
44
|
+
usesBackgroundFill?: boolean;
|
|
45
|
+
backgroundFill?: PptSlideBackgroundModel;
|
|
46
|
+
locked: boolean;
|
|
47
|
+
editable: boolean;
|
|
48
|
+
capabilities: PptSceneNodeCapabilities;
|
|
49
|
+
groupContext?: PptSceneGroupContext;
|
|
50
|
+
source: PptShapeModel;
|
|
51
|
+
children: PptSceneNode[];
|
|
52
|
+
}
|
|
53
|
+
interface PptSceneGroupContext {
|
|
54
|
+
parentId: string;
|
|
55
|
+
parentName?: string;
|
|
56
|
+
parentBounds: PptSceneRect;
|
|
57
|
+
parentTransform: {
|
|
58
|
+
childLeft: number;
|
|
59
|
+
childTop: number;
|
|
60
|
+
childWidth: number;
|
|
61
|
+
childHeight: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
interface PptSceneNodeCapabilities {
|
|
65
|
+
readonly select: boolean;
|
|
66
|
+
readonly editText: boolean;
|
|
67
|
+
readonly editTextStyle: boolean;
|
|
68
|
+
readonly editTableCells: boolean;
|
|
69
|
+
readonly editGeometry: boolean;
|
|
70
|
+
readonly editShapeStyle: boolean;
|
|
71
|
+
readonly reason?: string;
|
|
72
|
+
readonly reasons?: Partial<Record<PptSceneNodeCapability, string>>;
|
|
73
|
+
}
|
|
74
|
+
interface PptSlideScene {
|
|
75
|
+
id: string;
|
|
76
|
+
index: number;
|
|
77
|
+
name?: string;
|
|
78
|
+
title?: string;
|
|
79
|
+
size: PptSlideSize;
|
|
80
|
+
background?: PptSlideBackgroundModel;
|
|
81
|
+
nodes: PptSceneNode[];
|
|
82
|
+
groups: PptSceneNode[];
|
|
83
|
+
source: PptSlideModel;
|
|
84
|
+
}
|
|
85
|
+
interface PptPresentationScene {
|
|
86
|
+
size: PptSlideSize;
|
|
87
|
+
slides: PptSlideScene[];
|
|
88
|
+
}
|
|
89
|
+
type PptSceneNodeCapability = 'editText' | 'editTextStyle' | 'editTableCells' | 'editGeometry' | 'editShapeStyle';
|
|
90
|
+
declare const DEFAULT_PPT_SLIDE_SIZE: PptSlideSize;
|
|
91
|
+
declare function buildPptPresentationScene(model: PptPresentationModel): PptPresentationScene;
|
|
92
|
+
declare function buildPptSlideScene(slide: PptSlideModel, fallbackSize: PptSlideSize): PptSlideScene;
|
|
93
|
+
declare function buildPptSceneNode(shape: PptShapeModel, options?: {
|
|
94
|
+
slideSize?: PptSlideSize;
|
|
95
|
+
index?: number;
|
|
96
|
+
background?: PptSlideBackgroundModel;
|
|
97
|
+
backgroundFill?: PptSlideBackgroundModel;
|
|
98
|
+
}): PptSceneNode;
|
|
99
|
+
declare function isPptShapeEditable(shape: PptShapeModel): boolean;
|
|
100
|
+
declare function pptSceneNodeCapabilities(shape: PptShapeModel): PptSceneNodeCapabilities;
|
|
101
|
+
declare function pptSceneGeometryToSourceGeometry(node: PptSceneNode, geometry: Partial<PptShapeGeometry>): Partial<PptShapeGeometry>;
|
|
102
|
+
declare function normalizePptGeometry(geometry?: PptShapeGeometry): PptSceneRect;
|
|
103
|
+
declare function findPptSceneSlide(scene: PptPresentationScene, slideIdOrIndex: string | number): PptSlideScene | null;
|
|
104
|
+
declare function findPptSceneNode(slide: PptSlideScene, shapeIdOrName: string): PptSceneNode | null;
|
|
105
|
+
|
|
106
|
+
interface PptEditorImageResource {
|
|
107
|
+
url: string;
|
|
108
|
+
contentType: string;
|
|
109
|
+
}
|
|
110
|
+
interface PptEditorImagePreviewRequest {
|
|
111
|
+
path: string;
|
|
112
|
+
contentType: string;
|
|
113
|
+
bytes: Uint8Array;
|
|
114
|
+
}
|
|
115
|
+
interface PptEditorFontResource {
|
|
116
|
+
url: string;
|
|
117
|
+
contentType: string;
|
|
118
|
+
family: string;
|
|
119
|
+
weight?: number;
|
|
120
|
+
style?: 'normal' | 'italic';
|
|
121
|
+
}
|
|
122
|
+
interface PptEditorView {
|
|
123
|
+
presentation: Presentation;
|
|
124
|
+
model: PptPresentationModel;
|
|
125
|
+
scene: PptPresentationScene;
|
|
126
|
+
images: Record<string, PptEditorImageResource>;
|
|
127
|
+
fonts: PptEditorFontResource[];
|
|
128
|
+
}
|
|
129
|
+
interface PptEditorViewOptions {
|
|
130
|
+
presentationId?: string;
|
|
131
|
+
resolveImagePreview?: (image: PptEditorImagePreviewRequest) => Promise<PptEditorImageResource | undefined> | PptEditorImageResource | undefined;
|
|
132
|
+
}
|
|
133
|
+
declare function buildPptEditorViewFromPptx(bytes: Uint8Array | ArrayBuffer, options?: PptEditorViewOptions): Promise<PptEditorView>;
|
|
134
|
+
declare function buildPptEditorViewFromModel(model: PptPresentationModel, options?: PptEditorViewOptions): Promise<PptEditorView>;
|
|
135
|
+
declare function buildPptEditorViewFromPresentation(presentation: Presentation, options?: PptEditorViewOptions): Promise<PptEditorView>;
|
|
136
|
+
|
|
137
|
+
type PptEditorSelection = {
|
|
138
|
+
kind: 'slide';
|
|
139
|
+
slideId: string;
|
|
140
|
+
} | {
|
|
141
|
+
kind: 'shape';
|
|
142
|
+
slideId: string;
|
|
143
|
+
shapeId: string;
|
|
144
|
+
} | null;
|
|
145
|
+
type PptEditorCommand = {
|
|
146
|
+
kind: 'select-slide';
|
|
147
|
+
slideIdOrIndex: string | number;
|
|
148
|
+
} | {
|
|
149
|
+
kind: 'select-shape';
|
|
150
|
+
slideIdOrIndex: string | number;
|
|
151
|
+
shapeIdOrName: string;
|
|
152
|
+
} | {
|
|
153
|
+
kind: 'set-shape-text';
|
|
154
|
+
slideIdOrIndex: string | number;
|
|
155
|
+
shapeIdOrName: string;
|
|
156
|
+
text: string;
|
|
157
|
+
} | {
|
|
158
|
+
kind: 'set-shape-text-style';
|
|
159
|
+
slideIdOrIndex: string | number;
|
|
160
|
+
shapeIdOrName: string;
|
|
161
|
+
style: Partial<PptTextStyle>;
|
|
162
|
+
} | {
|
|
163
|
+
kind: 'set-table-cell-text';
|
|
164
|
+
slideIdOrIndex: string | number;
|
|
165
|
+
shapeIdOrName: string;
|
|
166
|
+
row: number;
|
|
167
|
+
column: number;
|
|
168
|
+
text: string;
|
|
169
|
+
} | {
|
|
170
|
+
kind: 'set-shape-geometry';
|
|
171
|
+
slideIdOrIndex: string | number;
|
|
172
|
+
shapeIdOrName: string;
|
|
173
|
+
geometry: Partial<PptShapeGeometry>;
|
|
174
|
+
preserveTextSizeOnResize?: boolean;
|
|
175
|
+
} | {
|
|
176
|
+
kind: 'set-shape-style';
|
|
177
|
+
slideIdOrIndex: string | number;
|
|
178
|
+
shapeIdOrName: string;
|
|
179
|
+
style: Partial<PptShapeStyle>;
|
|
180
|
+
} | {
|
|
181
|
+
kind: 'delete-shape';
|
|
182
|
+
slideIdOrIndex: string | number;
|
|
183
|
+
shapeIdOrName: string;
|
|
184
|
+
} | {
|
|
185
|
+
kind: 'duplicate-shape';
|
|
186
|
+
slideIdOrIndex: string | number;
|
|
187
|
+
shapeIdOrName: string;
|
|
188
|
+
offset?: Partial<PptShapeGeometry>;
|
|
189
|
+
} | {
|
|
190
|
+
kind: 'paste-shape';
|
|
191
|
+
slideIdOrIndex: string | number;
|
|
192
|
+
shapeIdOrName: string;
|
|
193
|
+
offset?: Partial<PptShapeGeometry>;
|
|
194
|
+
} | {
|
|
195
|
+
kind: 'bring-shape-to-front';
|
|
196
|
+
slideIdOrIndex: string | number;
|
|
197
|
+
shapeIdOrName: string;
|
|
198
|
+
} | {
|
|
199
|
+
kind: 'send-shape-to-back';
|
|
200
|
+
slideIdOrIndex: string | number;
|
|
201
|
+
shapeIdOrName: string;
|
|
202
|
+
};
|
|
203
|
+
type PptEditorRuntimeEvent = 'change' | 'selectionChange';
|
|
204
|
+
interface PptEditorChangeEvent {
|
|
205
|
+
readonly revision: number;
|
|
206
|
+
readonly command: PptEditorCommand;
|
|
207
|
+
readonly model: PptPresentationModel;
|
|
208
|
+
readonly scene: PptPresentationScene;
|
|
209
|
+
}
|
|
210
|
+
interface PptEditorSelectionChangeEvent {
|
|
211
|
+
readonly selection: PptEditorSelection;
|
|
212
|
+
}
|
|
213
|
+
interface PptEditorRuntimeEventMap {
|
|
214
|
+
change: PptEditorChangeEvent;
|
|
215
|
+
selectionChange: PptEditorSelectionChangeEvent;
|
|
216
|
+
}
|
|
217
|
+
interface PptEditorSessionOptions {
|
|
218
|
+
maxHistory?: number;
|
|
219
|
+
readOnly?: boolean;
|
|
220
|
+
}
|
|
221
|
+
type Listener<T> = (event: T) => void;
|
|
222
|
+
declare class PptEditorSession {
|
|
223
|
+
private presentationValue;
|
|
224
|
+
private modelValue;
|
|
225
|
+
private sceneValue;
|
|
226
|
+
private selectionValue;
|
|
227
|
+
private revisionValue;
|
|
228
|
+
private readonly undoStack;
|
|
229
|
+
private readonly redoStack;
|
|
230
|
+
private readonly textBodyOverrides;
|
|
231
|
+
private readonly maxHistory;
|
|
232
|
+
private readOnlyValue;
|
|
233
|
+
private readonly changeListeners;
|
|
234
|
+
private readonly selectionListeners;
|
|
235
|
+
constructor(view: PptEditorView, options?: PptEditorSessionOptions);
|
|
236
|
+
presentation(): Presentation;
|
|
237
|
+
model(): PptPresentationModel;
|
|
238
|
+
scene(): PptPresentationScene;
|
|
239
|
+
selection(): PptEditorSelection;
|
|
240
|
+
revision(): number;
|
|
241
|
+
isReadOnly(): boolean;
|
|
242
|
+
setReadOnly(readOnly: boolean): void;
|
|
243
|
+
canUndo(): boolean;
|
|
244
|
+
canRedo(): boolean;
|
|
245
|
+
subscribe<K extends PptEditorRuntimeEvent>(event: K, listener: Listener<PptEditorRuntimeEventMap[K]>): () => void;
|
|
246
|
+
dispatch(command: PptEditorCommand): Promise<void>;
|
|
247
|
+
undo(): Promise<void>;
|
|
248
|
+
redo(): Promise<void>;
|
|
249
|
+
loadPresentation(bytes: Uint8Array | ArrayBuffer): Promise<void>;
|
|
250
|
+
toPptx(): Promise<Uint8Array>;
|
|
251
|
+
verifyExport(): Promise<PptPresentationModel>;
|
|
252
|
+
destroy(): Promise<void>;
|
|
253
|
+
private assertWritable;
|
|
254
|
+
private applySelectionCommand;
|
|
255
|
+
private applyEditCommand;
|
|
256
|
+
private assertEditableSceneNodeForCommand;
|
|
257
|
+
private applyShapeCollectionCommand;
|
|
258
|
+
private refreshAfterChange;
|
|
259
|
+
private replacePresentation;
|
|
260
|
+
private setSelection;
|
|
261
|
+
private pushUndo;
|
|
262
|
+
private historyEntry;
|
|
263
|
+
private restoreTextBodyOverrides;
|
|
264
|
+
private applyTextBodyOverrides;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
interface NativePptEditorOptions {
|
|
268
|
+
styleIsolation?: 'shadow' | 'none';
|
|
269
|
+
/** Allows navigation, selection and copy while blocking every presentation mutation. */
|
|
270
|
+
readOnly?: boolean;
|
|
271
|
+
/** Controls the built-in thumbnail rail for hosts that provide their own slide navigation. */
|
|
272
|
+
showSlideList?: boolean;
|
|
273
|
+
onChange?: (event: {
|
|
274
|
+
revision: number;
|
|
275
|
+
bytes: Uint8Array;
|
|
276
|
+
}) => void | Promise<void>;
|
|
277
|
+
onObjectAction?: (event: {
|
|
278
|
+
action: 'blocked-text-edit' | 'cycle-selection' | 'nudge-geometry' | 'snap-geometry' | 'copy-shape' | 'paste-shape' | 'delete-shape' | 'duplicate-shape' | 'bring-shape-to-front' | 'send-shape-to-back';
|
|
279
|
+
slideId: string;
|
|
280
|
+
shapeId: string;
|
|
281
|
+
kind: PptSceneNode['kind'];
|
|
282
|
+
name?: string;
|
|
283
|
+
reason: string;
|
|
284
|
+
candidateIndex?: number;
|
|
285
|
+
candidateCount?: number;
|
|
286
|
+
}) => void;
|
|
287
|
+
onTextEditStateChange?: (event: {
|
|
288
|
+
state: 'start' | 'commit' | 'cancel';
|
|
289
|
+
slideId: string;
|
|
290
|
+
shapeId: string;
|
|
291
|
+
text: string;
|
|
292
|
+
}) => void;
|
|
293
|
+
onTableCellSelectionChange?: (event: {
|
|
294
|
+
slideId: string;
|
|
295
|
+
shapeId: string;
|
|
296
|
+
row: number;
|
|
297
|
+
column: number;
|
|
298
|
+
text: string;
|
|
299
|
+
}) => void;
|
|
300
|
+
}
|
|
301
|
+
interface NativePptEditor {
|
|
302
|
+
session(): PptEditorSession;
|
|
303
|
+
selection(): PptEditorSelection;
|
|
304
|
+
isReadOnly(): boolean;
|
|
305
|
+
setReadOnly(readOnly: boolean): void;
|
|
306
|
+
dispatch(command: PptEditorCommand): Promise<void>;
|
|
307
|
+
loadPresentation(bytes: Uint8Array | ArrayBuffer): Promise<void>;
|
|
308
|
+
toPptx(): Promise<Uint8Array>;
|
|
309
|
+
canUndo(): boolean;
|
|
310
|
+
canRedo(): boolean;
|
|
311
|
+
undo(): Promise<void>;
|
|
312
|
+
redo(): Promise<void>;
|
|
313
|
+
destroy(): Promise<void>;
|
|
314
|
+
}
|
|
315
|
+
declare function renderNativePptEditor(host: HTMLElement, view: PptEditorView, options?: NativePptEditorOptions): NativePptEditor;
|
|
316
|
+
|
|
317
|
+
export { buildPptSlideScene as A, findPptSceneNode as B, findPptSceneSlide as C, DEFAULT_PPT_SLIDE_SIZE as D, isPptShapeEditable as E, normalizePptGeometry as F, pptSceneGeometryToSourceGeometry as G, pptSceneNodeCapabilities as H, renderNativePptEditor as I, type NativePptEditor as N, type PptEditorChangeEvent as P, type NativePptEditorOptions as a, type PptEditorCommand as b, type PptEditorFontResource as c, type PptEditorImagePreviewRequest as d, type PptEditorImageResource as e, type PptEditorRuntimeEvent as f, type PptEditorRuntimeEventMap as g, type PptEditorSelection as h, type PptEditorSelectionChangeEvent as i, PptEditorSession as j, type PptEditorSessionOptions as k, type PptEditorView as l, type PptEditorViewOptions as m, type PptPresentationScene as n, type PptSceneGroupContext as o, type PptSceneNode as p, type PptSceneNodeCapabilities as q, type PptSceneNodeCapability as r, type PptSceneNodeKind as s, type PptSceneRect as t, type PptSlideScene as u, buildPptEditorViewFromModel as v, buildPptEditorViewFromPptx as w, buildPptEditorViewFromPresentation as x, buildPptPresentationScene as y, buildPptSceneNode as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as EditorParagraphFormat, w as EditorRunFormat, u as EditorRevisionSegment, k as EditorHyperlink, l as EditorImageSegment, g as EditorDrawingSegment, h as EditorFieldSegment, J as EditorTableView, D as EditorTableBorders, F as EditorTableCellView, e as EditorDocumentDefaults, n as EditorPageLayout, f as EditorDocumentView, j as EditorHeaderFooterStoryView, m as EditorNumberingFormat } from './model-DNNBhhCB.cjs';
|
|
2
2
|
import { Package } from '@coco-vexel/coco-office/pack';
|
|
3
3
|
import { PackageIndices } from '@coco-vexel/coco-office/word-view';
|
|
4
4
|
|
|
@@ -756,6 +756,8 @@ type WordEditorCommand = {
|
|
|
756
756
|
interface WordEditorRuntime {
|
|
757
757
|
readonly kind: WordEditorEngineKind;
|
|
758
758
|
readonly destroyed: boolean;
|
|
759
|
+
isReadOnly(): boolean;
|
|
760
|
+
setReadOnly(readOnly: boolean): void;
|
|
759
761
|
destroy(): void;
|
|
760
762
|
loadDocument(view: EditorDocumentView): void;
|
|
761
763
|
getSourceView(): EditorDocumentView;
|
|
@@ -781,6 +783,8 @@ interface WordEditorRuntime {
|
|
|
781
783
|
subscribe<Event extends WordEditorRuntimeEvent>(event: Event, listener: (payload: WordEditorRuntimeEventMap[Event]) => void): () => void;
|
|
782
784
|
}
|
|
783
785
|
interface WordEditorRuntimeOptions {
|
|
786
|
+
/** Allows navigation, selection and copy while blocking every document mutation. */
|
|
787
|
+
readOnly?: boolean;
|
|
784
788
|
onChange?: (event: WordEditorChangeEvent) => void;
|
|
785
789
|
onSelectionChange?: (event: WordEditorSelectionChangeEvent) => void;
|
|
786
790
|
contextMenu?: boolean;
|