suneditor 3.0.0-beta.2 → 3.0.0-beta.20
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/CONTRIBUTING.md +186 -184
- package/LICENSE +21 -21
- package/README.md +157 -180
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +126 -123
- package/src/assets/design/color.css +131 -121
- package/src/assets/design/index.css +3 -3
- package/src/assets/design/size.css +37 -35
- package/src/assets/design/typography.css +37 -37
- package/src/assets/icons/defaultIcons.js +247 -232
- package/src/assets/suneditor-contents.css +779 -778
- package/src/assets/suneditor.css +43 -35
- package/src/core/base/eventHandlers/handler_toolbar.js +135 -135
- package/src/core/base/eventHandlers/handler_ww_clipboard.js +56 -56
- package/src/core/base/eventHandlers/handler_ww_dragDrop.js +115 -113
- package/src/core/base/eventHandlers/handler_ww_key_input.js +1200 -1200
- package/src/core/base/eventHandlers/handler_ww_mouse.js +194 -194
- package/src/core/base/eventManager.js +1550 -1484
- package/src/core/base/history.js +355 -355
- package/src/core/class/char.js +163 -162
- package/src/core/class/component.js +856 -842
- package/src/core/class/format.js +3433 -3422
- package/src/core/class/html.js +1927 -1890
- package/src/core/class/menu.js +357 -346
- package/src/core/class/nodeTransform.js +424 -424
- package/src/core/class/offset.js +858 -891
- package/src/core/class/selection.js +710 -620
- package/src/core/class/shortcuts.js +98 -98
- package/src/core/class/toolbar.js +438 -430
- package/src/core/class/ui.js +424 -422
- package/src/core/class/viewer.js +750 -750
- package/src/core/editor.js +1810 -1708
- package/src/core/section/actives.js +268 -241
- package/src/core/section/constructor.js +1348 -1661
- package/src/core/section/context.js +102 -102
- package/src/core/section/documentType.js +582 -561
- package/src/core/section/options.js +367 -0
- package/src/core/util/instanceCheck.js +59 -0
- package/src/editorInjector/_classes.js +36 -36
- package/src/editorInjector/_core.js +92 -92
- package/src/editorInjector/index.js +75 -75
- package/src/events.js +634 -622
- package/src/helper/clipboard.js +59 -59
- package/src/helper/converter.js +586 -564
- package/src/helper/dom/domCheck.js +304 -304
- package/src/helper/dom/domQuery.js +677 -669
- package/src/helper/dom/domUtils.js +618 -557
- package/src/helper/dom/index.js +12 -12
- package/src/helper/env.js +249 -240
- package/src/helper/index.js +25 -25
- package/src/helper/keyCodeMap.js +183 -183
- package/src/helper/numbers.js +72 -72
- package/src/helper/unicode.js +47 -47
- package/src/langs/ckb.js +231 -231
- package/src/langs/cs.js +231 -231
- package/src/langs/da.js +231 -231
- package/src/langs/de.js +231 -231
- package/src/langs/en.js +230 -230
- package/src/langs/es.js +231 -231
- package/src/langs/fa.js +231 -231
- package/src/langs/fr.js +231 -231
- package/src/langs/he.js +231 -231
- package/src/langs/hu.js +230 -230
- package/src/langs/index.js +28 -28
- package/src/langs/it.js +231 -231
- package/src/langs/ja.js +230 -230
- package/src/langs/km.js +230 -230
- package/src/langs/ko.js +230 -230
- package/src/langs/lv.js +231 -231
- package/src/langs/nl.js +231 -231
- package/src/langs/pl.js +231 -231
- package/src/langs/pt_br.js +231 -231
- package/src/langs/ro.js +231 -231
- package/src/langs/ru.js +231 -231
- package/src/langs/se.js +231 -231
- package/src/langs/tr.js +231 -231
- package/src/langs/uk.js +231 -231
- package/src/langs/ur.js +231 -231
- package/src/langs/zh_cn.js +231 -231
- package/src/modules/ApiManager.js +191 -191
- package/src/modules/Browser.js +669 -667
- package/src/modules/ColorPicker.js +364 -362
- package/src/modules/Controller.js +474 -454
- package/src/modules/Figure.js +1620 -1617
- package/src/modules/FileManager.js +359 -359
- package/src/modules/HueSlider.js +577 -565
- package/src/modules/Modal.js +346 -346
- package/src/modules/ModalAnchorEditor.js +643 -643
- package/src/modules/SelectMenu.js +549 -549
- package/src/modules/_DragHandle.js +17 -17
- package/src/modules/index.js +14 -14
- package/src/plugins/browser/audioGallery.js +83 -83
- package/src/plugins/browser/fileBrowser.js +103 -103
- package/src/plugins/browser/fileGallery.js +83 -83
- package/src/plugins/browser/imageGallery.js +81 -81
- package/src/plugins/browser/videoGallery.js +103 -103
- package/src/plugins/command/blockquote.js +61 -60
- package/src/plugins/command/exportPDF.js +134 -134
- package/src/plugins/command/fileUpload.js +456 -456
- package/src/plugins/command/list_bulleted.js +149 -148
- package/src/plugins/command/list_numbered.js +152 -151
- package/src/plugins/dropdown/align.js +157 -155
- package/src/plugins/dropdown/backgroundColor.js +108 -104
- package/src/plugins/dropdown/font.js +141 -137
- package/src/plugins/dropdown/fontColor.js +109 -105
- package/src/plugins/dropdown/formatBlock.js +170 -178
- package/src/plugins/dropdown/hr.js +152 -152
- package/src/plugins/dropdown/layout.js +83 -83
- package/src/plugins/dropdown/lineHeight.js +131 -130
- package/src/plugins/dropdown/list.js +123 -122
- package/src/plugins/dropdown/paragraphStyle.js +138 -138
- package/src/plugins/dropdown/table.js +4110 -4000
- package/src/plugins/dropdown/template.js +83 -83
- package/src/plugins/dropdown/textStyle.js +149 -149
- package/src/plugins/field/mention.js +242 -242
- package/src/plugins/index.js +120 -120
- package/src/plugins/input/fontSize.js +414 -410
- package/src/plugins/input/pageNavigator.js +71 -70
- package/src/plugins/modal/audio.js +677 -677
- package/src/plugins/modal/drawing.js +537 -531
- package/src/plugins/modal/embed.js +886 -886
- package/src/plugins/modal/image.js +1377 -1376
- package/src/plugins/modal/link.js +248 -240
- package/src/plugins/modal/math.js +563 -563
- package/src/plugins/modal/video.js +1226 -1226
- package/src/plugins/popup/anchor.js +224 -222
- package/src/suneditor.js +114 -107
- package/src/themes/dark.css +132 -122
- package/src/typedef.js +132 -130
- package/types/assets/icons/defaultIcons.d.ts +8 -0
- package/types/core/base/eventManager.d.ts +29 -4
- package/types/core/class/char.d.ts +2 -1
- package/types/core/class/component.d.ts +1 -2
- package/types/core/class/format.d.ts +8 -1
- package/types/core/class/html.d.ts +8 -0
- package/types/core/class/menu.d.ts +8 -0
- package/types/core/class/offset.d.ts +24 -26
- package/types/core/class/selection.d.ts +2 -0
- package/types/core/class/toolbar.d.ts +6 -0
- package/types/core/class/ui.d.ts +1 -1
- package/types/core/editor.d.ts +34 -12
- package/types/core/section/constructor.d.ts +5 -638
- package/types/core/section/documentType.d.ts +12 -2
- package/types/core/section/options.d.ts +740 -0
- package/types/core/util/instanceCheck.d.ts +50 -0
- package/types/editorInjector/_core.d.ts +5 -5
- package/types/editorInjector/index.d.ts +2 -2
- package/types/events.d.ts +2 -0
- package/types/helper/converter.d.ts +9 -0
- package/types/helper/dom/domQuery.d.ts +5 -5
- package/types/helper/dom/domUtils.d.ts +8 -0
- package/types/helper/env.d.ts +6 -1
- package/types/helper/index.d.ts +4 -1
- package/types/index.d.ts +122 -120
- package/types/langs/_Lang.d.ts +194 -194
- package/types/modules/ColorPicker.d.ts +5 -1
- package/types/modules/Controller.d.ts +8 -4
- package/types/modules/Figure.d.ts +2 -1
- package/types/modules/HueSlider.d.ts +4 -1
- package/types/modules/SelectMenu.d.ts +1 -1
- package/types/plugins/command/blockquote.d.ts +1 -0
- package/types/plugins/command/list_bulleted.d.ts +1 -0
- package/types/plugins/command/list_numbered.d.ts +1 -0
- package/types/plugins/dropdown/align.d.ts +1 -0
- package/types/plugins/dropdown/backgroundColor.d.ts +1 -0
- package/types/plugins/dropdown/font.d.ts +1 -0
- package/types/plugins/dropdown/fontColor.d.ts +1 -0
- package/types/plugins/dropdown/formatBlock.d.ts +3 -2
- package/types/plugins/dropdown/lineHeight.d.ts +1 -0
- package/types/plugins/dropdown/list.d.ts +1 -0
- package/types/plugins/dropdown/table.d.ts +6 -0
- package/types/plugins/input/fontSize.d.ts +1 -0
- package/types/plugins/modal/drawing.d.ts +4 -0
- package/types/plugins/modal/link.d.ts +32 -15
- package/types/suneditor.d.ts +13 -9
- package/types/typedef.d.ts +8 -0
|
@@ -1,454 +1,474 @@
|
|
|
1
|
-
import EditorInjector from '../editorInjector';
|
|
2
|
-
import { dom, env, keyCodeMap } from '../helper';
|
|
3
|
-
import { _DragHandle } from '../modules';
|
|
4
|
-
|
|
5
|
-
const { _w, ON_OVER_COMPONENT } = env;
|
|
6
|
-
const INDEX_00 = '2147483646';
|
|
7
|
-
const INDEX_0 = '2147483645';
|
|
8
|
-
const INDEX_S_1 = '2147483641';
|
|
9
|
-
const INDEX_1 = '2147483640';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @typedef {Object} ControllerInfo
|
|
13
|
-
* @property {*} inst The controller instance
|
|
14
|
-
* @property {string} [position="bottom"] The controller position ("bottom"|"top")
|
|
15
|
-
* @property {HTMLElement} [form=null] The controller element
|
|
16
|
-
* @property {HTMLElement|Range} [target=null] The controller target element
|
|
17
|
-
* @property {boolean} [notInCarrier=false] If the controller is not in the "carrierWrapper", set it to true.
|
|
18
|
-
* @property {boolean} [isRangeTarget=false] If the target is a Range, set it to true.
|
|
19
|
-
* @property {boolean} [fixed=false] If the controller is fixed and should not be closed, set it to true.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @typedef {Object} ControllerParams
|
|
24
|
-
* @property {"top"|"bottom"} [position="bottom"] Controller position
|
|
25
|
-
* @property {boolean=} [isWWTarget=true] If the controller is in the WYSIWYG area, set it to true.
|
|
26
|
-
* @property {() => void=} [initMethod=null] Method to be called when the controller is closed.
|
|
27
|
-
* @property {boolean=} [disabled=false] If true, When the "controller" is opened, buttons without the "se-component-enabled" class are disabled.
|
|
28
|
-
* @property {Array<HTMLElement>=} [parents=[]] The parent "controller" array when "controller" is opened nested.
|
|
29
|
-
* @property {boolean=} [parentsHide=false] If true, the parent element is hidden when the controller is opened.
|
|
30
|
-
* @property {HTMLElement=} [sibling=null] The related sibling controller element that this controller is positioned relative to.
|
|
31
|
-
*
|
|
32
|
-
* @property {boolean=} [
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* @
|
|
45
|
-
* @param {
|
|
46
|
-
* @param {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
73
|
-
|
|
74
|
-
this.
|
|
75
|
-
|
|
76
|
-
this.
|
|
77
|
-
this.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.eventManager.addEvent(element, '
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* @
|
|
92
|
-
* @param {
|
|
93
|
-
* @param {
|
|
94
|
-
* @param {
|
|
95
|
-
* @param {boolean=} params.
|
|
96
|
-
* @param {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this.
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
this.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
this.
|
|
165
|
-
|
|
166
|
-
this.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
* @
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
this.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
this.
|
|
264
|
-
|
|
265
|
-
this.editor.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
this.
|
|
270
|
-
|
|
271
|
-
this.
|
|
272
|
-
}
|
|
273
|
-
if (this.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
* @
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
*
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
this.
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
*
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
* @
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
* @
|
|
365
|
-
* @
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
this.
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
1
|
+
import EditorInjector from '../editorInjector';
|
|
2
|
+
import { dom, env, keyCodeMap } from '../helper';
|
|
3
|
+
import { _DragHandle } from '../modules';
|
|
4
|
+
|
|
5
|
+
const { _w, isMobile, ON_OVER_COMPONENT } = env;
|
|
6
|
+
const INDEX_00 = '2147483646';
|
|
7
|
+
const INDEX_0 = '2147483645';
|
|
8
|
+
const INDEX_S_1 = '2147483641';
|
|
9
|
+
const INDEX_1 = '2147483640';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {Object} ControllerInfo
|
|
13
|
+
* @property {*} inst The controller instance
|
|
14
|
+
* @property {string} [position="bottom"] The controller position ("bottom"|"top")
|
|
15
|
+
* @property {HTMLElement} [form=null] The controller element
|
|
16
|
+
* @property {HTMLElement|Range} [target=null] The controller target element
|
|
17
|
+
* @property {boolean} [notInCarrier=false] If the controller is not in the "carrierWrapper", set it to true.
|
|
18
|
+
* @property {boolean} [isRangeTarget=false] If the target is a Range, set it to true.
|
|
19
|
+
* @property {boolean} [fixed=false] If the controller is fixed and should not be closed, set it to true.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {Object} ControllerParams
|
|
24
|
+
* @property {"top"|"bottom"} [position="bottom"] Controller position
|
|
25
|
+
* @property {boolean=} [isWWTarget=true] If the controller is in the WYSIWYG area, set it to true.
|
|
26
|
+
* @property {() => void=} [initMethod=null] Method to be called when the controller is closed.
|
|
27
|
+
* @property {boolean=} [disabled=false] If true, When the "controller" is opened, buttons without the "se-component-enabled" class are disabled.
|
|
28
|
+
* @property {Array<HTMLElement>=} [parents=[]] The parent "controller" array when "controller" is opened nested.
|
|
29
|
+
* @property {boolean=} [parentsHide=false] If true, the parent element is hidden when the controller is opened.
|
|
30
|
+
* @property {HTMLElement=} [sibling=null] The related sibling controller element that this controller is positioned relative to.
|
|
31
|
+
* - e.g.) table plugin :: 118
|
|
32
|
+
* @property {boolean=} [siblingMain=false] If true, This sibling controller is the main controller.
|
|
33
|
+
* - You must specify this option, if use "sibling"
|
|
34
|
+
* @property {boolean=} [isInsideForm=false] If the controller is inside a form, set it to true.
|
|
35
|
+
* @property {boolean=} [isOutsideForm=false] If the controller is outside a form, set it to true.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @class
|
|
40
|
+
* @description Controller module class that handles the UI and interaction logic for a specific editor controller element.
|
|
41
|
+
*/
|
|
42
|
+
class Controller extends EditorInjector {
|
|
43
|
+
/**
|
|
44
|
+
* @constructor
|
|
45
|
+
* @param {*} inst The instance object that called the constructor.
|
|
46
|
+
* @param {Node} element Controller element
|
|
47
|
+
* @param {ControllerParams} params Controller options
|
|
48
|
+
* @param {?string=} _name An optional name for the controller key.
|
|
49
|
+
*/
|
|
50
|
+
constructor(inst, element, params, _name) {
|
|
51
|
+
super(inst.editor);
|
|
52
|
+
|
|
53
|
+
// members
|
|
54
|
+
this.kind = _name || inst.constructor.key || inst.constructor.name;
|
|
55
|
+
this.inst = inst;
|
|
56
|
+
this.form = /** @type {HTMLFormElement} */ (element);
|
|
57
|
+
this.isOpen = false;
|
|
58
|
+
this.currentTarget = null;
|
|
59
|
+
this.currentPositionTarget = null;
|
|
60
|
+
this.isWWTarget = params.isWWTarget ?? true;
|
|
61
|
+
this.position = params.position || 'bottom';
|
|
62
|
+
this.disabled = !!params.disabled;
|
|
63
|
+
this.parents = /** @type {Array<HTMLElement>} */ (params.parents || []);
|
|
64
|
+
this.parentsHide = !!params.parentsHide;
|
|
65
|
+
this.sibling = /** @type {HTMLElement} */ (params.sibling || null);
|
|
66
|
+
this.siblingMain = !!params.siblingMain;
|
|
67
|
+
this.isInsideForm = !!params.isInsideForm;
|
|
68
|
+
this.isOutsideForm = !!params.isOutsideForm;
|
|
69
|
+
this.toTop = false;
|
|
70
|
+
this._reserveIndex = false;
|
|
71
|
+
this._initMethod = typeof params.initMethod === 'function' ? params.initMethod : null;
|
|
72
|
+
this.__globalEventHandlers = { keydown: this.#CloseListener_keydown.bind(this), mousedown: this.#CloseListener_mousedown.bind(this) };
|
|
73
|
+
this._bindClose_key = null;
|
|
74
|
+
this._bindClose_mouse = null;
|
|
75
|
+
/** @type {{left?: number, top?: number, addOfffset?: {left?: number, top?: number}}} */
|
|
76
|
+
this.__offset = {};
|
|
77
|
+
this.__addOffset = { left: 0, top: 0 };
|
|
78
|
+
this.__shadowRootEventForm = null;
|
|
79
|
+
this.__shadowRootEventListener = null;
|
|
80
|
+
|
|
81
|
+
// add element
|
|
82
|
+
this.carrierWrapper.appendChild(element);
|
|
83
|
+
|
|
84
|
+
// init
|
|
85
|
+
this.eventManager.addEvent(element, 'click', this.#Action.bind(this));
|
|
86
|
+
this.eventManager.addEvent(element, 'mouseenter', this.#MouseEnter.bind(this));
|
|
87
|
+
this.eventManager.addEvent(element, 'mouseleave', this.#MouseLeave.bind(this));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @description Open a modal plugin
|
|
92
|
+
* @param {Node|Range} target Target element
|
|
93
|
+
* @param {Node} [positionTarget] Position target element
|
|
94
|
+
* @param {Object} [params={}] params
|
|
95
|
+
* @param {boolean=} params.isWWTarget If the controller is in the WYSIWYG area, set it to true.
|
|
96
|
+
* @param {() => void=} params.initMethod Method to be called when the controller is closed.
|
|
97
|
+
* @param {boolean=} params.disabled If true, When the "controller" is opened, buttons without the "se-component-enabled" class are disabled. (default: this.disabled)
|
|
98
|
+
* @param {{left?: number, top?: number}=} params.addOffset Additional offset values
|
|
99
|
+
*/
|
|
100
|
+
open(target, positionTarget, { isWWTarget, initMethod, disabled, addOffset } = {}) {
|
|
101
|
+
if (_DragHandle.get('__overInfo') === ON_OVER_COMPONENT) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!target) {
|
|
106
|
+
console.warn('[SUNEDITOR.Controller.open.fail] The target element is required.');
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (this.editor.isBalloon) this.toolbar.hide();
|
|
111
|
+
else if (this.editor.isSubBalloon) this.subToolbar.hide();
|
|
112
|
+
|
|
113
|
+
if (!this.status.hasFocus) {
|
|
114
|
+
if (disabled ?? this.disabled) {
|
|
115
|
+
this.ui.setControllerOnDisabledButtons(true);
|
|
116
|
+
} else {
|
|
117
|
+
this.ui.setControllerOnDisabledButtons(false);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
this.currentPositionTarget = positionTarget || target;
|
|
122
|
+
this.isWWTarget = isWWTarget ?? this.isWWTarget;
|
|
123
|
+
if (typeof initMethod === 'function') this._initMethod = initMethod;
|
|
124
|
+
this.editor.currentControllerName = this.kind;
|
|
125
|
+
|
|
126
|
+
this.__addOffset = { left: 0, top: 0 };
|
|
127
|
+
if (addOffset) this.__addOffset = { ...this.__addOffset, ...addOffset };
|
|
128
|
+
|
|
129
|
+
const parents = this.isOutsideForm ? this.parents : [];
|
|
130
|
+
this.editor.opendControllers?.forEach((e) => {
|
|
131
|
+
if (!parents.includes(e.form)) e.form.style.zIndex = INDEX_1;
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
if (this.parentsHide) {
|
|
135
|
+
this.parents.forEach((e) => {
|
|
136
|
+
e.style.display = 'none';
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
this.__addGlobalEvent();
|
|
141
|
+
|
|
142
|
+
// display controller
|
|
143
|
+
this._setControllerPosition(this.form, this.currentPositionTarget, false);
|
|
144
|
+
|
|
145
|
+
const isRangeTarget = this.instanceCheck.isRange(target);
|
|
146
|
+
this.currentTarget = isRangeTarget ? null : target;
|
|
147
|
+
this._controllerOn(this.form, target, isRangeTarget);
|
|
148
|
+
this._w.setTimeout(() => _DragHandle.set('__overInfo', false), 0);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @description Close a modal plugin
|
|
153
|
+
* - The plugin's "init" method is called.
|
|
154
|
+
* @param {boolean=} force If true, parent controllers are forcibly closed.
|
|
155
|
+
*/
|
|
156
|
+
close(force) {
|
|
157
|
+
if (!this.isOpen) return;
|
|
158
|
+
|
|
159
|
+
this.toTop = false;
|
|
160
|
+
this.isOpen = false;
|
|
161
|
+
this.__offset = {};
|
|
162
|
+
this.__addOffset = { left: 0, top: 0 };
|
|
163
|
+
|
|
164
|
+
this.__removeGlobalEvent();
|
|
165
|
+
|
|
166
|
+
if (typeof this._initMethod === 'function') this._initMethod();
|
|
167
|
+
this._controllerOff();
|
|
168
|
+
|
|
169
|
+
if (this.parentsHide && !force) {
|
|
170
|
+
this.parents.forEach((e) => {
|
|
171
|
+
e.style.display = 'block';
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (this.parents.length > 0) return;
|
|
176
|
+
if (typeof this.inst.close === 'function') this.inst.close();
|
|
177
|
+
this.component.deselect();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @description Hide controller
|
|
182
|
+
*/
|
|
183
|
+
hide() {
|
|
184
|
+
this.form.style.display = 'none';
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @description Show controller
|
|
189
|
+
*/
|
|
190
|
+
show() {
|
|
191
|
+
this._setControllerPosition(this.form, this.currentPositionTarget, false);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @description Sets whether the element (form) should be brought to the top based on z-index.
|
|
196
|
+
* @param {boolean} value - true: '2147483646', false: '2147483645'.
|
|
197
|
+
*/
|
|
198
|
+
bringToTop(value) {
|
|
199
|
+
this.toTop = value;
|
|
200
|
+
this.form.style.zIndex = value ? INDEX_00 : INDEX_0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @description Reset controller position
|
|
205
|
+
* @param {Node=} target
|
|
206
|
+
*/
|
|
207
|
+
resetPosition(target) {
|
|
208
|
+
this._setControllerPosition(this.form, target || this.currentPositionTarget, true);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* @private
|
|
213
|
+
* @description Show controller at editor area (controller elements, function, "controller target element(@Required)", "controller name(@Required)", etc..)
|
|
214
|
+
* @param {HTMLFormElement} form Controller element
|
|
215
|
+
* @param {Node|Range} target Controller target element
|
|
216
|
+
* @param {boolean} isRangeTarget If the target is a Range, set it to true.
|
|
217
|
+
*/
|
|
218
|
+
async _controllerOn(form, target, isRangeTarget) {
|
|
219
|
+
/** @type {ControllerInfo} */
|
|
220
|
+
const info = {
|
|
221
|
+
position: this.position,
|
|
222
|
+
inst: this,
|
|
223
|
+
form: /** @type {HTMLElement} */ (form),
|
|
224
|
+
target: /** @type {HTMLElement} */ (target),
|
|
225
|
+
isRangeTarget,
|
|
226
|
+
notInCarrier: !this.carrierWrapper.contains(form)
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
if ((await this.triggerEvent('onBeforeShowController', { caller: this.kind, frameContext: this.editor.frameContext, info })) === false) return;
|
|
230
|
+
|
|
231
|
+
form.style.display = 'block';
|
|
232
|
+
if (this.editor._shadowRoot) {
|
|
233
|
+
this.__shadowRootEventForm = form;
|
|
234
|
+
this.__shadowRootEventListener = (e) => e.stopPropagation();
|
|
235
|
+
form.addEventListener('mousedown', this.__shadowRootEventListener);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
this.editor._controllerTargetContext = this.editor.frameContext.get('topArea');
|
|
239
|
+
|
|
240
|
+
if (!this.isOpen) {
|
|
241
|
+
this.editor.opendControllers.push(info);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
this.isOpen = true;
|
|
245
|
+
this.editor._preventBlur = true;
|
|
246
|
+
this.editor.status.onSelected = true;
|
|
247
|
+
this.triggerEvent('onShowController', { caller: this.kind, frameContext: this.editor.frameContext, info });
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @private
|
|
252
|
+
* @description Hide controller at editor area (link button, image resize button..)
|
|
253
|
+
*/
|
|
254
|
+
_controllerOff() {
|
|
255
|
+
this.form.style.display = 'none';
|
|
256
|
+
this.editor.opendControllers = this.editor.opendControllers.filter((v) => v.form !== this.form);
|
|
257
|
+
if (this.editor.currentControllerName !== this.kind && this.editor.opendControllers.length > 0) return;
|
|
258
|
+
|
|
259
|
+
this.ui.setControllerOnDisabledButtons(false);
|
|
260
|
+
|
|
261
|
+
this.editor.frameContext.get('lineBreaker_t').style.display = this.editor.frameContext.get('lineBreaker_b').style.display = 'none';
|
|
262
|
+
this.editor.effectNode = null;
|
|
263
|
+
this.editor.currentControllerName = '';
|
|
264
|
+
this.editor._preventBlur = false;
|
|
265
|
+
this.editor._controllerTargetContext = null;
|
|
266
|
+
_w.setTimeout(() => {
|
|
267
|
+
this.editor.status.onSelected = false;
|
|
268
|
+
}, 0);
|
|
269
|
+
if (this.__shadowRootEventForm) {
|
|
270
|
+
this.__shadowRootEventForm.removeEventListener('mousedown', this.__shadowRootEventListener);
|
|
271
|
+
this.__shadowRootEventForm = this.__shadowRootEventListener = null;
|
|
272
|
+
}
|
|
273
|
+
if (typeof this.inst.reset === 'function') this.inst.reset();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @private
|
|
278
|
+
* @description Specify the position of the controller.
|
|
279
|
+
* @param {HTMLElement} controller Controller element.
|
|
280
|
+
* @param {Node|Range} refer Element or Range that is the basis of the controller's position.
|
|
281
|
+
* @param {boolean} [skipAutoReposition=false] If true, skips scroll/resize-based automatic positioning logic.
|
|
282
|
+
*/
|
|
283
|
+
_setControllerPosition(controller, refer, skipAutoReposition) {
|
|
284
|
+
controller.style.visibility = 'hidden';
|
|
285
|
+
controller.style.display = 'block';
|
|
286
|
+
|
|
287
|
+
if (this.sibling && this.sibling.style.display !== 'block') {
|
|
288
|
+
this.sibling.style.visibility = 'hidden';
|
|
289
|
+
this.sibling.style.display = 'block';
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (this.selection.isRange(refer)) {
|
|
293
|
+
if (!this.offset.setRangePosition(this.form, /** @type {Range} */ (refer), { position: 'bottom' })) {
|
|
294
|
+
this.hide();
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
if (refer) {
|
|
299
|
+
const positionResult = this.offset.setAbsPosition(controller, /** @type {HTMLElement} */ (refer), { addOffset: this.__addOffset, position: this.position, isWWTarget: this.isWWTarget, inst: this, sibling: this.sibling });
|
|
300
|
+
if (!positionResult) {
|
|
301
|
+
this.hide();
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (!skipAutoReposition && this.sibling && !this.siblingMain) {
|
|
306
|
+
const resetPosition = controller.offsetTop - this.__addOffset.top;
|
|
307
|
+
if (positionResult.position === 'bottom') {
|
|
308
|
+
this._reserveIndex = true;
|
|
309
|
+
controller.style.top = resetPosition + this.sibling.offsetHeight - 1 + 'px';
|
|
310
|
+
} else {
|
|
311
|
+
this._reserveIndex = false;
|
|
312
|
+
controller.style.top = resetPosition - this.sibling.offsetHeight + 2 + 'px';
|
|
313
|
+
}
|
|
314
|
+
} else {
|
|
315
|
+
this._reserveIndex = false;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
controller.style.zIndex = this.toTop ? INDEX_0 : this._reserveIndex ? INDEX_S_1 : INDEX_1;
|
|
321
|
+
controller.style.visibility = '';
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @private
|
|
326
|
+
* @description Adds global event listeners.
|
|
327
|
+
* - When the controller is opened
|
|
328
|
+
*/
|
|
329
|
+
__addGlobalEvent() {
|
|
330
|
+
this.__removeGlobalEvent();
|
|
331
|
+
this._bindClose_key = this.eventManager.addGlobalEvent('keydown', this.__globalEventHandlers.keydown, true);
|
|
332
|
+
this._bindClose_mouse = this.eventManager.addGlobalEvent(isMobile ? 'click' : 'mousedown', this.__globalEventHandlers.mousedown, true);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* @private
|
|
337
|
+
* @description Removes global event listeners.
|
|
338
|
+
* - When the ESC key is pressed, the controller is closed.
|
|
339
|
+
*/
|
|
340
|
+
__removeGlobalEvent() {
|
|
341
|
+
this.component.__removeGlobalEvent();
|
|
342
|
+
if (this._bindClose_key) this._bindClose_key = this.eventManager.removeGlobalEvent(this._bindClose_key);
|
|
343
|
+
if (this._bindClose_mouse) this._bindClose_mouse = this.eventManager.removeGlobalEvent(this._bindClose_mouse);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @private
|
|
348
|
+
* @description Checks if the controller is fixed and should not be closed.
|
|
349
|
+
* @returns {boolean} True if the controller is fixed.
|
|
350
|
+
*/
|
|
351
|
+
_checkFixed() {
|
|
352
|
+
if (this.editor.selectMenuOn) return true;
|
|
353
|
+
|
|
354
|
+
const cont = this.editor.opendControllers;
|
|
355
|
+
for (let i = 0; i < cont.length; i++) {
|
|
356
|
+
if (cont[i].inst === this && cont[i].fixed) {
|
|
357
|
+
return true;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* @private
|
|
365
|
+
* @description Checks if the given target is within a form or controller.
|
|
366
|
+
* @param {Node} target The target element.
|
|
367
|
+
* @returns {boolean} True if the target is inside a form or controller.
|
|
368
|
+
*/
|
|
369
|
+
_checkForm(target) {
|
|
370
|
+
if (dom.check.isWysiwygFrame(target)) return false;
|
|
371
|
+
if (dom.utils.hasClass(target, 'se-drag-handle')) return true;
|
|
372
|
+
|
|
373
|
+
let isParentForm = false;
|
|
374
|
+
if (this.isInsideForm && this.parents?.length > 0) {
|
|
375
|
+
this.parents.some((e) => {
|
|
376
|
+
if (e.contains(target)) {
|
|
377
|
+
isParentForm = true;
|
|
378
|
+
return true;
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
return !isParentForm && (!!dom.query.getParentElement(target, '.se-controller') || target?.contains(this.inst._element));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @param {MouseEvent} e - Event object
|
|
388
|
+
*/
|
|
389
|
+
#Action(e) {
|
|
390
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
391
|
+
const target = dom.query.getCommandTarget(eventTarget);
|
|
392
|
+
if (!target) return;
|
|
393
|
+
|
|
394
|
+
e.stopPropagation();
|
|
395
|
+
e.preventDefault();
|
|
396
|
+
|
|
397
|
+
this.inst.controllerAction(target);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @param {MouseEvent} e - Event object
|
|
402
|
+
*/
|
|
403
|
+
#MouseEnter(e) {
|
|
404
|
+
this.editor.currentControllerName = this.kind;
|
|
405
|
+
if (this.parents.length > 0 && this.isInsideForm) return;
|
|
406
|
+
|
|
407
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
408
|
+
eventTarget.style.zIndex = this.toTop ? INDEX_00 : INDEX_0;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* @param {MouseEvent} e - Event object
|
|
413
|
+
*/
|
|
414
|
+
#MouseLeave(e) {
|
|
415
|
+
if (this.parents.length > 0 && this.isInsideForm) return;
|
|
416
|
+
|
|
417
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
418
|
+
eventTarget.style.zIndex = this.toTop ? INDEX_0 : this._reserveIndex ? INDEX_S_1 : INDEX_1;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* @param {KeyboardEvent} e - Event object
|
|
423
|
+
*/
|
|
424
|
+
#CloseListener_keydown(e) {
|
|
425
|
+
if (this._checkFixed()) return;
|
|
426
|
+
const keyCode = e.code;
|
|
427
|
+
const ctrl = keyCodeMap.isCtrl(e);
|
|
428
|
+
if (ctrl || !keyCodeMap.isNonResponseKey(keyCode)) return;
|
|
429
|
+
|
|
430
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
431
|
+
if (this.form.contains(eventTarget) || this._checkForm(eventTarget)) return;
|
|
432
|
+
if (this.editor._fileManager.pluginRegExp.test(this.kind) && !keyCodeMap.isEsc(keyCode)) return;
|
|
433
|
+
|
|
434
|
+
this.#PostCloseEvent(eventTarget);
|
|
435
|
+
this.close();
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* @param {KeyboardEvent} e - Event object
|
|
440
|
+
*/
|
|
441
|
+
#CloseListener_mousedown(e) {
|
|
442
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
443
|
+
if (this.inst?._element?.contains(eventTarget)) {
|
|
444
|
+
this.isOpen = false;
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
this.isOpen = true;
|
|
449
|
+
if (
|
|
450
|
+
eventTarget === this.inst._element ||
|
|
451
|
+
eventTarget === this.currentTarget ||
|
|
452
|
+
this._checkFixed() ||
|
|
453
|
+
this.form.contains(eventTarget) ||
|
|
454
|
+
this._checkForm(eventTarget) ||
|
|
455
|
+
dom.query.getParentElement(eventTarget, '.se-line-breaker-component')
|
|
456
|
+
) {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
this.#PostCloseEvent(eventTarget);
|
|
461
|
+
this.close(true);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @param {HTMLElement} eventTarget - The target element that triggered the event.
|
|
466
|
+
*/
|
|
467
|
+
#PostCloseEvent(eventTarget) {
|
|
468
|
+
if (!this.editor.frameContext.get('wysiwyg').contains(eventTarget)) {
|
|
469
|
+
this.component.__prevent = false;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export default Controller;
|