@flogeez/angular-tiptap-editor 2.3.0 → 2.4.1
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/CHANGELOG.md +23 -0
- package/README.md +132 -93
- package/esm2022/flogeez-angular-tiptap-editor.mjs +5 -0
- package/esm2022/lib/ate-editor.provider.mjs +38 -0
- package/esm2022/lib/components/bubble-menus/base/ate-base-bubble-menu.mjs +207 -0
- package/esm2022/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.mjs +133 -0
- package/esm2022/lib/components/bubble-menus/color/ate-color-bubble-menu.component.mjs +365 -0
- package/esm2022/lib/components/bubble-menus/image/ate-image-bubble-menu.component.mjs +226 -0
- package/esm2022/lib/components/bubble-menus/link/ate-link-bubble-menu.component.mjs +247 -0
- package/esm2022/lib/components/bubble-menus/table/ate-cell-bubble-menu.component.mjs +121 -0
- package/esm2022/lib/components/bubble-menus/table/ate-table-bubble-menu.component.mjs +266 -0
- package/esm2022/lib/components/bubble-menus/text/ate-bubble-menu.component.mjs +294 -0
- package/esm2022/lib/components/color-picker/ate-color-picker.component.mjs +122 -0
- package/esm2022/lib/components/edit-toggle/ate-edit-toggle.component.mjs +42 -0
- package/esm2022/lib/components/editor/angular-tiptap-editor.component.mjs +953 -0
- package/esm2022/lib/components/slash-commands/ate-slash-commands.component.mjs +329 -0
- package/esm2022/lib/components/toolbar/ate-toolbar.component.mjs +531 -0
- package/esm2022/lib/components/ui/ate-button.component.mjs +90 -0
- package/esm2022/lib/components/ui/ate-separator.component.mjs +31 -0
- package/esm2022/lib/config/ate-editor.config.mjs +76 -0
- package/esm2022/lib/config/ate-global-config.token.mjs +6 -0
- package/esm2022/lib/config/ate-slash-commands.config.mjs +130 -0
- package/esm2022/lib/directives/ate-noop-value-accessor.directive.mjs +40 -0
- package/esm2022/lib/extensions/ate-link-click-behavior.extension.mjs +32 -0
- package/esm2022/lib/extensions/ate-resizable-image.extension.mjs +270 -0
- package/esm2022/lib/extensions/ate-table.extension.mjs +29 -0
- package/esm2022/lib/extensions/ate-tiptap-state.extension.mjs +85 -0
- package/esm2022/lib/extensions/ate-upload-progress.extension.mjs +195 -0
- package/esm2022/lib/extensions/calculators/ate-discovery.calculator.mjs +62 -0
- package/esm2022/lib/extensions/calculators/ate-image.calculator.mjs +8 -0
- package/esm2022/lib/extensions/calculators/ate-marks.calculator.mjs +75 -0
- package/esm2022/lib/extensions/calculators/ate-selection.calculator.mjs +35 -0
- package/esm2022/lib/extensions/calculators/ate-structure.calculator.mjs +34 -0
- package/esm2022/lib/extensions/calculators/ate-table.calculator.mjs +38 -0
- package/esm2022/lib/models/ate-bubble-menu.model.mjs +49 -0
- package/esm2022/lib/models/ate-editor-config.model.mjs +2 -0
- package/esm2022/lib/models/ate-editor-state.model.mjs +90 -0
- package/esm2022/lib/models/ate-image.model.mjs +2 -0
- package/esm2022/lib/models/ate-toolbar.model.mjs +35 -0
- package/esm2022/lib/node-view/ate-angular-node-view.mjs +97 -0
- package/esm2022/lib/node-view/ate-injector.registry.mjs +16 -0
- package/esm2022/lib/node-view/ate-node-view.factory.mjs +125 -0
- package/esm2022/lib/node-view/ate-node-view.models.mjs +2 -0
- package/esm2022/lib/node-view/ate-node-view.renderer.mjs +154 -0
- package/esm2022/lib/node-view/ate-register-angular-component.mjs +49 -0
- package/esm2022/lib/services/ate-color-picker.service.mjs +193 -0
- package/esm2022/lib/services/ate-editor-commands.service.mjs +465 -0
- package/esm2022/lib/services/ate-i18n.service.mjs +410 -0
- package/esm2022/lib/services/ate-image.service.mjs +368 -0
- package/esm2022/lib/services/ate-link.service.mjs +97 -0
- package/esm2022/lib/utils/ate-color.utils.mjs +60 -0
- package/esm2022/public-api.mjs +93 -0
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +1178 -1100
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/index.d.ts +3 -1562
- package/lib/ate-editor.provider.d.ts +21 -0
- package/lib/components/bubble-menus/base/ate-base-bubble-menu.d.ts +71 -0
- package/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.d.ts +60 -0
- package/lib/components/bubble-menus/color/ate-color-bubble-menu.component.d.ts +77 -0
- package/lib/components/bubble-menus/image/ate-image-bubble-menu.component.d.ts +52 -0
- package/lib/components/bubble-menus/link/ate-link-bubble-menu.component.d.ts +55 -0
- package/lib/components/bubble-menus/table/ate-cell-bubble-menu.component.d.ts +12 -0
- package/lib/components/bubble-menus/table/ate-table-bubble-menu.component.d.ts +24 -0
- package/lib/components/bubble-menus/text/ate-bubble-menu.component.d.ts +53 -0
- package/lib/components/color-picker/ate-color-picker.component.d.ts +54 -0
- package/lib/components/edit-toggle/ate-edit-toggle.component.d.ts +13 -0
- package/lib/components/editor/angular-tiptap-editor.component.d.ts +235 -0
- package/lib/components/slash-commands/ate-slash-commands.component.d.ts +43 -0
- package/lib/components/toolbar/ate-toolbar.component.d.ts +47 -0
- package/lib/components/ui/ate-button.component.d.ts +25 -0
- package/lib/components/ui/ate-separator.component.d.ts +7 -0
- package/lib/config/ate-editor.config.d.ts +7 -0
- package/lib/config/ate-global-config.token.d.ts +6 -0
- package/lib/config/ate-slash-commands.config.d.ts +41 -0
- package/lib/directives/ate-noop-value-accessor.directive.d.ts +13 -0
- package/lib/extensions/ate-link-click-behavior.extension.d.ts +2 -0
- package/lib/extensions/ate-resizable-image.extension.d.ts +27 -0
- package/lib/extensions/ate-table.extension.d.ts +2 -0
- package/lib/extensions/ate-tiptap-state.extension.d.ts +7 -0
- package/lib/extensions/ate-upload-progress.extension.d.ts +7 -0
- package/lib/extensions/calculators/ate-discovery.calculator.d.ts +7 -0
- package/lib/extensions/calculators/ate-image.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-marks.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-selection.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-structure.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-table.calculator.d.ts +2 -0
- package/lib/models/ate-bubble-menu.model.d.ts +33 -0
- package/lib/models/ate-editor-config.model.d.ts +100 -0
- package/lib/models/ate-editor-state.model.d.ts +109 -0
- package/lib/models/ate-image.model.d.ts +104 -0
- package/lib/models/ate-toolbar.model.d.ts +18 -0
- package/lib/node-view/ate-angular-node-view.d.ts +115 -0
- package/lib/node-view/ate-injector.registry.d.ts +3 -0
- package/lib/node-view/ate-node-view.factory.d.ts +10 -0
- package/lib/node-view/ate-node-view.models.d.ts +138 -0
- package/lib/node-view/ate-node-view.renderer.d.ts +23 -0
- package/lib/node-view/ate-register-angular-component.d.ts +35 -0
- package/lib/services/ate-color-picker.service.d.ts +65 -0
- package/lib/services/ate-editor-commands.service.d.ts +72 -0
- package/lib/services/ate-i18n.service.d.ts +394 -0
- package/lib/services/ate-image.service.d.ts +71 -0
- package/lib/services/ate-link.service.d.ts +42 -0
- package/lib/utils/ate-color.utils.d.ts +12 -0
- package/package.json +3 -1
- package/public-api.d.ts +112 -0
package/index.d.ts
CHANGED
|
@@ -1,1564 +1,5 @@
|
|
|
1
|
-
import * as _flogeez_angular_tiptap_editor from '@flogeez/angular-tiptap-editor';
|
|
2
|
-
import { Editor, Node as Node$1, Mark, Extension, EditorOptions, JSONContent, NodeConfig } from '@tiptap/core';
|
|
3
|
-
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { AfterViewInit, OnDestroy, ElementRef, Signal, Injector, Type } from '@angular/core';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
7
|
-
import { Node as Node$2 } from '@tiptap/pm/model';
|
|
8
|
-
import { Decoration, EditorView, NodeView } from '@tiptap/pm/view';
|
|
9
|
-
|
|
10
|
-
type SupportedLocale = "en" | "fr" | (string & {});
|
|
11
|
-
interface AteTranslations {
|
|
12
|
-
toolbar: {
|
|
13
|
-
bold: string;
|
|
14
|
-
italic: string;
|
|
15
|
-
underline: string;
|
|
16
|
-
strike: string;
|
|
17
|
-
code: string;
|
|
18
|
-
codeBlock: string;
|
|
19
|
-
superscript: string;
|
|
20
|
-
subscript: string;
|
|
21
|
-
highlight: string;
|
|
22
|
-
highlightPicker: string;
|
|
23
|
-
heading1: string;
|
|
24
|
-
heading2: string;
|
|
25
|
-
heading3: string;
|
|
26
|
-
bulletList: string;
|
|
27
|
-
orderedList: string;
|
|
28
|
-
blockquote: string;
|
|
29
|
-
alignLeft: string;
|
|
30
|
-
alignCenter: string;
|
|
31
|
-
alignRight: string;
|
|
32
|
-
alignJustify: string;
|
|
33
|
-
link: string;
|
|
34
|
-
image: string;
|
|
35
|
-
horizontalRule: string;
|
|
36
|
-
table: string;
|
|
37
|
-
undo: string;
|
|
38
|
-
redo: string;
|
|
39
|
-
clear: string;
|
|
40
|
-
textColor: string;
|
|
41
|
-
customColor: string;
|
|
42
|
-
presets: string;
|
|
43
|
-
};
|
|
44
|
-
bubbleMenu: {
|
|
45
|
-
bold: string;
|
|
46
|
-
italic: string;
|
|
47
|
-
underline: string;
|
|
48
|
-
strike: string;
|
|
49
|
-
code: string;
|
|
50
|
-
superscript: string;
|
|
51
|
-
subscript: string;
|
|
52
|
-
highlight: string;
|
|
53
|
-
highlightPicker: string;
|
|
54
|
-
textColor: string;
|
|
55
|
-
link: string;
|
|
56
|
-
addLink: string;
|
|
57
|
-
editLink: string;
|
|
58
|
-
removeLink: string;
|
|
59
|
-
linkUrl: string;
|
|
60
|
-
linkText: string;
|
|
61
|
-
openLink: string;
|
|
62
|
-
customColor: string;
|
|
63
|
-
presets: string;
|
|
64
|
-
};
|
|
65
|
-
slashCommands: {
|
|
66
|
-
heading1: {
|
|
67
|
-
title: string;
|
|
68
|
-
description: string;
|
|
69
|
-
keywords: string[];
|
|
70
|
-
};
|
|
71
|
-
heading2: {
|
|
72
|
-
title: string;
|
|
73
|
-
description: string;
|
|
74
|
-
keywords: string[];
|
|
75
|
-
};
|
|
76
|
-
heading3: {
|
|
77
|
-
title: string;
|
|
78
|
-
description: string;
|
|
79
|
-
keywords: string[];
|
|
80
|
-
};
|
|
81
|
-
bulletList: {
|
|
82
|
-
title: string;
|
|
83
|
-
description: string;
|
|
84
|
-
keywords: string[];
|
|
85
|
-
};
|
|
86
|
-
orderedList: {
|
|
87
|
-
title: string;
|
|
88
|
-
description: string;
|
|
89
|
-
keywords: string[];
|
|
90
|
-
};
|
|
91
|
-
blockquote: {
|
|
92
|
-
title: string;
|
|
93
|
-
description: string;
|
|
94
|
-
keywords: string[];
|
|
95
|
-
};
|
|
96
|
-
code: {
|
|
97
|
-
title: string;
|
|
98
|
-
description: string;
|
|
99
|
-
keywords: string[];
|
|
100
|
-
};
|
|
101
|
-
image: {
|
|
102
|
-
title: string;
|
|
103
|
-
description: string;
|
|
104
|
-
keywords: string[];
|
|
105
|
-
};
|
|
106
|
-
horizontalRule: {
|
|
107
|
-
title: string;
|
|
108
|
-
description: string;
|
|
109
|
-
keywords: string[];
|
|
110
|
-
};
|
|
111
|
-
table: {
|
|
112
|
-
title: string;
|
|
113
|
-
description: string;
|
|
114
|
-
keywords: string[];
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
table: {
|
|
118
|
-
addRowBefore: string;
|
|
119
|
-
addRowAfter: string;
|
|
120
|
-
deleteRow: string;
|
|
121
|
-
addColumnBefore: string;
|
|
122
|
-
addColumnAfter: string;
|
|
123
|
-
deleteColumn: string;
|
|
124
|
-
deleteTable: string;
|
|
125
|
-
toggleHeaderRow: string;
|
|
126
|
-
toggleHeaderColumn: string;
|
|
127
|
-
mergeCells: string;
|
|
128
|
-
splitCell: string;
|
|
129
|
-
};
|
|
130
|
-
imageUpload: {
|
|
131
|
-
selectImage: string;
|
|
132
|
-
loadError: string;
|
|
133
|
-
uploadingImage: string;
|
|
134
|
-
uploadProgress: string;
|
|
135
|
-
uploadError: string;
|
|
136
|
-
uploadSuccess: string;
|
|
137
|
-
imageTooLarge: string;
|
|
138
|
-
invalidFileType: string;
|
|
139
|
-
dragDropText: string;
|
|
140
|
-
changeImage: string;
|
|
141
|
-
deleteImage: string;
|
|
142
|
-
resizeSmall: string;
|
|
143
|
-
resizeMedium: string;
|
|
144
|
-
resizeLarge: string;
|
|
145
|
-
resizeOriginal: string;
|
|
146
|
-
resizing: string;
|
|
147
|
-
compressing: string;
|
|
148
|
-
compressionError: string;
|
|
149
|
-
validating: string;
|
|
150
|
-
uploadingToServer: string;
|
|
151
|
-
replacingImage: string;
|
|
152
|
-
insertingImage: string;
|
|
153
|
-
noFileSelected: string;
|
|
154
|
-
selectionCancelled: string;
|
|
155
|
-
};
|
|
156
|
-
editor: {
|
|
157
|
-
placeholder: string;
|
|
158
|
-
character: string;
|
|
159
|
-
word: string;
|
|
160
|
-
linkPrompt: string;
|
|
161
|
-
linkUrlPrompt: string;
|
|
162
|
-
confirmDelete: string;
|
|
163
|
-
toggleEdit: string;
|
|
164
|
-
viewMode: string;
|
|
165
|
-
};
|
|
166
|
-
common: {
|
|
167
|
-
cancel: string;
|
|
168
|
-
confirm: string;
|
|
169
|
-
apply: string;
|
|
170
|
-
delete: string;
|
|
171
|
-
save: string;
|
|
172
|
-
close: string;
|
|
173
|
-
loading: string;
|
|
174
|
-
error: string;
|
|
175
|
-
success: string;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
declare class AteI18nService {
|
|
179
|
-
private _currentLocale;
|
|
180
|
-
private _translations;
|
|
181
|
-
readonly currentLocale: _angular_core.Signal<SupportedLocale>;
|
|
182
|
-
/** All loaded translations (useful for dynamic key access) */
|
|
183
|
-
readonly allTranslations: _angular_core.Signal<Record<SupportedLocale, AteTranslations>>;
|
|
184
|
-
readonly translations: _angular_core.Signal<AteTranslations>;
|
|
185
|
-
readonly t: _angular_core.Signal<AteTranslations>;
|
|
186
|
-
readonly toolbar: _angular_core.Signal<{
|
|
187
|
-
bold: string;
|
|
188
|
-
italic: string;
|
|
189
|
-
underline: string;
|
|
190
|
-
strike: string;
|
|
191
|
-
code: string;
|
|
192
|
-
codeBlock: string;
|
|
193
|
-
superscript: string;
|
|
194
|
-
subscript: string;
|
|
195
|
-
highlight: string;
|
|
196
|
-
highlightPicker: string;
|
|
197
|
-
heading1: string;
|
|
198
|
-
heading2: string;
|
|
199
|
-
heading3: string;
|
|
200
|
-
bulletList: string;
|
|
201
|
-
orderedList: string;
|
|
202
|
-
blockquote: string;
|
|
203
|
-
alignLeft: string;
|
|
204
|
-
alignCenter: string;
|
|
205
|
-
alignRight: string;
|
|
206
|
-
alignJustify: string;
|
|
207
|
-
link: string;
|
|
208
|
-
image: string;
|
|
209
|
-
horizontalRule: string;
|
|
210
|
-
table: string;
|
|
211
|
-
undo: string;
|
|
212
|
-
redo: string;
|
|
213
|
-
clear: string;
|
|
214
|
-
textColor: string;
|
|
215
|
-
customColor: string;
|
|
216
|
-
presets: string;
|
|
217
|
-
}>;
|
|
218
|
-
readonly bubbleMenu: _angular_core.Signal<{
|
|
219
|
-
bold: string;
|
|
220
|
-
italic: string;
|
|
221
|
-
underline: string;
|
|
222
|
-
strike: string;
|
|
223
|
-
code: string;
|
|
224
|
-
superscript: string;
|
|
225
|
-
subscript: string;
|
|
226
|
-
highlight: string;
|
|
227
|
-
highlightPicker: string;
|
|
228
|
-
textColor: string;
|
|
229
|
-
link: string;
|
|
230
|
-
addLink: string;
|
|
231
|
-
editLink: string;
|
|
232
|
-
removeLink: string;
|
|
233
|
-
linkUrl: string;
|
|
234
|
-
linkText: string;
|
|
235
|
-
openLink: string;
|
|
236
|
-
customColor: string;
|
|
237
|
-
presets: string;
|
|
238
|
-
}>;
|
|
239
|
-
readonly slashCommands: _angular_core.Signal<{
|
|
240
|
-
heading1: {
|
|
241
|
-
title: string;
|
|
242
|
-
description: string;
|
|
243
|
-
keywords: string[];
|
|
244
|
-
};
|
|
245
|
-
heading2: {
|
|
246
|
-
title: string;
|
|
247
|
-
description: string;
|
|
248
|
-
keywords: string[];
|
|
249
|
-
};
|
|
250
|
-
heading3: {
|
|
251
|
-
title: string;
|
|
252
|
-
description: string;
|
|
253
|
-
keywords: string[];
|
|
254
|
-
};
|
|
255
|
-
bulletList: {
|
|
256
|
-
title: string;
|
|
257
|
-
description: string;
|
|
258
|
-
keywords: string[];
|
|
259
|
-
};
|
|
260
|
-
orderedList: {
|
|
261
|
-
title: string;
|
|
262
|
-
description: string;
|
|
263
|
-
keywords: string[];
|
|
264
|
-
};
|
|
265
|
-
blockquote: {
|
|
266
|
-
title: string;
|
|
267
|
-
description: string;
|
|
268
|
-
keywords: string[];
|
|
269
|
-
};
|
|
270
|
-
code: {
|
|
271
|
-
title: string;
|
|
272
|
-
description: string;
|
|
273
|
-
keywords: string[];
|
|
274
|
-
};
|
|
275
|
-
image: {
|
|
276
|
-
title: string;
|
|
277
|
-
description: string;
|
|
278
|
-
keywords: string[];
|
|
279
|
-
};
|
|
280
|
-
horizontalRule: {
|
|
281
|
-
title: string;
|
|
282
|
-
description: string;
|
|
283
|
-
keywords: string[];
|
|
284
|
-
};
|
|
285
|
-
table: {
|
|
286
|
-
title: string;
|
|
287
|
-
description: string;
|
|
288
|
-
keywords: string[];
|
|
289
|
-
};
|
|
290
|
-
}>;
|
|
291
|
-
readonly table: _angular_core.Signal<{
|
|
292
|
-
addRowBefore: string;
|
|
293
|
-
addRowAfter: string;
|
|
294
|
-
deleteRow: string;
|
|
295
|
-
addColumnBefore: string;
|
|
296
|
-
addColumnAfter: string;
|
|
297
|
-
deleteColumn: string;
|
|
298
|
-
deleteTable: string;
|
|
299
|
-
toggleHeaderRow: string;
|
|
300
|
-
toggleHeaderColumn: string;
|
|
301
|
-
mergeCells: string;
|
|
302
|
-
splitCell: string;
|
|
303
|
-
}>;
|
|
304
|
-
readonly imageUpload: _angular_core.Signal<{
|
|
305
|
-
selectImage: string;
|
|
306
|
-
loadError: string;
|
|
307
|
-
uploadingImage: string;
|
|
308
|
-
uploadProgress: string;
|
|
309
|
-
uploadError: string;
|
|
310
|
-
uploadSuccess: string;
|
|
311
|
-
imageTooLarge: string;
|
|
312
|
-
invalidFileType: string;
|
|
313
|
-
dragDropText: string;
|
|
314
|
-
changeImage: string;
|
|
315
|
-
deleteImage: string;
|
|
316
|
-
resizeSmall: string;
|
|
317
|
-
resizeMedium: string;
|
|
318
|
-
resizeLarge: string;
|
|
319
|
-
resizeOriginal: string;
|
|
320
|
-
resizing: string;
|
|
321
|
-
compressing: string;
|
|
322
|
-
compressionError: string;
|
|
323
|
-
validating: string;
|
|
324
|
-
uploadingToServer: string;
|
|
325
|
-
replacingImage: string;
|
|
326
|
-
insertingImage: string;
|
|
327
|
-
noFileSelected: string;
|
|
328
|
-
selectionCancelled: string;
|
|
329
|
-
}>;
|
|
330
|
-
readonly editor: _angular_core.Signal<{
|
|
331
|
-
placeholder: string;
|
|
332
|
-
character: string;
|
|
333
|
-
word: string;
|
|
334
|
-
linkPrompt: string;
|
|
335
|
-
linkUrlPrompt: string;
|
|
336
|
-
confirmDelete: string;
|
|
337
|
-
toggleEdit: string;
|
|
338
|
-
viewMode: string;
|
|
339
|
-
}>;
|
|
340
|
-
readonly common: _angular_core.Signal<{
|
|
341
|
-
cancel: string;
|
|
342
|
-
confirm: string;
|
|
343
|
-
apply: string;
|
|
344
|
-
delete: string;
|
|
345
|
-
save: string;
|
|
346
|
-
close: string;
|
|
347
|
-
loading: string;
|
|
348
|
-
error: string;
|
|
349
|
-
success: string;
|
|
350
|
-
}>;
|
|
351
|
-
constructor();
|
|
352
|
-
setLocale(locale: SupportedLocale): void;
|
|
353
|
-
autoDetectLocale(): void;
|
|
354
|
-
getSupportedLocales(): SupportedLocale[];
|
|
355
|
-
addTranslations(locale: string, translations: AteTranslations | Partial<AteTranslations>): void;
|
|
356
|
-
private detectBrowserLanguage;
|
|
357
|
-
getToolbarTitle(key: keyof AteTranslations["toolbar"]): string;
|
|
358
|
-
getBubbleMenuTitle(key: keyof AteTranslations["bubbleMenu"]): string;
|
|
359
|
-
getSlashCommand(key: keyof AteTranslations["slashCommands"]): {
|
|
360
|
-
title: string;
|
|
361
|
-
description: string;
|
|
362
|
-
keywords: string[];
|
|
363
|
-
} | {
|
|
364
|
-
title: string;
|
|
365
|
-
description: string;
|
|
366
|
-
keywords: string[];
|
|
367
|
-
} | {
|
|
368
|
-
title: string;
|
|
369
|
-
description: string;
|
|
370
|
-
keywords: string[];
|
|
371
|
-
} | {
|
|
372
|
-
title: string;
|
|
373
|
-
description: string;
|
|
374
|
-
keywords: string[];
|
|
375
|
-
} | {
|
|
376
|
-
title: string;
|
|
377
|
-
description: string;
|
|
378
|
-
keywords: string[];
|
|
379
|
-
} | {
|
|
380
|
-
title: string;
|
|
381
|
-
description: string;
|
|
382
|
-
keywords: string[];
|
|
383
|
-
} | {
|
|
384
|
-
title: string;
|
|
385
|
-
description: string;
|
|
386
|
-
keywords: string[];
|
|
387
|
-
} | {
|
|
388
|
-
title: string;
|
|
389
|
-
description: string;
|
|
390
|
-
keywords: string[];
|
|
391
|
-
} | {
|
|
392
|
-
title: string;
|
|
393
|
-
description: string;
|
|
394
|
-
keywords: string[];
|
|
395
|
-
} | {
|
|
396
|
-
title: string;
|
|
397
|
-
description: string;
|
|
398
|
-
keywords: string[];
|
|
399
|
-
};
|
|
400
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteI18nService, never>;
|
|
401
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AteI18nService>;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
interface AteSlashCommandItem {
|
|
405
|
-
title: string;
|
|
406
|
-
description: string;
|
|
407
|
-
icon: string;
|
|
408
|
-
keywords: string[];
|
|
409
|
-
command: (editor: Editor) => void;
|
|
410
|
-
}
|
|
411
|
-
interface AteCustomSlashCommands {
|
|
412
|
-
commands?: AteSlashCommandItem[];
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
type AteStateCalculator = (editor: Editor) => Partial<{
|
|
416
|
-
[K in keyof AteEditorStateSnapshot]: AteEditorStateSnapshot[K] extends object ? Partial<AteEditorStateSnapshot[K]> : AteEditorStateSnapshot[K];
|
|
417
|
-
}>;
|
|
418
|
-
interface AteEditorStateSnapshot {
|
|
419
|
-
/** Global editor states */
|
|
420
|
-
isFocused: boolean;
|
|
421
|
-
isEditable: boolean;
|
|
422
|
-
/**
|
|
423
|
-
* Detailed selection information to avoid overlap between menus
|
|
424
|
-
*/
|
|
425
|
-
selection: {
|
|
426
|
-
type: "text" | "node" | "cell" | "none";
|
|
427
|
-
from: number;
|
|
428
|
-
to: number;
|
|
429
|
-
empty: boolean;
|
|
430
|
-
/** Specific for CellSelection */
|
|
431
|
-
isSingleCell: boolean;
|
|
432
|
-
};
|
|
433
|
-
/** Text formatting states (Marks) */
|
|
434
|
-
marks: {
|
|
435
|
-
bold: boolean;
|
|
436
|
-
italic: boolean;
|
|
437
|
-
underline: boolean;
|
|
438
|
-
strike: boolean;
|
|
439
|
-
code: boolean;
|
|
440
|
-
superscript: boolean;
|
|
441
|
-
subscript: boolean;
|
|
442
|
-
highlight: boolean;
|
|
443
|
-
link: boolean;
|
|
444
|
-
linkHref: string | null;
|
|
445
|
-
color: string | null;
|
|
446
|
-
computedColor: string | null;
|
|
447
|
-
background: string | null;
|
|
448
|
-
computedBackground: string | null;
|
|
449
|
-
linkOpenOnClick: boolean;
|
|
450
|
-
};
|
|
451
|
-
/** Capability states (canExecute) */
|
|
452
|
-
can: {
|
|
453
|
-
toggleBold: boolean;
|
|
454
|
-
toggleItalic: boolean;
|
|
455
|
-
toggleUnderline: boolean;
|
|
456
|
-
toggleStrike: boolean;
|
|
457
|
-
toggleCode: boolean;
|
|
458
|
-
toggleHighlight: boolean;
|
|
459
|
-
toggleLink: boolean;
|
|
460
|
-
toggleSuperscript: boolean;
|
|
461
|
-
toggleSubscript: boolean;
|
|
462
|
-
setColor: boolean;
|
|
463
|
-
setHighlight: boolean;
|
|
464
|
-
undo: boolean;
|
|
465
|
-
redo: boolean;
|
|
466
|
-
/** Table specific capabilities */
|
|
467
|
-
addRowBefore: boolean;
|
|
468
|
-
addRowAfter: boolean;
|
|
469
|
-
deleteRow: boolean;
|
|
470
|
-
addColumnBefore: boolean;
|
|
471
|
-
addColumnAfter: boolean;
|
|
472
|
-
deleteColumn: boolean;
|
|
473
|
-
deleteTable: boolean;
|
|
474
|
-
mergeCells: boolean;
|
|
475
|
-
splitCell: boolean;
|
|
476
|
-
toggleHeaderRow: boolean;
|
|
477
|
-
toggleHeaderColumn: boolean;
|
|
478
|
-
/** Structure/Node capabilities */
|
|
479
|
-
toggleHeading1: boolean;
|
|
480
|
-
toggleHeading2: boolean;
|
|
481
|
-
toggleHeading3: boolean;
|
|
482
|
-
toggleBulletList: boolean;
|
|
483
|
-
toggleOrderedList: boolean;
|
|
484
|
-
toggleBlockquote: boolean;
|
|
485
|
-
toggleCodeBlock: boolean;
|
|
486
|
-
setTextAlignLeft: boolean;
|
|
487
|
-
setTextAlignCenter: boolean;
|
|
488
|
-
setTextAlignRight: boolean;
|
|
489
|
-
setTextAlignJustify: boolean;
|
|
490
|
-
insertHorizontalRule: boolean;
|
|
491
|
-
insertTable: boolean;
|
|
492
|
-
insertImage: boolean;
|
|
493
|
-
};
|
|
494
|
-
/** Current node context */
|
|
495
|
-
nodes: {
|
|
496
|
-
isTable: boolean;
|
|
497
|
-
isTableNodeSelected: boolean;
|
|
498
|
-
isTableCell: boolean;
|
|
499
|
-
isImage: boolean;
|
|
500
|
-
isBlockquote: boolean;
|
|
501
|
-
isCodeBlock: boolean;
|
|
502
|
-
isBulletList: boolean;
|
|
503
|
-
isOrderedList: boolean;
|
|
504
|
-
/** Headings */
|
|
505
|
-
h1: boolean;
|
|
506
|
-
h2: boolean;
|
|
507
|
-
h3: boolean;
|
|
508
|
-
/** Alignment */
|
|
509
|
-
alignLeft: boolean;
|
|
510
|
-
alignCenter: boolean;
|
|
511
|
-
alignRight: boolean;
|
|
512
|
-
alignJustify: boolean;
|
|
513
|
-
/** Table specific */
|
|
514
|
-
isTableHeaderRow: boolean;
|
|
515
|
-
isTableHeaderColumn: boolean;
|
|
516
|
-
/** Name of the active node at selection head */
|
|
517
|
-
activeNodeName: string | null;
|
|
518
|
-
};
|
|
519
|
-
/** Placeholder for custom extension states */
|
|
520
|
-
custom: Record<string, unknown>;
|
|
521
|
-
}
|
|
522
|
-
declare const ATE_INITIAL_EDITOR_STATE: AteEditorStateSnapshot;
|
|
523
|
-
|
|
524
|
-
interface AteImageData {
|
|
525
|
-
src: string;
|
|
526
|
-
alt?: string;
|
|
527
|
-
title?: string;
|
|
528
|
-
width?: number;
|
|
529
|
-
height?: number;
|
|
530
|
-
}
|
|
531
|
-
interface AteImageUploadResult {
|
|
532
|
-
src: string;
|
|
533
|
-
name: string;
|
|
534
|
-
size: number;
|
|
535
|
-
type: string;
|
|
536
|
-
width?: number;
|
|
537
|
-
height?: number;
|
|
538
|
-
originalSize?: number;
|
|
539
|
-
}
|
|
540
|
-
interface AteResizeOptions {
|
|
541
|
-
width?: number;
|
|
542
|
-
height?: number;
|
|
543
|
-
maintainAspectRatio?: boolean;
|
|
544
|
-
}
|
|
545
|
-
interface AteImageUploadOptions {
|
|
546
|
-
quality?: number;
|
|
547
|
-
maxWidth?: number;
|
|
548
|
-
maxHeight?: number;
|
|
549
|
-
maxSize?: number;
|
|
550
|
-
allowedTypes?: string[];
|
|
551
|
-
}
|
|
552
1
|
/**
|
|
553
|
-
*
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
554
3
|
*/
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
file: File;
|
|
558
|
-
/** Width of the processed image */
|
|
559
|
-
width: number;
|
|
560
|
-
/** Height of the processed image */
|
|
561
|
-
height: number;
|
|
562
|
-
/** MIME type of the image */
|
|
563
|
-
type: string;
|
|
564
|
-
/** Base64 data URL of the processed image (after compression/resize) */
|
|
565
|
-
base64: string;
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* Result expected from a custom image upload handler.
|
|
569
|
-
* Must contain at least the `src` property with the image URL.
|
|
570
|
-
*/
|
|
571
|
-
interface AteImageUploadHandlerResult {
|
|
572
|
-
/** URL of the uploaded image (can be a remote URL or any string) */
|
|
573
|
-
src: string;
|
|
574
|
-
/** Optional custom alt text */
|
|
575
|
-
alt?: string;
|
|
576
|
-
/** Optional custom title */
|
|
577
|
-
title?: string;
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* Custom handler function for image uploads.
|
|
581
|
-
* Allows users to implement their own image storage logic (e.g., upload to S3, Cloudinary, etc.)
|
|
582
|
-
*
|
|
583
|
-
* Can return either a Promise or an Observable (Angular-friendly).
|
|
584
|
-
*
|
|
585
|
-
* @param context - Context containing the image file and metadata
|
|
586
|
-
* @returns Promise or Observable resolving to ImageUploadHandlerResult
|
|
587
|
-
*
|
|
588
|
-
* @example Using Promise (async/await)
|
|
589
|
-
* ```typescript
|
|
590
|
-
* uploadHandler: ImageUploadHandler = async (ctx) => {
|
|
591
|
-
* const formData = new FormData();
|
|
592
|
-
* formData.append('image', ctx.file);
|
|
593
|
-
* const result = await firstValueFrom(this.http.post<{url: string}>('/api/upload', formData));
|
|
594
|
-
* return { src: result.url };
|
|
595
|
-
* };
|
|
596
|
-
* ```
|
|
597
|
-
*
|
|
598
|
-
* @example Using Observable (Angular HttpClient)
|
|
599
|
-
* ```typescript
|
|
600
|
-
* uploadHandler: ImageUploadHandler = (ctx) => {
|
|
601
|
-
* const formData = new FormData();
|
|
602
|
-
* formData.append('image', ctx.file);
|
|
603
|
-
* return this.http.post<{url: string}>('/api/upload', formData).pipe(
|
|
604
|
-
* map(result => ({ src: result.url }))
|
|
605
|
-
* );
|
|
606
|
-
* };
|
|
607
|
-
* ```
|
|
608
|
-
*/
|
|
609
|
-
type AteImageUploadHandler = (context: AteImageUploadContext) => Promise<AteImageUploadHandlerResult> | Observable<AteImageUploadHandlerResult>;
|
|
610
|
-
/**
|
|
611
|
-
* Interface dedicated to image upload configuration.
|
|
612
|
-
*/
|
|
613
|
-
interface AteImageUploadConfig {
|
|
614
|
-
/** Callback function to handle upload (Promise or Observable) */
|
|
615
|
-
handler?: AteImageUploadHandler;
|
|
616
|
-
/** Compression quality (0 to 1) */
|
|
617
|
-
quality?: number;
|
|
618
|
-
/** Maximum allowed width in pixels */
|
|
619
|
-
maxWidth?: number;
|
|
620
|
-
/** Maximum allowed height in pixels */
|
|
621
|
-
maxHeight?: number;
|
|
622
|
-
/** Maximum allowed size in MB */
|
|
623
|
-
maxSize?: number;
|
|
624
|
-
/** Accepted file types (e.g., ['image/jpeg', 'image/png']) */
|
|
625
|
-
allowedTypes?: string[];
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
declare class AteEditorCommandsService {
|
|
629
|
-
private imageService;
|
|
630
|
-
private colorPickerSvc;
|
|
631
|
-
private linkSvc;
|
|
632
|
-
private readonly _editorState;
|
|
633
|
-
/** Exposed editor state as a readonly signal */
|
|
634
|
-
readonly editorState: _angular_core.Signal<AteEditorStateSnapshot>;
|
|
635
|
-
/** Signal to track when the toolbar is being hovered/interacted with */
|
|
636
|
-
private readonly _isToolbarInteracting;
|
|
637
|
-
readonly isToolbarInteracting: _angular_core.Signal<boolean>;
|
|
638
|
-
/** Set toolbar interaction state (called by editor component) */
|
|
639
|
-
setToolbarInteracting(value: boolean): void;
|
|
640
|
-
readonly isUploading: _angular_core.Signal<boolean>;
|
|
641
|
-
readonly uploadProgress: _angular_core.Signal<number>;
|
|
642
|
-
readonly uploadMessage: _angular_core.Signal<string>;
|
|
643
|
-
set uploadHandler(handler: AteImageUploadHandler | null);
|
|
644
|
-
/** Update state (called by TiptapStateExtension) */
|
|
645
|
-
updateState(state: AteEditorStateSnapshot): void;
|
|
646
|
-
/** Signal to toggle link edit mode from UI (Toolbar) - Immediate response */
|
|
647
|
-
readonly linkEditMode: _angular_core.Signal<boolean>;
|
|
648
|
-
/** Reference to the element that triggered the link menu (for anchoring) */
|
|
649
|
-
readonly linkMenuTrigger: _angular_core.Signal<HTMLElement | null>;
|
|
650
|
-
/** Signal to toggle color picker mode from UI (text or highlight) */
|
|
651
|
-
readonly colorEditMode: _angular_core.Signal<_flogeez_angular_tiptap_editor.AteColorEditMode | null>;
|
|
652
|
-
/** Reference to the element that triggered the color menu (for anchoring) */
|
|
653
|
-
readonly colorMenuTrigger: _angular_core.Signal<HTMLElement | null>;
|
|
654
|
-
/** Generic method to execute any command by name */
|
|
655
|
-
execute(editor: Editor, command: string, ...args: unknown[]): void;
|
|
656
|
-
toggleBold(editor: Editor): void;
|
|
657
|
-
toggleItalic(editor: Editor): void;
|
|
658
|
-
toggleStrike(editor: Editor): void;
|
|
659
|
-
toggleCode(editor: Editor): void;
|
|
660
|
-
toggleCodeBlock(editor: Editor): void;
|
|
661
|
-
toggleUnderline(editor: Editor): void;
|
|
662
|
-
toggleSuperscript(editor: Editor): void;
|
|
663
|
-
toggleSubscript(editor: Editor): void;
|
|
664
|
-
toggleHeading(editor: Editor, level: 1 | 2 | 3): void;
|
|
665
|
-
toggleHighlight(editor: Editor, color?: string): void;
|
|
666
|
-
toggleBulletList(editor: Editor): void;
|
|
667
|
-
toggleOrderedList(editor: Editor): void;
|
|
668
|
-
toggleBlockquote(editor: Editor): void;
|
|
669
|
-
setTextAlign(editor: Editor, alignment: "left" | "center" | "right" | "justify"): void;
|
|
670
|
-
insertHorizontalRule(editor: Editor): void;
|
|
671
|
-
undo(editor: Editor): void;
|
|
672
|
-
redo(editor: Editor): void;
|
|
673
|
-
insertTable(editor: Editor, rows?: number, cols?: number): void;
|
|
674
|
-
addColumnBefore(editor: Editor): void;
|
|
675
|
-
addColumnAfter(editor: Editor): void;
|
|
676
|
-
deleteColumn(editor: Editor): void;
|
|
677
|
-
addRowBefore(editor: Editor): void;
|
|
678
|
-
addRowAfter(editor: Editor): void;
|
|
679
|
-
deleteRow(editor: Editor): void;
|
|
680
|
-
deleteTable(editor: Editor): void;
|
|
681
|
-
mergeCells(editor: Editor): void;
|
|
682
|
-
splitCell(editor: Editor): void;
|
|
683
|
-
toggleHeaderColumn(editor: Editor): void;
|
|
684
|
-
toggleHeaderRow(editor: Editor): void;
|
|
685
|
-
clearContent(editor: Editor): void;
|
|
686
|
-
focus(editor: Editor): void;
|
|
687
|
-
blur(editor: Editor): void;
|
|
688
|
-
setContent(editor: Editor, content: string, emitUpdate?: boolean): void;
|
|
689
|
-
setEditable(editor: Editor, editable: boolean): void;
|
|
690
|
-
insertContent(editor: Editor, content: string): void;
|
|
691
|
-
insertImage(editor: Editor, options?: AteImageUploadOptions): Promise<void>;
|
|
692
|
-
uploadImage(editor: Editor, file: File, options?: AteImageUploadOptions): Promise<void>;
|
|
693
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteEditorCommandsService, never>;
|
|
694
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AteEditorCommandsService>;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Clés des commandes natives dans l'ordre d'affichage
|
|
699
|
-
*/
|
|
700
|
-
declare const ATE_SLASH_COMMAND_KEYS: readonly ["heading1", "heading2", "heading3", "bulletList", "orderedList", "blockquote", "code", "image", "horizontalRule", "table"];
|
|
701
|
-
type AteSlashCommandKey = (typeof ATE_SLASH_COMMAND_KEYS)[number];
|
|
702
|
-
/**
|
|
703
|
-
* Configuration simplifiée pour activer/désactiver les slash commands natives.
|
|
704
|
-
* Permet aussi d'ajouter des commandes personnalisées.
|
|
705
|
-
*/
|
|
706
|
-
interface AteSlashCommandsConfig extends Partial<Record<AteSlashCommandKey, boolean>> {
|
|
707
|
-
/**
|
|
708
|
-
* Liste de commandes supplémentaires à ajouter à la fin du menu
|
|
709
|
-
*/
|
|
710
|
-
custom?: AteSlashCommandItem[];
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Configuration par défaut : toutes les commandes natives sont activées
|
|
714
|
-
*/
|
|
715
|
-
declare const ATE_DEFAULT_SLASH_COMMANDS_CONFIG: AteSlashCommandsConfig;
|
|
716
|
-
/**
|
|
717
|
-
* Factory pour créer les commandes natives avec leurs traductions et leur logique d'exécution.
|
|
718
|
-
* Utilise les services de l'éditeur pour garantir une cohérence de comportement.
|
|
719
|
-
*/
|
|
720
|
-
declare function createDefaultSlashCommands(i18n: AteI18nService, commands: AteEditorCommandsService, imageOptions?: {
|
|
721
|
-
quality?: number;
|
|
722
|
-
maxWidth?: number;
|
|
723
|
-
maxHeight?: number;
|
|
724
|
-
allowedTypes?: string[];
|
|
725
|
-
}): AteSlashCommandItem[];
|
|
726
|
-
/**
|
|
727
|
-
* Filtre et assemble les commandes selon la configuration fournie.
|
|
728
|
-
*/
|
|
729
|
-
declare function filterSlashCommands(config: AteSlashCommandsConfig, i18n: AteI18nService, commands: AteEditorCommandsService, imageOptions?: {
|
|
730
|
-
quality?: number;
|
|
731
|
-
maxWidth?: number;
|
|
732
|
-
maxHeight?: number;
|
|
733
|
-
allowedTypes?: string[];
|
|
734
|
-
}): AteSlashCommandItem[];
|
|
735
|
-
|
|
736
|
-
/**
|
|
737
|
-
* Clés des boutons de la barre d'outils native
|
|
738
|
-
*/
|
|
739
|
-
declare const ATE_TOOLBAR_KEYS: readonly ["bold", "italic", "underline", "strike", "code", "codeBlock", "superscript", "subscript", "highlight", "highlightPicker", "heading1", "heading2", "heading3", "bulletList", "orderedList", "blockquote", "alignLeft", "alignCenter", "alignRight", "alignJustify", "link", "image", "horizontalRule", "table", "undo", "redo", "clear", "textColor", "separator"];
|
|
740
|
-
type AteToolbarKey = (typeof ATE_TOOLBAR_KEYS)[number];
|
|
741
|
-
interface AteToolbarConfig extends Partial<Record<AteToolbarKey, boolean>> {
|
|
742
|
-
/**
|
|
743
|
-
* Boutons personnalisés à ajouter
|
|
744
|
-
*/
|
|
745
|
-
custom?: AteCustomToolbarItem[];
|
|
746
|
-
}
|
|
747
|
-
interface AteCustomToolbarItem {
|
|
748
|
-
key: string;
|
|
749
|
-
label: string;
|
|
750
|
-
icon: string;
|
|
751
|
-
command: (editor: Editor) => void | Promise<void>;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* Clés des options du menu bulle de texte
|
|
756
|
-
*/
|
|
757
|
-
declare const ATE_BUBBLE_MENU_KEYS: readonly ["bold", "italic", "underline", "strike", "code", "superscript", "subscript", "highlight", "highlightPicker", "textColor", "link", "separator"];
|
|
758
|
-
type AteBubbleMenuKey = (typeof ATE_BUBBLE_MENU_KEYS)[number];
|
|
759
|
-
interface AteBubbleMenuConfig extends Partial<Record<AteBubbleMenuKey, boolean>> {
|
|
760
|
-
custom?: AteCustomBubbleMenuItem[];
|
|
761
|
-
}
|
|
762
|
-
interface AteCustomBubbleMenuItem {
|
|
763
|
-
key: string;
|
|
764
|
-
label: string;
|
|
765
|
-
icon: string;
|
|
766
|
-
command: (editor: Editor) => void | Promise<void>;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* Clés des options du menu bulle d'image
|
|
770
|
-
*/
|
|
771
|
-
declare const ATE_IMAGE_BUBBLE_MENU_KEYS: readonly ["changeImage", "resizeSmall", "resizeMedium", "resizeLarge", "resizeOriginal", "deleteImage", "separator"];
|
|
772
|
-
type AteImageBubbleMenuKey = (typeof ATE_IMAGE_BUBBLE_MENU_KEYS)[number];
|
|
773
|
-
type AteImageBubbleMenuConfig = Partial<Record<AteImageBubbleMenuKey, boolean>>;
|
|
774
|
-
/**
|
|
775
|
-
* Clés des options du menu de table
|
|
776
|
-
*/
|
|
777
|
-
declare const ATE_TABLE_BUBBLE_MENU_KEYS: readonly ["addRowBefore", "addRowAfter", "deleteRow", "addColumnBefore", "addColumnAfter", "deleteColumn", "deleteTable", "toggleHeaderRow", "toggleHeaderColumn", "separator"];
|
|
778
|
-
type AteTableBubbleMenuKey = (typeof ATE_TABLE_BUBBLE_MENU_KEYS)[number];
|
|
779
|
-
type AteTableBubbleMenuConfig = Partial<Record<AteTableBubbleMenuKey, boolean>>;
|
|
780
|
-
/**
|
|
781
|
-
* Clés des options du menu de cellule
|
|
782
|
-
*/
|
|
783
|
-
declare const ATE_CELL_BUBBLE_MENU_KEYS: readonly ["mergeCells", "splitCell"];
|
|
784
|
-
type AteCellBubbleMenuKey = (typeof ATE_CELL_BUBBLE_MENU_KEYS)[number];
|
|
785
|
-
type AteCellBubbleMenuConfig = Partial<Record<AteCellBubbleMenuKey, boolean>>;
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* Global configuration interface for Angular Tiptap Editor.
|
|
789
|
-
* Uses a flat structure for common settings and objects for complex configurations.
|
|
790
|
-
*/
|
|
791
|
-
interface AteEditorConfig {
|
|
792
|
-
/** Editor theme: light, dark, or system auto-detection */
|
|
793
|
-
theme?: "light" | "dark" | "auto";
|
|
794
|
-
/** Display mode: classic or seamless (no borders/background) */
|
|
795
|
-
mode?: "classic" | "seamless";
|
|
796
|
-
/** Editor height (e.g., '300px', 'auto') */
|
|
797
|
-
height?: string;
|
|
798
|
-
/** Focus position on initialization */
|
|
799
|
-
autofocus?: "start" | "end" | "all" | boolean | number;
|
|
800
|
-
/** Placeholder text displayed when the editor is empty */
|
|
801
|
-
placeholder?: string;
|
|
802
|
-
/** Initial editing state (if false, the editor is read-only) */
|
|
803
|
-
editable?: boolean;
|
|
804
|
-
/** Minimum editor height (e.g., '200px') */
|
|
805
|
-
minHeight?: string;
|
|
806
|
-
/** Maximum editor height (e.g., '500px') */
|
|
807
|
-
maxHeight?: string;
|
|
808
|
-
/** If true, the editor takes 100% of the parent container's height */
|
|
809
|
-
fillContainer?: boolean;
|
|
810
|
-
/** Disabled state (often used with forms) */
|
|
811
|
-
disabled?: boolean;
|
|
812
|
-
/** Editor locale (overrides the global i18n service) */
|
|
813
|
-
locale?: string;
|
|
814
|
-
/** Enable browser spellcheck */
|
|
815
|
-
spellcheck?: boolean;
|
|
816
|
-
/** Enable smart cleanup when pasting from Office/Word */
|
|
817
|
-
enableOfficePaste?: boolean;
|
|
818
|
-
/** Show or hide the toolbar */
|
|
819
|
-
showToolbar?: boolean;
|
|
820
|
-
/** Show or hide the footer (counters area) */
|
|
821
|
-
showFooter?: boolean;
|
|
822
|
-
/** Show or hide the character count */
|
|
823
|
-
showCharacterCount?: boolean;
|
|
824
|
-
/** Show or hide the word count */
|
|
825
|
-
showWordCount?: boolean;
|
|
826
|
-
/** Show or hide the read-only/edit toggle button */
|
|
827
|
-
showEditToggle?: boolean;
|
|
828
|
-
/** Show or hide the text context menu */
|
|
829
|
-
showBubbleMenu?: boolean;
|
|
830
|
-
/** Show or hide the image context menu */
|
|
831
|
-
showImageBubbleMenu?: boolean;
|
|
832
|
-
/** Show or hide the table menu */
|
|
833
|
-
showTableMenu?: boolean;
|
|
834
|
-
/** Show or hide the cell menu */
|
|
835
|
-
showCellMenu?: boolean;
|
|
836
|
-
/** Enable or disable slash commands (/) */
|
|
837
|
-
enableSlashCommands?: boolean;
|
|
838
|
-
/** Maximum number of characters allowed */
|
|
839
|
-
maxCharacters?: number;
|
|
840
|
-
/** Detailed toolbar configuration (items, groups) */
|
|
841
|
-
toolbar?: AteToolbarConfig;
|
|
842
|
-
/** Text context menu configuration */
|
|
843
|
-
bubbleMenu?: AteBubbleMenuConfig;
|
|
844
|
-
/** Image context menu configuration */
|
|
845
|
-
imageBubbleMenu?: AteImageBubbleMenuConfig;
|
|
846
|
-
/** Table context menu configuration */
|
|
847
|
-
tableBubbleMenu?: AteTableBubbleMenuConfig;
|
|
848
|
-
/** Cell context menu configuration */
|
|
849
|
-
cellBubbleMenu?: AteCellBubbleMenuConfig;
|
|
850
|
-
/** Slash commands configuration (/) */
|
|
851
|
-
slashCommands?: AteSlashCommandsConfig;
|
|
852
|
-
/** If true, shows the floating toolbar on focus */
|
|
853
|
-
floatingToolbar?: boolean;
|
|
854
|
-
/** Technical configuration for image uploads */
|
|
855
|
-
imageUpload?: AteImageUploadConfig;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* Noop Value Accessor Directive
|
|
860
|
-
* @link https://medium.com/netanelbasal/forwarding-form-controls-to-custom-control-components-in-angular-701e8406cc55
|
|
861
|
-
*/
|
|
862
|
-
declare class AteNoopValueAccessorDirective implements ControlValueAccessor {
|
|
863
|
-
writeValue(_obj: unknown): void;
|
|
864
|
-
registerOnChange(_fn: unknown): void;
|
|
865
|
-
registerOnTouched(_fn: unknown): void;
|
|
866
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteNoopValueAccessorDirective, never>;
|
|
867
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AteNoopValueAccessorDirective, never, never, {}, {}, never, never, true, never>;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
declare class AngularTiptapEditorComponent implements AfterViewInit, OnDestroy {
|
|
871
|
-
/** Configuration globale de l'éditeur */
|
|
872
|
-
config: _angular_core.InputSignal<AteEditorConfig>;
|
|
873
|
-
content: _angular_core.InputSignal<string>;
|
|
874
|
-
placeholder: _angular_core.InputSignal<string>;
|
|
875
|
-
editable: _angular_core.InputSignal<boolean>;
|
|
876
|
-
disabled: _angular_core.InputSignal<boolean>;
|
|
877
|
-
minHeight: _angular_core.InputSignal<number>;
|
|
878
|
-
height: _angular_core.InputSignal<number | undefined>;
|
|
879
|
-
maxHeight: _angular_core.InputSignal<number | undefined>;
|
|
880
|
-
fillContainer: _angular_core.InputSignal<boolean>;
|
|
881
|
-
showToolbar: _angular_core.InputSignal<boolean>;
|
|
882
|
-
showFooter: _angular_core.InputSignal<boolean>;
|
|
883
|
-
showCharacterCount: _angular_core.InputSignal<boolean>;
|
|
884
|
-
showWordCount: _angular_core.InputSignal<boolean>;
|
|
885
|
-
maxCharacters: _angular_core.InputSignal<number | undefined>;
|
|
886
|
-
enableOfficePaste: _angular_core.InputSignal<boolean>;
|
|
887
|
-
enableSlashCommands: _angular_core.InputSignal<boolean>;
|
|
888
|
-
slashCommands: _angular_core.InputSignal<AteSlashCommandsConfig>;
|
|
889
|
-
customSlashCommands: _angular_core.InputSignal<AteCustomSlashCommands | undefined>;
|
|
890
|
-
locale: _angular_core.InputSignal<SupportedLocale | undefined>;
|
|
891
|
-
autofocus: _angular_core.InputSignal<number | boolean | "start" | "end" | "all">;
|
|
892
|
-
seamless: _angular_core.InputSignal<boolean>;
|
|
893
|
-
floatingToolbar: _angular_core.InputSignal<boolean>;
|
|
894
|
-
showEditToggle: _angular_core.InputSignal<boolean>;
|
|
895
|
-
spellcheck: _angular_core.InputSignal<boolean>;
|
|
896
|
-
tiptapExtensions: _angular_core.InputSignal<(Node$1<any, any> | Mark<any, any> | Extension<any, any>)[]>;
|
|
897
|
-
tiptapOptions: _angular_core.InputSignal<Partial<EditorOptions>>;
|
|
898
|
-
showBubbleMenu: _angular_core.InputSignal<boolean>;
|
|
899
|
-
bubbleMenu: _angular_core.InputSignal<Partial<AteBubbleMenuConfig>>;
|
|
900
|
-
showImageBubbleMenu: _angular_core.InputSignal<boolean>;
|
|
901
|
-
imageBubbleMenu: _angular_core.InputSignal<Partial<Partial<Record<"separator" | "changeImage" | "resizeSmall" | "resizeMedium" | "resizeLarge" | "resizeOriginal" | "deleteImage", boolean>>>>;
|
|
902
|
-
toolbar: _angular_core.InputSignal<Partial<AteToolbarConfig>>;
|
|
903
|
-
showTableBubbleMenu: _angular_core.InputSignal<boolean>;
|
|
904
|
-
tableBubbleMenu: _angular_core.InputSignal<Partial<Partial<Record<"addColumnBefore" | "addColumnAfter" | "deleteColumn" | "addRowBefore" | "addRowAfter" | "deleteRow" | "deleteTable" | "toggleHeaderColumn" | "toggleHeaderRow" | "separator", boolean>>>>;
|
|
905
|
-
showCellBubbleMenu: _angular_core.InputSignal<boolean>;
|
|
906
|
-
cellBubbleMenu: _angular_core.InputSignal<Partial<Partial<Record<"mergeCells" | "splitCell", boolean>>>>;
|
|
907
|
-
/**
|
|
908
|
-
* Additionnal state calculators to extend the reactive editor state.
|
|
909
|
-
*/
|
|
910
|
-
stateCalculators: _angular_core.InputSignal<AteStateCalculator[]>;
|
|
911
|
-
imageUpload: _angular_core.InputSignal<Partial<AteImageUploadOptions>>;
|
|
912
|
-
/**
|
|
913
|
-
* Custom handler for image uploads.
|
|
914
|
-
* When provided, images will be processed through this handler instead of being converted to base64.
|
|
915
|
-
* This allows you to upload images to your own server/storage and use the returned URL.
|
|
916
|
-
*
|
|
917
|
-
* @example
|
|
918
|
-
* ```typescript
|
|
919
|
-
* myUploadHandler: ImageUploadHandler = async (context) => {
|
|
920
|
-
* const formData = new FormData();
|
|
921
|
-
* formData.append('image', context.file);
|
|
922
|
-
* const response = await fetch('/api/upload', { method: 'POST', body: formData });
|
|
923
|
-
* const data = await response.json();
|
|
924
|
-
* return { src: data.imageUrl };
|
|
925
|
-
* };
|
|
926
|
-
*
|
|
927
|
-
* // In template:
|
|
928
|
-
* // <angular-tiptap-editor [imageUploadHandler]="myUploadHandler" />
|
|
929
|
-
* ```
|
|
930
|
-
*/
|
|
931
|
-
imageUploadHandler: _angular_core.InputSignal<AteImageUploadHandler | undefined>;
|
|
932
|
-
contentChange: _angular_core.OutputEmitterRef<string>;
|
|
933
|
-
editorCreated: _angular_core.OutputEmitterRef<Editor>;
|
|
934
|
-
editorUpdate: _angular_core.OutputEmitterRef<{
|
|
935
|
-
editor: Editor;
|
|
936
|
-
transaction: unknown;
|
|
937
|
-
}>;
|
|
938
|
-
editorFocus: _angular_core.OutputEmitterRef<{
|
|
939
|
-
editor: Editor;
|
|
940
|
-
event: FocusEvent;
|
|
941
|
-
}>;
|
|
942
|
-
editorBlur: _angular_core.OutputEmitterRef<{
|
|
943
|
-
editor: Editor;
|
|
944
|
-
event: FocusEvent;
|
|
945
|
-
}>;
|
|
946
|
-
editableChange: _angular_core.OutputEmitterRef<boolean>;
|
|
947
|
-
editorElement: _angular_core.Signal<ElementRef<any>>;
|
|
948
|
-
hideBubbleMenus(): void;
|
|
949
|
-
showBubbleMenus(): void;
|
|
950
|
-
private _editor;
|
|
951
|
-
private _characterCount;
|
|
952
|
-
private _wordCount;
|
|
953
|
-
private _isDragOver;
|
|
954
|
-
private _editorFullyInitialized;
|
|
955
|
-
private lastEmittedHtml;
|
|
956
|
-
readonly editor: _angular_core.Signal<Editor | null>;
|
|
957
|
-
readonly characterCount: _angular_core.Signal<number>;
|
|
958
|
-
readonly wordCount: _angular_core.Signal<number>;
|
|
959
|
-
readonly isDragOver: _angular_core.Signal<boolean>;
|
|
960
|
-
readonly editorFullyInitialized: _angular_core.Signal<boolean>;
|
|
961
|
-
private _isFormControlDisabled;
|
|
962
|
-
readonly isFormControlDisabled: _angular_core.Signal<boolean>;
|
|
963
|
-
readonly mergedDisabled: _angular_core.Signal<boolean>;
|
|
964
|
-
isEditorReady: _angular_core.Signal<boolean>;
|
|
965
|
-
readonly finalSeamless: _angular_core.Signal<boolean>;
|
|
966
|
-
readonly finalEditable: _angular_core.Signal<boolean>;
|
|
967
|
-
readonly finalPlaceholder: _angular_core.Signal<string>;
|
|
968
|
-
readonly finalFillContainer: _angular_core.Signal<boolean>;
|
|
969
|
-
readonly finalShowFooter: _angular_core.Signal<boolean>;
|
|
970
|
-
readonly finalShowEditToggle: _angular_core.Signal<boolean>;
|
|
971
|
-
readonly finalHeight: _angular_core.Signal<string | undefined>;
|
|
972
|
-
readonly finalMinHeight: _angular_core.Signal<string | undefined>;
|
|
973
|
-
readonly finalMaxHeight: _angular_core.Signal<string | undefined>;
|
|
974
|
-
readonly finalSpellcheck: _angular_core.Signal<boolean>;
|
|
975
|
-
readonly finalEnableOfficePaste: _angular_core.Signal<boolean>;
|
|
976
|
-
readonly finalShowToolbar: _angular_core.Signal<boolean>;
|
|
977
|
-
readonly finalToolbarConfig: _angular_core.Signal<AteToolbarConfig>;
|
|
978
|
-
readonly finalFloatingToolbar: _angular_core.Signal<boolean>;
|
|
979
|
-
readonly finalShowBubbleMenu: _angular_core.Signal<boolean>;
|
|
980
|
-
readonly finalBubbleMenuConfig: _angular_core.Signal<AteBubbleMenuConfig>;
|
|
981
|
-
readonly finalShowImageBubbleMenu: _angular_core.Signal<boolean>;
|
|
982
|
-
readonly finalImageBubbleMenuConfig: _angular_core.Signal<Partial<Record<"separator" | "changeImage" | "resizeSmall" | "resizeMedium" | "resizeLarge" | "resizeOriginal" | "deleteImage", boolean>>>;
|
|
983
|
-
readonly finalShowTableBubbleMenu: _angular_core.Signal<boolean>;
|
|
984
|
-
readonly finalTableBubbleMenuConfig: _angular_core.Signal<Partial<Record<"addColumnBefore" | "addColumnAfter" | "deleteColumn" | "addRowBefore" | "addRowAfter" | "deleteRow" | "deleteTable" | "toggleHeaderColumn" | "toggleHeaderRow" | "separator", boolean>>>;
|
|
985
|
-
readonly finalShowCellBubbleMenu: _angular_core.Signal<boolean>;
|
|
986
|
-
readonly finalCellBubbleMenuConfig: _angular_core.Signal<Partial<Record<"mergeCells" | "splitCell", boolean>>>;
|
|
987
|
-
readonly finalEnableSlashCommands: _angular_core.Signal<boolean>;
|
|
988
|
-
readonly finalSlashCommandsConfig: _angular_core.Signal<AteCustomSlashCommands>;
|
|
989
|
-
readonly finalAutofocus: _angular_core.Signal<number | boolean | "start" | "end" | "all">;
|
|
990
|
-
readonly finalMaxCharacters: _angular_core.Signal<number | undefined>;
|
|
991
|
-
readonly finalShowCharacterCount: _angular_core.Signal<boolean>;
|
|
992
|
-
readonly finalShowWordCount: _angular_core.Signal<boolean>;
|
|
993
|
-
readonly finalLocale: _angular_core.Signal<SupportedLocale>;
|
|
994
|
-
readonly finalImageUploadConfig: _angular_core.Signal<{
|
|
995
|
-
maxSize: number;
|
|
996
|
-
handler?: AteImageUploadHandler;
|
|
997
|
-
quality: number;
|
|
998
|
-
maxWidth: number;
|
|
999
|
-
maxHeight: number;
|
|
1000
|
-
allowedTypes: string[];
|
|
1001
|
-
enableDragDrop: boolean;
|
|
1002
|
-
showPreview: boolean;
|
|
1003
|
-
multiple: boolean;
|
|
1004
|
-
compressImages: boolean;
|
|
1005
|
-
}>;
|
|
1006
|
-
readonly finalImageUploadHandler: _angular_core.Signal<AteImageUploadHandler | undefined>;
|
|
1007
|
-
readonly currentTranslations: _angular_core.Signal<_flogeez_angular_tiptap_editor.AteTranslations>;
|
|
1008
|
-
private _destroyRef;
|
|
1009
|
-
private ngControl;
|
|
1010
|
-
readonly i18nService: AteI18nService;
|
|
1011
|
-
readonly editorCommandsService: AteEditorCommandsService;
|
|
1012
|
-
readonly editorState: _angular_core.Signal<_flogeez_angular_tiptap_editor.EditorStateSnapshot>;
|
|
1013
|
-
constructor();
|
|
1014
|
-
ngAfterViewInit(): void;
|
|
1015
|
-
ngOnDestroy(): void;
|
|
1016
|
-
private initEditor;
|
|
1017
|
-
toggleEditMode(event: Event): void;
|
|
1018
|
-
private updateCharacterCount;
|
|
1019
|
-
onDragOver(event: DragEvent): void;
|
|
1020
|
-
onDrop(event: DragEvent): void;
|
|
1021
|
-
private insertImageFromFile;
|
|
1022
|
-
getHTML(): string;
|
|
1023
|
-
getJSON(): JSONContent | undefined;
|
|
1024
|
-
getText(): string;
|
|
1025
|
-
setContent(content: string, emitUpdate?: boolean): void;
|
|
1026
|
-
focus(): void;
|
|
1027
|
-
blur(): void;
|
|
1028
|
-
clearContent(): void;
|
|
1029
|
-
getEditor(): Editor | null;
|
|
1030
|
-
private setupFormControlSubscription;
|
|
1031
|
-
onEditorClick(event: Event): void;
|
|
1032
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AngularTiptapEditorComponent, never>;
|
|
1033
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AngularTiptapEditorComponent, "angular-tiptap-editor", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fillContainer": { "alias": "fillContainer"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; "isSignal": true; }; "showWordCount": { "alias": "showWordCount"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "enableOfficePaste": { "alias": "enableOfficePaste"; "required": false; "isSignal": true; }; "enableSlashCommands": { "alias": "enableSlashCommands"; "required": false; "isSignal": true; }; "slashCommands": { "alias": "slashCommands"; "required": false; "isSignal": true; }; "customSlashCommands": { "alias": "customSlashCommands"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "seamless": { "alias": "seamless"; "required": false; "isSignal": true; }; "floatingToolbar": { "alias": "floatingToolbar"; "required": false; "isSignal": true; }; "showEditToggle": { "alias": "showEditToggle"; "required": false; "isSignal": true; }; "spellcheck": { "alias": "spellcheck"; "required": false; "isSignal": true; }; "tiptapExtensions": { "alias": "tiptapExtensions"; "required": false; "isSignal": true; }; "tiptapOptions": { "alias": "tiptapOptions"; "required": false; "isSignal": true; }; "showBubbleMenu": { "alias": "showBubbleMenu"; "required": false; "isSignal": true; }; "bubbleMenu": { "alias": "bubbleMenu"; "required": false; "isSignal": true; }; "showImageBubbleMenu": { "alias": "showImageBubbleMenu"; "required": false; "isSignal": true; }; "imageBubbleMenu": { "alias": "imageBubbleMenu"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "showTableBubbleMenu": { "alias": "showTableBubbleMenu"; "required": false; "isSignal": true; }; "tableBubbleMenu": { "alias": "tableBubbleMenu"; "required": false; "isSignal": true; }; "showCellBubbleMenu": { "alias": "showCellBubbleMenu"; "required": false; "isSignal": true; }; "cellBubbleMenu": { "alias": "cellBubbleMenu"; "required": false; "isSignal": true; }; "stateCalculators": { "alias": "stateCalculators"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; "imageUploadHandler": { "alias": "imageUploadHandler"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; "editorCreated": "editorCreated"; "editorUpdate": "editorUpdate"; "editorFocus": "editorFocus"; "editorBlur": "editorBlur"; "editableChange": "editableChange"; }, never, never, true, [{ directive: typeof AteNoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
declare class AteImageService {
|
|
1037
|
-
/** Signals for image state */
|
|
1038
|
-
selectedImage: _angular_core.WritableSignal<AteImageData | null>;
|
|
1039
|
-
isImageSelected: _angular_core.Signal<boolean>;
|
|
1040
|
-
/** Resizing state */
|
|
1041
|
-
isResizing: _angular_core.WritableSignal<boolean>;
|
|
1042
|
-
private i18n;
|
|
1043
|
-
private readonly t;
|
|
1044
|
-
/** Upload state signals */
|
|
1045
|
-
isUploading: _angular_core.WritableSignal<boolean>;
|
|
1046
|
-
uploadProgress: _angular_core.WritableSignal<number>;
|
|
1047
|
-
uploadMessage: _angular_core.WritableSignal<string>;
|
|
1048
|
-
/**
|
|
1049
|
-
* Custom upload handler.
|
|
1050
|
-
* If set, this handler replaces the default base64 conversion.
|
|
1051
|
-
*/
|
|
1052
|
-
uploadHandler: AteImageUploadHandler | null;
|
|
1053
|
-
private currentEditor;
|
|
1054
|
-
/** Select and track an image from the editor */
|
|
1055
|
-
selectImage(editor: Editor): void;
|
|
1056
|
-
clearSelection(): void;
|
|
1057
|
-
/** Insert a new image and ensure it's selected */
|
|
1058
|
-
insertImage(editor: Editor, imageData: AteImageData): void;
|
|
1059
|
-
/** Update attributes of the currently active image */
|
|
1060
|
-
updateImageAttributes(editor: Editor, attributes: Partial<AteImageData>): void;
|
|
1061
|
-
/** Resize image with optional aspect ratio maintenance */
|
|
1062
|
-
resizeImage(editor: Editor, options: AteResizeOptions): void;
|
|
1063
|
-
/** Predetermined resize helpers used by UI */
|
|
1064
|
-
resizeImageToSmall(editor: Editor): void;
|
|
1065
|
-
resizeImageToMedium(editor: Editor): void;
|
|
1066
|
-
resizeImageToLarge(editor: Editor): void;
|
|
1067
|
-
resizeImageToOriginal(editor: Editor): void;
|
|
1068
|
-
/** Get current image dimensions */
|
|
1069
|
-
getImageDimensions(editor: Editor): {
|
|
1070
|
-
width: number;
|
|
1071
|
-
height: number;
|
|
1072
|
-
} | null;
|
|
1073
|
-
/** Remove the selected image */
|
|
1074
|
-
deleteImage(editor: Editor): void;
|
|
1075
|
-
private updateSelectedImage;
|
|
1076
|
-
/** Validate file type and size */
|
|
1077
|
-
validateImage(file: File, options?: {
|
|
1078
|
-
maxSize?: number;
|
|
1079
|
-
allowedTypes?: string[];
|
|
1080
|
-
}): {
|
|
1081
|
-
valid: boolean;
|
|
1082
|
-
error?: string;
|
|
1083
|
-
};
|
|
1084
|
-
/** Compress and process image on client side */
|
|
1085
|
-
compressImage(file: File, quality?: number, maxWidth?: number, maxHeight?: number): Promise<AteImageUploadResult>;
|
|
1086
|
-
/** Core upload logic with progress tracking */
|
|
1087
|
-
private uploadImageWithProgress;
|
|
1088
|
-
private resetUploadState;
|
|
1089
|
-
/** Main entry point for file upload and insertion */
|
|
1090
|
-
uploadAndInsertImage(editor: Editor, file: File, options?: AteImageUploadOptions): Promise<void>;
|
|
1091
|
-
/** Trigger an editor transaction to force decoration update */
|
|
1092
|
-
private forceEditorUpdate;
|
|
1093
|
-
/** Generic helper to open file picker and process selection */
|
|
1094
|
-
private selectFileAndProcess;
|
|
1095
|
-
/** Select file and upload as new image */
|
|
1096
|
-
selectAndUploadImage(editor: Editor, options?: AteImageUploadOptions): Promise<void>;
|
|
1097
|
-
/** Select file and replace currently selected image */
|
|
1098
|
-
selectAndReplaceImage(editor: Editor, options?: AteImageUploadOptions): Promise<void>;
|
|
1099
|
-
/** Internal helper used by replacement logic */
|
|
1100
|
-
uploadAndReplaceImage(editor: Editor, file: File, options?: AteImageUploadOptions): Promise<void>;
|
|
1101
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteImageService, never>;
|
|
1102
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AteImageService>;
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
interface AteColorPickerSelection {
|
|
1106
|
-
from: number;
|
|
1107
|
-
to: number;
|
|
1108
|
-
}
|
|
1109
|
-
type AteColorEditMode = "text" | "highlight";
|
|
1110
|
-
declare class AteColorPickerService {
|
|
1111
|
-
private storedSelection;
|
|
1112
|
-
/** Current edit mode: null when closed, 'text' or 'highlight' when open */
|
|
1113
|
-
readonly editMode: _angular_core.WritableSignal<AteColorEditMode | null>;
|
|
1114
|
-
/** Reference to the element that triggered the menu (for anchoring) */
|
|
1115
|
-
readonly menuTrigger: _angular_core.WritableSignal<HTMLElement | null>;
|
|
1116
|
-
/** Whether the user is currently interacting with the picker UI (e.g. typing) */
|
|
1117
|
-
readonly isInteracting: _angular_core.WritableSignal<boolean>;
|
|
1118
|
-
/**
|
|
1119
|
-
* Open the color picker menu in the specified mode.
|
|
1120
|
-
*/
|
|
1121
|
-
open(mode: AteColorEditMode, trigger?: HTMLElement): void;
|
|
1122
|
-
/**
|
|
1123
|
-
* Close the color picker menu.
|
|
1124
|
-
*/
|
|
1125
|
-
close(): void;
|
|
1126
|
-
/**
|
|
1127
|
-
* Set interaction state (prevents premature closing when blurring editor)
|
|
1128
|
-
*/
|
|
1129
|
-
setInteracting(value: boolean): void;
|
|
1130
|
-
/**
|
|
1131
|
-
* Toggle color picker from UI (extracts trigger from event).
|
|
1132
|
-
*/
|
|
1133
|
-
toggle(editor: Editor, mode: AteColorEditMode, event?: Event): void;
|
|
1134
|
-
/**
|
|
1135
|
-
* Capture current editor selection.
|
|
1136
|
-
*/
|
|
1137
|
-
captureSelection(editor: Editor): void;
|
|
1138
|
-
/**
|
|
1139
|
-
* Get last captured selection.
|
|
1140
|
-
*/
|
|
1141
|
-
getStoredSelection(): AteColorPickerSelection | null;
|
|
1142
|
-
/**
|
|
1143
|
-
* Clear captured selection.
|
|
1144
|
-
*/
|
|
1145
|
-
done(): void;
|
|
1146
|
-
/**
|
|
1147
|
-
* Apply text color to selection.
|
|
1148
|
-
*/
|
|
1149
|
-
applyColor(editor: Editor, color: string, addToHistory?: boolean, focus?: boolean): void;
|
|
1150
|
-
/**
|
|
1151
|
-
* Remove text color from selection.
|
|
1152
|
-
*/
|
|
1153
|
-
unsetColor(editor: Editor, focus?: boolean): void;
|
|
1154
|
-
/**
|
|
1155
|
-
* Apply highlight color to selection.
|
|
1156
|
-
*/
|
|
1157
|
-
applyHighlight(editor: Editor, color: string, addToHistory?: boolean, focus?: boolean): void;
|
|
1158
|
-
/**
|
|
1159
|
-
* Remove highlight from selection.
|
|
1160
|
-
*/
|
|
1161
|
-
unsetHighlight(editor: Editor, focus?: boolean): void;
|
|
1162
|
-
normalizeColor(color: string | null | undefined): string;
|
|
1163
|
-
getLuminance(color: string): number;
|
|
1164
|
-
getContrastColor(color: string): "black" | "white";
|
|
1165
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteColorPickerService, never>;
|
|
1166
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AteColorPickerService>;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
declare class AteLinkService {
|
|
1170
|
-
/** Whether link edit mode is active */
|
|
1171
|
-
readonly editMode: _angular_core.WritableSignal<boolean>;
|
|
1172
|
-
/** Reference to the element that triggered the menu (for anchoring) */
|
|
1173
|
-
readonly menuTrigger: _angular_core.WritableSignal<HTMLElement | null>;
|
|
1174
|
-
/** Whether the user is currently interacting with the link UI (input focus) */
|
|
1175
|
-
readonly isInteracting: _angular_core.WritableSignal<boolean>;
|
|
1176
|
-
/**
|
|
1177
|
-
* Open the link edit menu.
|
|
1178
|
-
*/
|
|
1179
|
-
open(trigger?: HTMLElement): void;
|
|
1180
|
-
/**
|
|
1181
|
-
* Close the link edit menu.
|
|
1182
|
-
*/
|
|
1183
|
-
close(): void;
|
|
1184
|
-
/**
|
|
1185
|
-
* Final cleanup (called after UI is hidden)
|
|
1186
|
-
*/
|
|
1187
|
-
done(): void;
|
|
1188
|
-
/**
|
|
1189
|
-
* Set interaction state
|
|
1190
|
-
*/
|
|
1191
|
-
setInteracting(value: boolean): void;
|
|
1192
|
-
/**
|
|
1193
|
-
* Toggle link mode from UI.
|
|
1194
|
-
* If a URL string is provided, applies the link and closes.
|
|
1195
|
-
* If an Event is provided, extracts the trigger for anchoring.
|
|
1196
|
-
*/
|
|
1197
|
-
toggle(editor: Editor, urlOrEvent?: string | Event): void;
|
|
1198
|
-
/**
|
|
1199
|
-
* Apply a link to the current selection.
|
|
1200
|
-
*/
|
|
1201
|
-
setLink(editor: Editor, url: string): void;
|
|
1202
|
-
/**
|
|
1203
|
-
* Remove link from the current selection.
|
|
1204
|
-
*/
|
|
1205
|
-
unsetLink(editor: Editor): void;
|
|
1206
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteLinkService, never>;
|
|
1207
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AteLinkService>;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
/**
|
|
1211
|
-
* DiscoveryCalculator automatically detects and tracks the state of any TipTap extension.
|
|
1212
|
-
* It provides a "fallback" reactive state for any mark or node not explicitly handled
|
|
1213
|
-
* by specialized calculators.
|
|
1214
|
-
*/
|
|
1215
|
-
declare const AteDiscoveryCalculator: AteStateCalculator;
|
|
1216
|
-
|
|
1217
|
-
declare const AteImageCalculator: AteStateCalculator;
|
|
1218
|
-
|
|
1219
|
-
declare const AteMarksCalculator: AteStateCalculator;
|
|
1220
|
-
|
|
1221
|
-
declare const AteSelectionCalculator: AteStateCalculator;
|
|
1222
|
-
|
|
1223
|
-
declare const AteStructureCalculator: AteStateCalculator;
|
|
1224
|
-
|
|
1225
|
-
declare const AteTableCalculator: AteStateCalculator;
|
|
1226
|
-
|
|
1227
|
-
declare const ATE_DEFAULT_TOOLBAR_CONFIG: AteToolbarConfig;
|
|
1228
|
-
declare const ATE_DEFAULT_BUBBLE_MENU_CONFIG: AteBubbleMenuConfig;
|
|
1229
|
-
declare const ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG: AteImageBubbleMenuConfig;
|
|
1230
|
-
declare const ATE_DEFAULT_TABLE_MENU_CONFIG: AteTableBubbleMenuConfig;
|
|
1231
|
-
declare const ATE_DEFAULT_CELL_MENU_CONFIG: AteCellBubbleMenuConfig;
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* Props that are injected into Angular NodeView components
|
|
1235
|
-
*/
|
|
1236
|
-
interface AteAngularNodeViewProps {
|
|
1237
|
-
editor: Editor;
|
|
1238
|
-
node: Node$2;
|
|
1239
|
-
decorations: readonly Decoration[];
|
|
1240
|
-
selected: boolean;
|
|
1241
|
-
extension: unknown;
|
|
1242
|
-
getPos: () => number | undefined;
|
|
1243
|
-
updateAttributes: (attrs: Record<string, unknown>) => void;
|
|
1244
|
-
deleteNode: () => void;
|
|
1245
|
-
}
|
|
1246
|
-
/**
|
|
1247
|
-
* Base abstract class for Angular components used as TipTap NodeViews.
|
|
1248
|
-
*
|
|
1249
|
-
* Extend this class in your custom components to get access to the TipTap node properties.
|
|
1250
|
-
*
|
|
1251
|
-
* @example
|
|
1252
|
-
* ```typescript
|
|
1253
|
-
* @Component({
|
|
1254
|
-
* selector: 'app-counter',
|
|
1255
|
-
* template: `
|
|
1256
|
-
* <div>
|
|
1257
|
-
* <button (click)="increment()">Count: {{ node().attrs['count'] }}</button>
|
|
1258
|
-
* </div>
|
|
1259
|
-
* `
|
|
1260
|
-
* })
|
|
1261
|
-
* export class CounterComponent extends AteAngularNodeView {
|
|
1262
|
-
* increment() {
|
|
1263
|
-
* const count = this.node().attrs['count'] || 0;
|
|
1264
|
-
* this.updateAttributes({ count: count + 1 });
|
|
1265
|
-
* }
|
|
1266
|
-
* }
|
|
1267
|
-
* ```
|
|
1268
|
-
*/
|
|
1269
|
-
declare abstract class AteAngularNodeView {
|
|
1270
|
-
/**
|
|
1271
|
-
* The TipTap editor instance
|
|
1272
|
-
*/
|
|
1273
|
-
editor: Signal<Editor>;
|
|
1274
|
-
/**
|
|
1275
|
-
* The ProseMirror node
|
|
1276
|
-
*/
|
|
1277
|
-
node: Signal<Node$2>;
|
|
1278
|
-
/**
|
|
1279
|
-
* Decorations applied to this node
|
|
1280
|
-
*/
|
|
1281
|
-
decorations: Signal<readonly Decoration[]>;
|
|
1282
|
-
/**
|
|
1283
|
-
* Whether the node is currently selected
|
|
1284
|
-
*/
|
|
1285
|
-
selected: Signal<boolean>;
|
|
1286
|
-
/**
|
|
1287
|
-
* The extension instance that created this node
|
|
1288
|
-
*/
|
|
1289
|
-
extension: Signal<unknown>;
|
|
1290
|
-
/**
|
|
1291
|
-
* Function to get the current position of this node in the document
|
|
1292
|
-
*/
|
|
1293
|
-
getPos: () => number | undefined;
|
|
1294
|
-
/**
|
|
1295
|
-
* Update the attributes of this node
|
|
1296
|
-
*
|
|
1297
|
-
* @param attrs - Partial attributes to update
|
|
1298
|
-
*
|
|
1299
|
-
* @example
|
|
1300
|
-
* ```typescript
|
|
1301
|
-
* this.updateAttributes({ count: 5, color: 'blue' });
|
|
1302
|
-
* ```
|
|
1303
|
-
*/
|
|
1304
|
-
updateAttributes: (attrs: Record<string, unknown>) => void;
|
|
1305
|
-
/**
|
|
1306
|
-
* Delete this node from the document
|
|
1307
|
-
*/
|
|
1308
|
-
deleteNode: () => void;
|
|
1309
|
-
/** @internal */
|
|
1310
|
-
private _writableSignals?;
|
|
1311
|
-
/**
|
|
1312
|
-
* Internal method to initialize the component with NodeView props.
|
|
1313
|
-
* This is called by the AngularNodeViewRenderer.
|
|
1314
|
-
*
|
|
1315
|
-
* @internal
|
|
1316
|
-
*/
|
|
1317
|
-
_initNodeView(props: AteAngularNodeViewProps): void;
|
|
1318
|
-
/**
|
|
1319
|
-
* Internal method to update the component when the node changes.
|
|
1320
|
-
* This is called by the AngularNodeViewRenderer.
|
|
1321
|
-
*
|
|
1322
|
-
* @internal
|
|
1323
|
-
*/
|
|
1324
|
-
_updateNodeView(node: Node$2, decorations: readonly Decoration[]): void;
|
|
1325
|
-
/**
|
|
1326
|
-
* Internal method to update the selection state.
|
|
1327
|
-
* This is called by the AngularNodeViewRenderer.
|
|
1328
|
-
*
|
|
1329
|
-
* @internal
|
|
1330
|
-
*/
|
|
1331
|
-
_selectNodeView(): void;
|
|
1332
|
-
/**
|
|
1333
|
-
* Internal method to update the deselection state.
|
|
1334
|
-
* This is called by the AngularNodeViewRenderer.
|
|
1335
|
-
*
|
|
1336
|
-
* @internal
|
|
1337
|
-
*/
|
|
1338
|
-
_deselectNodeView(): void;
|
|
1339
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AteAngularNodeView, never>;
|
|
1340
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AteAngularNodeView, never, never, {}, {}, never, never, true, never>;
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
/**
|
|
1344
|
-
* Common options for rendering any Angular component as a TipTap NodeView
|
|
1345
|
-
*/
|
|
1346
|
-
interface AteComponentRenderOptions {
|
|
1347
|
-
/**
|
|
1348
|
-
* Angular injector to use for creating the component
|
|
1349
|
-
*/
|
|
1350
|
-
injector: Injector;
|
|
1351
|
-
/**
|
|
1352
|
-
* Additional inputs to pass to the component
|
|
1353
|
-
*/
|
|
1354
|
-
inputs?: Record<string, unknown>;
|
|
1355
|
-
/**
|
|
1356
|
-
* Custom wrapper element tag (default: 'div')
|
|
1357
|
-
*/
|
|
1358
|
-
wrapperTag?: string;
|
|
1359
|
-
/**
|
|
1360
|
-
* CSS classes to add to the wrapper element
|
|
1361
|
-
*/
|
|
1362
|
-
wrapperClass?: string;
|
|
1363
|
-
/**
|
|
1364
|
-
* Whether the node should be treated as an atom (not editable)
|
|
1365
|
-
* Default: true
|
|
1366
|
-
*/
|
|
1367
|
-
atom?: boolean;
|
|
1368
|
-
/**
|
|
1369
|
-
* Enables editable content for <ng-content>.
|
|
1370
|
-
* If true, TipTap will treat the component's content as editable.
|
|
1371
|
-
* @default false
|
|
1372
|
-
*/
|
|
1373
|
-
editableContent?: boolean;
|
|
1374
|
-
/**
|
|
1375
|
-
* Optional CSS selector to target an internal element of the component as the editable area.
|
|
1376
|
-
*/
|
|
1377
|
-
contentSelector?: string;
|
|
1378
|
-
/**
|
|
1379
|
-
* Type of content allowed in the editable area.
|
|
1380
|
-
*/
|
|
1381
|
-
contentMode?: "block" | "inline";
|
|
1382
|
-
/**
|
|
1383
|
-
* Whether to ignore mutations in the component's DOM.
|
|
1384
|
-
* If true, TipTap won't try to sync changes from the component's DOM back to the editor state.
|
|
1385
|
-
* @default true
|
|
1386
|
-
*/
|
|
1387
|
-
ignoreMutation?: boolean | ((mutation: MutationRecord | {
|
|
1388
|
-
type: "selection";
|
|
1389
|
-
target: Node;
|
|
1390
|
-
}) => boolean);
|
|
1391
|
-
/**
|
|
1392
|
-
* Callback called when an Output event is emitted by the component.
|
|
1393
|
-
*/
|
|
1394
|
-
onOutput?: (outputName: string, value: unknown) => void;
|
|
1395
|
-
/**
|
|
1396
|
-
* Callback called when the node is updated.
|
|
1397
|
-
*/
|
|
1398
|
-
onUpdate?: (node: Node$2) => void;
|
|
1399
|
-
/**
|
|
1400
|
-
* Callback called when the component is destroyed.
|
|
1401
|
-
*/
|
|
1402
|
-
onDestroy?: () => void;
|
|
1403
|
-
}
|
|
1404
|
-
/**
|
|
1405
|
-
* Unified configuration for registering ANY Angular component.
|
|
1406
|
-
*/
|
|
1407
|
-
interface RegisterAngularComponentOptions<T = unknown> {
|
|
1408
|
-
/**
|
|
1409
|
-
* The Angular component to register
|
|
1410
|
-
*/
|
|
1411
|
-
component: Type<T>;
|
|
1412
|
-
/**
|
|
1413
|
-
* Unique name for the TipTap node
|
|
1414
|
-
*/
|
|
1415
|
-
name?: string;
|
|
1416
|
-
/**
|
|
1417
|
-
* Default inputs (for standard components)
|
|
1418
|
-
*/
|
|
1419
|
-
defaultInputs?: Record<string, unknown>;
|
|
1420
|
-
/**
|
|
1421
|
-
* TipTap attributes (for TipTap-aware components)
|
|
1422
|
-
*/
|
|
1423
|
-
attributes?: Record<string, {
|
|
1424
|
-
default?: unknown;
|
|
1425
|
-
parseHTML?: (element: HTMLElement) => unknown;
|
|
1426
|
-
renderHTML?: (attributes: Record<string, unknown>) => Record<string, unknown> | null;
|
|
1427
|
-
}>;
|
|
1428
|
-
/**
|
|
1429
|
-
* CSS selector for the editable area inside the component
|
|
1430
|
-
*/
|
|
1431
|
-
contentSelector?: string;
|
|
1432
|
-
/**
|
|
1433
|
-
* Content mode for the editable area
|
|
1434
|
-
*/
|
|
1435
|
-
contentMode?: "block" | "inline";
|
|
1436
|
-
/**
|
|
1437
|
-
* Enable editable content via <ng-content> or contentSelector
|
|
1438
|
-
* @default false
|
|
1439
|
-
*/
|
|
1440
|
-
editableContent?: boolean;
|
|
1441
|
-
/**
|
|
1442
|
-
* Node group (block or inline)
|
|
1443
|
-
* @default 'block'
|
|
1444
|
-
*/
|
|
1445
|
-
group?: "block" | "inline";
|
|
1446
|
-
/**
|
|
1447
|
-
* Is the node draggable?
|
|
1448
|
-
* @default true
|
|
1449
|
-
*/
|
|
1450
|
-
draggable?: boolean;
|
|
1451
|
-
/**
|
|
1452
|
-
* Whether to ignore mutations in the component's DOM.
|
|
1453
|
-
* @default true
|
|
1454
|
-
*/
|
|
1455
|
-
ignoreMutation?: boolean | ((mutation: MutationRecord | {
|
|
1456
|
-
type: "selection";
|
|
1457
|
-
target: Node;
|
|
1458
|
-
}) => boolean);
|
|
1459
|
-
/**
|
|
1460
|
-
* Custom HTML attributes for the wrapper
|
|
1461
|
-
*/
|
|
1462
|
-
HTMLAttributes?: Record<string, unknown>;
|
|
1463
|
-
/**
|
|
1464
|
-
* Custom parseHTML rules
|
|
1465
|
-
*/
|
|
1466
|
-
parseHTML?: NodeConfig["parseHTML"];
|
|
1467
|
-
/**
|
|
1468
|
-
* Custom renderHTML function
|
|
1469
|
-
*/
|
|
1470
|
-
renderHTML?: NodeConfig["renderHTML"];
|
|
1471
|
-
/**
|
|
1472
|
-
* Callback called when an Output event is emitted by the component.
|
|
1473
|
-
*/
|
|
1474
|
-
onOutput?: (outputName: string, value: unknown) => void;
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
/**
|
|
1478
|
-
* Universal Renderer for Angular Components as TipTap NodeViews.
|
|
1479
|
-
*
|
|
1480
|
-
* Supports:
|
|
1481
|
-
* - TipTap-Aware components (extending AteAngularNodeView)
|
|
1482
|
-
* - Standard library components (automatic @Input() sync)
|
|
1483
|
-
* - Signal-based inputs and outputs (Angular 18+)
|
|
1484
|
-
* - Content projection (editableContent)
|
|
1485
|
-
* - Unified lifecycle and event management
|
|
1486
|
-
*/
|
|
1487
|
-
declare function AteNodeViewRenderer<T>(component: Type<T>, options: AteComponentRenderOptions): (props: {
|
|
1488
|
-
node: Node$2;
|
|
1489
|
-
view: EditorView;
|
|
1490
|
-
getPos: () => number | undefined;
|
|
1491
|
-
decorations: readonly Decoration[];
|
|
1492
|
-
editor: Editor;
|
|
1493
|
-
extension: unknown;
|
|
1494
|
-
}) => NodeView;
|
|
1495
|
-
|
|
1496
|
-
/**
|
|
1497
|
-
* Factory to transform an Angular component into a TipTap Node extension.
|
|
1498
|
-
* Supports both "TipTap-Aware" and "Standard" modes.
|
|
1499
|
-
*
|
|
1500
|
-
* @internal
|
|
1501
|
-
*/
|
|
1502
|
-
declare function createAngularComponentExtension<T = unknown>(injector: Injector, options: RegisterAngularComponentOptions<T>): Node$1;
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* Registers ANY Angular component as a TipTap node extension.
|
|
1506
|
-
*
|
|
1507
|
-
* This function is the single public entry point for adding custom components.
|
|
1508
|
-
* It supports two distinct modes:
|
|
1509
|
-
*
|
|
1510
|
-
* 1. **TipTap-Aware Mode** (the component extends `AteAngularNodeView`):
|
|
1511
|
-
* Grants direct access to the TipTap API (`editor`, `node`, `updateAttributes`, etc.) within the component.
|
|
1512
|
-
*
|
|
1513
|
-
* 2. **Standard Mode** (library or legacy components):
|
|
1514
|
-
* Allows using any existing Angular component. Its `@Input()` properties are automatically
|
|
1515
|
-
* synchronized with TipTap node attributes.
|
|
1516
|
-
*
|
|
1517
|
-
* @param injector - The Angular Injector (obtained via `inject(Injector)`)
|
|
1518
|
-
* @param options - Configuration options for the component extension
|
|
1519
|
-
* @returns A TipTap Node extension ready to be used
|
|
1520
|
-
*
|
|
1521
|
-
* @example
|
|
1522
|
-
* ```typescript
|
|
1523
|
-
* registerAngularComponent(injector, {
|
|
1524
|
-
* component: MyComponent,
|
|
1525
|
-
* name: 'myComponent',
|
|
1526
|
-
* defaultInputs: { color: 'blue' }
|
|
1527
|
-
* });
|
|
1528
|
-
* ```
|
|
1529
|
-
*/
|
|
1530
|
-
declare function registerAngularComponent<T = unknown>(injector: Injector, options: RegisterAngularComponentOptions<T>): Node$1;
|
|
1531
|
-
|
|
1532
|
-
/** @deprecated Renamed to `ATE_INITIAL_EDITOR_STATE`. This alias will be removed in v3.0.0. */
|
|
1533
|
-
declare const INITIAL_EDITOR_STATE: AteEditorStateSnapshot;
|
|
1534
|
-
|
|
1535
|
-
/** @deprecated Renamed to `ATE_SLASH_COMMAND_KEYS`. This alias will be removed in v3.0.0. */
|
|
1536
|
-
declare const SLASH_COMMAND_KEYS: readonly ["heading1", "heading2", "heading3", "bulletList", "orderedList", "blockquote", "code", "image", "horizontalRule", "table"];
|
|
1537
|
-
/** @deprecated Renamed to `ATE_DEFAULT_SLASH_COMMANDS_CONFIG`. This alias will be removed in v3.0.0. */
|
|
1538
|
-
declare const DEFAULT_SLASH_COMMANDS_CONFIG: AteSlashCommandsConfig;
|
|
1539
|
-
|
|
1540
|
-
/** @deprecated Renamed to `AteDiscoveryCalculator`. This alias will be removed in v3.0.0. */
|
|
1541
|
-
declare const DiscoveryCalculator: _flogeez_angular_tiptap_editor.AteStateCalculator;
|
|
1542
|
-
/** @deprecated Renamed to `AteImageCalculator`. This alias will be removed in v3.0.0. */
|
|
1543
|
-
declare const ImageCalculator: _flogeez_angular_tiptap_editor.AteStateCalculator;
|
|
1544
|
-
/** @deprecated Renamed to `AteMarksCalculator`. This alias will be removed in v3.0.0. */
|
|
1545
|
-
declare const MarksCalculator: _flogeez_angular_tiptap_editor.AteStateCalculator;
|
|
1546
|
-
/** @deprecated Renamed to `AteSelectionCalculator`. This alias will be removed in v3.0.0. */
|
|
1547
|
-
declare const SelectionCalculator: _flogeez_angular_tiptap_editor.AteStateCalculator;
|
|
1548
|
-
/** @deprecated Renamed to `AteStructureCalculator`. This alias will be removed in v3.0.0. */
|
|
1549
|
-
declare const StructureCalculator: _flogeez_angular_tiptap_editor.AteStateCalculator;
|
|
1550
|
-
/** @deprecated Renamed to `AteTableCalculator`. This alias will be removed in v3.0.0. */
|
|
1551
|
-
declare const TableCalculator: _flogeez_angular_tiptap_editor.AteStateCalculator;
|
|
1552
|
-
/** @deprecated Renamed to `ATE_DEFAULT_TOOLBAR_CONFIG`. This alias will be removed in v3.0.0. */
|
|
1553
|
-
declare const DEFAULT_TOOLBAR_CONFIG: AteToolbarConfig;
|
|
1554
|
-
/** @deprecated Renamed to `ATE_DEFAULT_BUBBLE_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
1555
|
-
declare const DEFAULT_BUBBLE_MENU_CONFIG: AteBubbleMenuConfig;
|
|
1556
|
-
/** @deprecated Renamed to `ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
1557
|
-
declare const DEFAULT_IMAGE_BUBBLE_MENU_CONFIG: Partial<Record<"separator" | "changeImage" | "resizeSmall" | "resizeMedium" | "resizeLarge" | "resizeOriginal" | "deleteImage", boolean>>;
|
|
1558
|
-
/** @deprecated Renamed to `ATE_DEFAULT_TABLE_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
1559
|
-
declare const DEFAULT_TABLE_MENU_CONFIG: Partial<Record<"addColumnBefore" | "addColumnAfter" | "deleteColumn" | "addRowBefore" | "addRowAfter" | "deleteRow" | "deleteTable" | "toggleHeaderColumn" | "toggleHeaderRow" | "separator", boolean>>;
|
|
1560
|
-
/** @deprecated Renamed to `ATE_DEFAULT_CELL_MENU_CONFIG`. This alias will be removed in v3.0.0. */
|
|
1561
|
-
declare const DEFAULT_CELL_MENU_CONFIG: Partial<Record<"mergeCells" | "splitCell", boolean>>;
|
|
1562
|
-
|
|
1563
|
-
export { ATE_BUBBLE_MENU_KEYS, ATE_CELL_BUBBLE_MENU_KEYS, ATE_DEFAULT_BUBBLE_MENU_CONFIG, ATE_DEFAULT_CELL_MENU_CONFIG, ATE_DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, ATE_DEFAULT_SLASH_COMMANDS_CONFIG, ATE_DEFAULT_TABLE_MENU_CONFIG, ATE_DEFAULT_TOOLBAR_CONFIG, ATE_IMAGE_BUBBLE_MENU_KEYS, ATE_INITIAL_EDITOR_STATE, ATE_SLASH_COMMAND_KEYS, ATE_TABLE_BUBBLE_MENU_KEYS, ATE_TOOLBAR_KEYS, AngularTiptapEditorComponent, AteAngularNodeView, AteColorPickerService, AteDiscoveryCalculator, AteEditorCommandsService, AteI18nService, AteImageCalculator, AteImageService, AteLinkService, AteMarksCalculator, AteNodeViewRenderer, AteNoopValueAccessorDirective, AteSelectionCalculator, AteStructureCalculator, AteTableCalculator, AteColorPickerService as ColorPickerService, DEFAULT_BUBBLE_MENU_CONFIG, DEFAULT_CELL_MENU_CONFIG, DEFAULT_IMAGE_BUBBLE_MENU_CONFIG, DEFAULT_SLASH_COMMANDS_CONFIG, DEFAULT_TABLE_MENU_CONFIG, DEFAULT_TOOLBAR_CONFIG, DiscoveryCalculator, AteEditorCommandsService as EditorCommandsService, INITIAL_EDITOR_STATE, ImageCalculator, AteImageService as ImageService, AteLinkService as LinkService, MarksCalculator, SLASH_COMMAND_KEYS, SelectionCalculator, StructureCalculator, TableCalculator, AteI18nService as TiptapI18nService, createAngularComponentExtension, createDefaultSlashCommands, filterSlashCommands, registerAngularComponent };
|
|
1564
|
-
export type { AteAngularNodeViewProps, AteBubbleMenuConfig, AteBubbleMenuKey, AteCellBubbleMenuConfig, AteCellBubbleMenuKey, AteColorEditMode, AteColorPickerSelection, AteComponentRenderOptions, AteCustomBubbleMenuItem, AteCustomSlashCommands, AteCustomToolbarItem, AteEditorConfig, AteEditorStateSnapshot, AteImageBubbleMenuConfig, AteImageBubbleMenuKey, AteImageData, AteImageUploadConfig, AteImageUploadContext, AteImageUploadHandler, AteImageUploadHandlerResult, AteImageUploadOptions, AteImageUploadResult, AteResizeOptions, AteSlashCommandItem, AteSlashCommandKey, AteSlashCommandsConfig, AteStateCalculator, AteTableBubbleMenuConfig, AteTableBubbleMenuKey, AteToolbarConfig, AteToolbarKey, AteTranslations, AteBubbleMenuConfig as BubbleMenuConfig, AteCellBubbleMenuConfig as CellBubbleMenuConfig, AteCustomSlashCommands as CustomSlashCommands, AteEditorConfig as EditorConfig, AteEditorStateSnapshot as EditorStateSnapshot, AteImageBubbleMenuConfig as ImageBubbleMenuConfig, AteImageData as ImageData, AteImageUploadHandler as ImageUploadHandler, AteImageUploadOptions as ImageUploadOptions, AteImageUploadResult as ImageUploadResult, RegisterAngularComponentOptions, AteResizeOptions as ResizeOptions, AteSlashCommandItem as SlashCommandItem, AteSlashCommandKey as SlashCommandKey, AteSlashCommandsConfig as SlashCommandsConfig, SupportedLocale, AteTableBubbleMenuConfig as TableBubbleMenuConfig, AteToolbarConfig as ToolbarConfig };
|
|
4
|
+
/// <amd-module name="@flogeez/angular-tiptap-editor" />
|
|
5
|
+
export * from './public-api';
|