suneditor 3.0.0-alpha.2 → 3.0.0-alpha.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/.eslintrc.json +4 -3
- package/CONTRIBUTING.md +4 -2
- package/README.md +19 -11
- package/README_V3_TEMP.md +705 -0
- package/dist/suneditor.min.css +1 -0
- package/dist/suneditor.min.js +1 -0
- package/example.md +587 -0
- package/package.json +15 -9
- package/src/assets/icons/_default.js +166 -131
- package/src/assets/{suneditor-content.css → suneditor-contents.css} +182 -45
- package/src/assets/suneditor.css +1195 -556
- package/src/assets/variables.css +138 -0
- package/src/core/base/eventHandlers/handler_toolbar.js +35 -14
- package/src/core/base/eventHandlers/handler_ww_clipboard.js +29 -4
- package/src/core/base/eventHandlers/handler_ww_dragDrop.js +59 -15
- package/src/core/base/eventHandlers/handler_ww_key_input.js +426 -212
- package/src/core/base/eventHandlers/handler_ww_mouse.js +108 -32
- package/src/core/base/eventManager.js +540 -209
- package/src/core/base/events.js +616 -320
- package/src/core/base/history.js +93 -39
- package/src/core/class/char.js +29 -13
- package/src/core/class/component.js +332 -145
- package/src/core/class/format.js +671 -509
- package/src/core/class/html.js +504 -290
- package/src/core/class/menu.js +114 -47
- package/src/core/class/nodeTransform.js +111 -66
- package/src/core/class/offset.js +409 -105
- package/src/core/class/selection.js +220 -108
- package/src/core/class/shortcuts.js +68 -8
- package/src/core/class/toolbar.js +106 -116
- package/src/core/class/ui.js +330 -0
- package/src/core/class/viewer.js +178 -74
- package/src/core/editor.js +489 -384
- package/src/core/section/actives.js +118 -22
- package/src/core/section/constructor.js +504 -170
- package/src/core/section/context.js +28 -23
- package/src/core/section/documentType.js +561 -0
- package/src/editorInjector/_classes.js +19 -5
- package/src/editorInjector/_core.js +71 -7
- package/src/editorInjector/index.js +63 -1
- package/src/helper/converter.js +137 -19
- package/src/helper/dom/domCheck.js +294 -0
- package/src/helper/dom/domQuery.js +609 -0
- package/src/helper/dom/domUtils.js +533 -0
- package/src/helper/dom/index.js +12 -0
- package/src/helper/env.js +42 -19
- package/src/helper/index.js +7 -4
- package/src/helper/keyCodeMap.js +183 -0
- package/src/helper/numbers.js +8 -8
- package/src/helper/unicode.js +5 -5
- package/src/langs/ckb.js +69 -3
- package/src/langs/cs.js +67 -1
- package/src/langs/da.js +68 -2
- package/src/langs/de.js +68 -3
- package/src/langs/en.js +29 -1
- package/src/langs/es.js +68 -3
- package/src/langs/fa.js +70 -2
- package/src/langs/fr.js +68 -2
- package/src/langs/he.js +68 -3
- package/src/langs/hu.js +226 -0
- package/src/langs/index.js +3 -2
- package/src/langs/it.js +65 -0
- package/src/langs/ja.js +68 -3
- package/src/langs/ko.js +66 -1
- package/src/langs/lv.js +68 -3
- package/src/langs/nl.js +68 -3
- package/src/langs/pl.js +68 -3
- package/src/langs/pt_br.js +65 -0
- package/src/langs/ro.js +69 -4
- package/src/langs/ru.js +68 -3
- package/src/langs/se.js +68 -3
- package/src/langs/tr.js +68 -0
- package/src/langs/ua.js +68 -3
- package/src/langs/ur.js +71 -6
- package/src/langs/zh_cn.js +69 -4
- package/src/modules/ApiManager.js +77 -54
- package/src/modules/Browser.js +667 -0
- package/src/modules/ColorPicker.js +162 -102
- package/src/modules/Controller.js +233 -136
- package/src/modules/Figure.js +913 -489
- package/src/modules/FileManager.js +141 -72
- package/src/modules/HueSlider.js +113 -61
- package/src/modules/Modal.js +292 -113
- package/src/modules/ModalAnchorEditor.js +380 -230
- package/src/modules/SelectMenu.js +270 -168
- package/src/modules/_DragHandle.js +2 -1
- package/src/modules/index.js +3 -3
- package/src/plugins/browser/audioGallery.js +83 -0
- package/src/plugins/browser/fileBrowser.js +103 -0
- package/src/plugins/browser/fileGallery.js +83 -0
- package/src/plugins/browser/imageGallery.js +81 -0
- package/src/plugins/browser/videoGallery.js +103 -0
- package/src/plugins/command/blockquote.js +40 -27
- package/src/plugins/command/exportPDF.js +134 -0
- package/src/plugins/command/fileUpload.js +226 -158
- package/src/plugins/command/list_bulleted.js +93 -47
- package/src/plugins/command/list_numbered.js +93 -47
- package/src/plugins/dropdown/align.js +66 -54
- package/src/plugins/dropdown/backgroundColor.js +76 -45
- package/src/plugins/dropdown/font.js +71 -47
- package/src/plugins/dropdown/fontColor.js +78 -46
- package/src/plugins/dropdown/formatBlock.js +74 -33
- package/src/plugins/dropdown/hr.js +102 -51
- package/src/plugins/dropdown/layout.js +37 -26
- package/src/plugins/dropdown/lineHeight.js +54 -38
- package/src/plugins/dropdown/list.js +60 -45
- package/src/plugins/dropdown/paragraphStyle.js +51 -30
- package/src/plugins/dropdown/table.js +1269 -777
- package/src/plugins/dropdown/template.js +38 -26
- package/src/plugins/dropdown/textStyle.js +43 -31
- package/src/plugins/field/mention.js +144 -82
- package/src/plugins/index.js +32 -6
- package/src/plugins/input/fontSize.js +161 -108
- package/src/plugins/input/pageNavigator.js +70 -0
- package/src/plugins/modal/audio.js +341 -169
- package/src/plugins/modal/drawing.js +530 -0
- package/src/plugins/modal/embed.js +886 -0
- package/src/plugins/modal/image.js +673 -358
- package/src/plugins/modal/link.js +100 -71
- package/src/plugins/modal/math.js +384 -168
- package/src/plugins/modal/video.js +693 -336
- package/src/plugins/popup/anchor.js +222 -0
- package/src/suneditor.js +54 -12
- package/src/themes/dark.css +85 -0
- package/src/typedef.js +86 -0
- package/types/assets/icons/_default.d.ts +152 -0
- package/types/core/base/eventHandlers/handler_toolbar.d.ts +41 -0
- package/types/core/base/eventHandlers/handler_ww_clipboard.d.ts +40 -0
- package/types/core/base/eventHandlers/handler_ww_dragDrop.d.ts +35 -0
- package/types/core/base/eventHandlers/handler_ww_key_input.d.ts +45 -0
- package/types/core/base/eventHandlers/handler_ww_mouse.d.ts +39 -0
- package/types/core/base/eventManager.d.ts +377 -0
- package/types/core/base/events.d.ts +297 -0
- package/types/core/base/history.d.ts +81 -0
- package/types/core/class/char.d.ts +60 -0
- package/types/core/class/component.d.ts +259 -0
- package/types/core/class/format.d.ts +615 -0
- package/types/core/class/html.d.ts +377 -0
- package/types/core/class/menu.d.ts +118 -0
- package/types/core/class/nodeTransform.d.ts +93 -0
- package/types/core/class/offset.d.ts +512 -0
- package/types/core/class/selection.d.ts +188 -0
- package/types/core/class/shortcuts.d.ts +142 -0
- package/types/core/class/toolbar.d.ts +189 -0
- package/types/core/class/ui.d.ts +144 -0
- package/types/core/class/viewer.d.ts +140 -0
- package/types/core/editor.d.ts +606 -0
- package/types/core/section/actives.d.ts +46 -0
- package/types/core/section/constructor.d.ts +748 -0
- package/types/core/section/context.d.ts +45 -0
- package/types/core/section/documentType.d.ts +178 -0
- package/types/editorInjector/_classes.d.ts +41 -0
- package/types/editorInjector/_core.d.ts +92 -0
- package/types/editorInjector/index.d.ts +71 -0
- package/types/helper/converter.d.ts +150 -0
- package/types/helper/dom/domCheck.d.ts +182 -0
- package/types/helper/dom/domQuery.d.ts +214 -0
- package/types/helper/dom/domUtils.d.ts +211 -0
- package/types/helper/dom/index.d.ts +9 -0
- package/types/helper/env.d.ts +149 -0
- package/types/helper/index.d.ts +163 -0
- package/types/helper/keyCodeMap.d.ts +110 -0
- package/types/helper/numbers.d.ts +43 -0
- package/types/helper/unicode.d.ts +28 -0
- package/types/index.d.ts +0 -0
- package/{typings/Lang.d.ts → types/langs/_Lang.d.ts} +170 -103
- package/types/langs/ckb.d.ts +384 -0
- package/types/langs/cs.d.ts +384 -0
- package/types/langs/da.d.ts +384 -0
- package/types/langs/de.d.ts +384 -0
- package/types/langs/en.d.ts +384 -0
- package/types/langs/es.d.ts +384 -0
- package/types/langs/fa.d.ts +384 -0
- package/types/langs/fr.d.ts +384 -0
- package/types/langs/he.d.ts +384 -0
- package/types/langs/hu.d.ts +384 -0
- package/types/langs/index.d.ts +48 -0
- package/types/langs/it.d.ts +384 -0
- package/types/langs/ja.d.ts +384 -0
- package/types/langs/ko.d.ts +384 -0
- package/types/langs/lv.d.ts +384 -0
- package/types/langs/nl.d.ts +384 -0
- package/types/langs/pl.d.ts +384 -0
- package/types/langs/pt_br.d.ts +384 -0
- package/types/langs/ro.d.ts +384 -0
- package/types/langs/ru.d.ts +384 -0
- package/types/langs/se.d.ts +384 -0
- package/types/langs/tr.d.ts +384 -0
- package/types/langs/ua.d.ts +384 -0
- package/types/langs/ur.d.ts +384 -0
- package/types/langs/zh_cn.d.ts +384 -0
- package/types/modules/ApiManager.d.ts +125 -0
- package/types/modules/Browser.d.ts +326 -0
- package/types/modules/ColorPicker.d.ts +131 -0
- package/types/modules/Controller.d.ts +231 -0
- package/types/modules/Figure.d.ts +504 -0
- package/types/modules/FileManager.d.ts +202 -0
- package/types/modules/HueSlider.d.ts +136 -0
- package/types/modules/Modal.d.ts +117 -0
- package/types/modules/ModalAnchorEditor.d.ts +236 -0
- package/types/modules/SelectMenu.d.ts +194 -0
- package/types/modules/_DragHandle.d.ts +7 -0
- package/types/modules/index.d.ts +26 -0
- package/types/plugins/browser/audioGallery.d.ts +55 -0
- package/types/plugins/browser/fileBrowser.d.ts +64 -0
- package/types/plugins/browser/fileGallery.d.ts +55 -0
- package/types/plugins/browser/imageGallery.d.ts +51 -0
- package/types/plugins/browser/videoGallery.d.ts +57 -0
- package/types/plugins/command/blockquote.d.ts +28 -0
- package/types/plugins/command/exportPDF.d.ts +46 -0
- package/types/plugins/command/fileUpload.d.ts +156 -0
- package/types/plugins/command/list_bulleted.d.ts +56 -0
- package/types/plugins/command/list_numbered.d.ts +56 -0
- package/types/plugins/dropdown/align.d.ts +60 -0
- package/types/plugins/dropdown/backgroundColor.d.ts +63 -0
- package/types/plugins/dropdown/font.d.ts +54 -0
- package/types/plugins/dropdown/fontColor.d.ts +63 -0
- package/types/plugins/dropdown/formatBlock.d.ts +58 -0
- package/types/plugins/dropdown/hr.d.ts +81 -0
- package/types/plugins/dropdown/layout.d.ts +40 -0
- package/types/plugins/dropdown/lineHeight.d.ts +50 -0
- package/types/plugins/dropdown/list.d.ts +39 -0
- package/types/plugins/dropdown/paragraphStyle.d.ts +54 -0
- package/types/plugins/dropdown/table.d.ts +579 -0
- package/types/plugins/dropdown/template.d.ts +40 -0
- package/types/plugins/dropdown/textStyle.d.ts +41 -0
- package/types/plugins/field/mention.d.ts +102 -0
- package/types/plugins/index.d.ts +107 -0
- package/types/plugins/input/fontSize.d.ts +170 -0
- package/types/plugins/input/pageNavigator.d.ts +28 -0
- package/types/plugins/modal/audio.d.ts +269 -0
- package/types/plugins/modal/drawing.d.ts +246 -0
- package/types/plugins/modal/embed.d.ts +387 -0
- package/types/plugins/modal/image.d.ts +451 -0
- package/types/plugins/modal/link.d.ts +128 -0
- package/types/plugins/modal/math.d.ts +193 -0
- package/types/plugins/modal/video.d.ts +485 -0
- package/types/plugins/popup/anchor.d.ts +56 -0
- package/types/suneditor.d.ts +51 -0
- package/types/typedef-global.d.ts +144 -0
- package/src/core/class/notice.js +0 -42
- package/src/helper/domUtils.js +0 -1177
- package/src/modules/FileBrowser.js +0 -271
- package/src/plugins/command/exportPdf.js +0 -168
- package/src/plugins/fileBrowser/imageGallery.js +0 -81
- package/src/themes/test.css +0 -61
- package/typings/CommandPlugin.d.ts +0 -8
- package/typings/DialogPlugin.d.ts +0 -20
- package/typings/FileBrowserPlugin.d.ts +0 -30
- package/typings/Module.d.ts +0 -15
- package/typings/Plugin.d.ts +0 -42
- package/typings/SubmenuPlugin.d.ts +0 -8
- package/typings/_classes.d.ts +0 -17
- package/typings/_colorPicker.d.ts +0 -60
- package/typings/_core.d.ts +0 -55
- package/typings/align.d.ts +0 -5
- package/typings/audio.d.ts +0 -5
- package/typings/backgroundColor.d.ts +0 -5
- package/typings/blockquote.d.ts +0 -5
- package/typings/char.d.ts +0 -39
- package/typings/component.d.ts +0 -38
- package/typings/context.d.ts +0 -39
- package/typings/converter.d.ts +0 -33
- package/typings/dialog.d.ts +0 -28
- package/typings/domUtils.d.ts +0 -361
- package/typings/editor.d.ts +0 -7
- package/typings/editor.ts +0 -542
- package/typings/env.d.ts +0 -70
- package/typings/eventManager.d.ts +0 -37
- package/typings/events.d.ts +0 -262
- package/typings/fileBrowser.d.ts +0 -42
- package/typings/fileManager.d.ts +0 -67
- package/typings/font.d.ts +0 -5
- package/typings/fontColor.d.ts +0 -5
- package/typings/fontSize.d.ts +0 -5
- package/typings/format.d.ts +0 -191
- package/typings/formatBlock.d.ts +0 -5
- package/typings/history.d.ts +0 -48
- package/typings/horizontalRule.d.ts +0 -5
- package/typings/image.d.ts +0 -5
- package/typings/imageGallery.d.ts +0 -5
- package/typings/index.d.ts +0 -21
- package/typings/index.modules.d.ts +0 -11
- package/typings/index.plugins.d.ts +0 -58
- package/typings/lineHeight.d.ts +0 -5
- package/typings/link.d.ts +0 -5
- package/typings/list.d.ts +0 -5
- package/typings/math.d.ts +0 -5
- package/typings/mediaContainer.d.ts +0 -25
- package/typings/mention.d.ts +0 -5
- package/typings/node.d.ts +0 -57
- package/typings/notice.d.ts +0 -16
- package/typings/numbers.d.ts +0 -29
- package/typings/offset.d.ts +0 -24
- package/typings/options.d.ts +0 -589
- package/typings/paragraphStyle.d.ts +0 -5
- package/typings/resizing.d.ts +0 -141
- package/typings/selection.d.ts +0 -94
- package/typings/shortcuts.d.ts +0 -13
- package/typings/suneditor.d.ts +0 -9
- package/typings/table.d.ts +0 -5
- package/typings/template.d.ts +0 -5
- package/typings/textStyle.d.ts +0 -5
- package/typings/toolbar.d.ts +0 -32
- package/typings/unicode.d.ts +0 -25
- package/typings/video.d.ts +0 -5
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @this {EventManagerThis}
|
|
7
|
+
* @param {ClipboardEvent} e - Event object
|
|
8
|
+
*/
|
|
9
|
+
export function OnPaste_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, frameContext: any, e: ClipboardEvent): true | Promise<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
* @this {EventManagerThis}
|
|
13
|
+
* @param {ClipboardEvent} e - Event object
|
|
14
|
+
*/
|
|
15
|
+
export function OnCopy_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, frameContext: any, e: ClipboardEvent): Promise<boolean>;
|
|
16
|
+
export class OnCopy_wysiwyg {
|
|
17
|
+
/**
|
|
18
|
+
* @private
|
|
19
|
+
* @this {EventManagerThis}
|
|
20
|
+
* @param {ClipboardEvent} e - Event object
|
|
21
|
+
*/
|
|
22
|
+
private constructor();
|
|
23
|
+
__secopy: any;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @private
|
|
27
|
+
* @this {EventManagerThis}
|
|
28
|
+
* @param {ClipboardEvent} e - Event object
|
|
29
|
+
*/
|
|
30
|
+
export function OnCut_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, frameContext: any, e: ClipboardEvent): Promise<boolean>;
|
|
31
|
+
export class OnCut_wysiwyg {
|
|
32
|
+
/**
|
|
33
|
+
* @private
|
|
34
|
+
* @this {EventManagerThis}
|
|
35
|
+
* @param {ClipboardEvent} e - Event object
|
|
36
|
+
*/
|
|
37
|
+
private constructor();
|
|
38
|
+
__secopy: any;
|
|
39
|
+
}
|
|
40
|
+
export type EventManagerThis = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @this {EventManagerThis}
|
|
7
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
8
|
+
* @param {HTMLElement} dragCursor - Drag cursor element
|
|
9
|
+
* @param {?HTMLElement} _iframeTopArea - Iframe top area element
|
|
10
|
+
* @param {?HTMLElement} _innerToolbar - Inner toolbar element
|
|
11
|
+
* @param {DragEvent} e - Event object
|
|
12
|
+
*/
|
|
13
|
+
export function OnDragOver_wysiwyg(
|
|
14
|
+
this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>,
|
|
15
|
+
fc: __se__FrameContext,
|
|
16
|
+
dragCursor: HTMLElement,
|
|
17
|
+
_iframeTopArea: HTMLElement | null,
|
|
18
|
+
_innerToolbar: HTMLElement | null,
|
|
19
|
+
e: DragEvent
|
|
20
|
+
): void;
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
* @this {EventManagerThis}
|
|
24
|
+
* @param {HTMLElement} dragCursor - Drag cursor element
|
|
25
|
+
*/
|
|
26
|
+
export function OnDragEnd_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, dragCursor: HTMLElement): void;
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
* @this {EventManagerThis}
|
|
30
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
31
|
+
* @param {HTMLElement} dragCursor - Drag cursor element
|
|
32
|
+
* @param {DragEvent} e - Event object
|
|
33
|
+
*/
|
|
34
|
+
export function OnDrop_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, dragCursor: HTMLElement, e: DragEvent): boolean | Promise<boolean>;
|
|
35
|
+
export type EventManagerThis = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @private
|
|
3
|
+
* @this {EventManagerThis}
|
|
4
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
5
|
+
* @param {InputEvent} e - Event object
|
|
6
|
+
*/
|
|
7
|
+
export function OnInput_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: InputEvent): Promise<boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* @private
|
|
10
|
+
* @this {EventManagerThis}
|
|
11
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
12
|
+
* @param {KeyboardEvent} e - Event object
|
|
13
|
+
*/
|
|
14
|
+
export function OnKeyDown_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: KeyboardEvent): Promise<boolean>;
|
|
15
|
+
export class OnKeyDown_wysiwyg {
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
* @this {EventManagerThis}
|
|
19
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
20
|
+
* @param {KeyboardEvent} e - Event object
|
|
21
|
+
*/
|
|
22
|
+
private constructor();
|
|
23
|
+
isComposing: boolean;
|
|
24
|
+
_onShortcutKey: boolean;
|
|
25
|
+
_formatAttrsTemp: NamedNodeMap;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
* @this {EventManagerThis}
|
|
30
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
31
|
+
* @param {KeyboardEvent} e - Event object
|
|
32
|
+
*/
|
|
33
|
+
export function OnKeyUp_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: KeyboardEvent): Promise<void>;
|
|
34
|
+
export class OnKeyUp_wysiwyg {
|
|
35
|
+
/**
|
|
36
|
+
* @private
|
|
37
|
+
* @this {EventManagerThis}
|
|
38
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
39
|
+
* @param {KeyboardEvent} e - Event object
|
|
40
|
+
*/
|
|
41
|
+
private constructor();
|
|
42
|
+
_formatAttrsTemp: any;
|
|
43
|
+
__retainTimer: number | void;
|
|
44
|
+
}
|
|
45
|
+
export type EventManagerThis = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @this {EventManagerThis}
|
|
7
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
8
|
+
* @param {MouseEvent} e - Event object
|
|
9
|
+
*/
|
|
10
|
+
export function OnMouseDown_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* @private
|
|
13
|
+
* @this {EventManagerThis}
|
|
14
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
15
|
+
* @param {MouseEvent} e - Event object
|
|
16
|
+
*/
|
|
17
|
+
export function OnMouseUp_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* @private
|
|
20
|
+
* @this {EventManagerThis}
|
|
21
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
22
|
+
* @param {MouseEvent} e - Event object
|
|
23
|
+
*/
|
|
24
|
+
export function OnClick_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* @private
|
|
27
|
+
* @this {EventManagerThis}
|
|
28
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
29
|
+
* @param {MouseEvent} e - Event object
|
|
30
|
+
*/
|
|
31
|
+
export function OnMouseMove_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @private
|
|
34
|
+
* @this {EventManagerThis}
|
|
35
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
36
|
+
* @param {MouseEvent} e - Event object
|
|
37
|
+
*/
|
|
38
|
+
export function OnMouseLeave_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<void>;
|
|
39
|
+
export type EventManagerThis = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
export default EventManager;
|
|
2
|
+
export type EventManagerThis = Omit<EventManager & Partial<__se__EditorInjector>, 'eventManager'>;
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Omit<EventManager & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @constructor
|
|
8
|
+
* @this {EventManagerThis}
|
|
9
|
+
* @description Event manager, editor's all event management class
|
|
10
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
11
|
+
* @property {__se__EditorCore} editor - The root editor instance
|
|
12
|
+
*/
|
|
13
|
+
declare function EventManager(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, editor: __se__EditorCore): void;
|
|
14
|
+
declare class EventManager {
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {Omit<EventManager & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* @constructor
|
|
20
|
+
* @this {EventManagerThis}
|
|
21
|
+
* @description Event manager, editor's all event management class
|
|
22
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
23
|
+
* @property {__se__EditorCore} editor - The root editor instance
|
|
24
|
+
*/
|
|
25
|
+
constructor(editor: __se__EditorCore);
|
|
26
|
+
/**
|
|
27
|
+
* @description Old browsers: When there is no 'e.isComposing' in the keyup event
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
30
|
+
isComposing: boolean;
|
|
31
|
+
/** @type {Array<*>} */
|
|
32
|
+
_events: Array<any>;
|
|
33
|
+
/** @type {RegExp} */
|
|
34
|
+
_onButtonsCheck: RegExp;
|
|
35
|
+
/** @type {boolean} */
|
|
36
|
+
_onShortcutKey: boolean;
|
|
37
|
+
/** @type {number} */
|
|
38
|
+
_balloonDelay: number;
|
|
39
|
+
/** @type {ResizeObserver} */
|
|
40
|
+
_wwFrameObserver: ResizeObserver;
|
|
41
|
+
/** @type {ResizeObserver} */
|
|
42
|
+
_toolbarObserver: ResizeObserver;
|
|
43
|
+
/** @type {Element|null} */
|
|
44
|
+
_lineBreakComp: Element | null;
|
|
45
|
+
/** @type {Object<string, *>|null} */
|
|
46
|
+
_formatAttrsTemp: {
|
|
47
|
+
[x: string]: any;
|
|
48
|
+
} | null;
|
|
49
|
+
/** @type {number} */
|
|
50
|
+
_resizeClientY: number;
|
|
51
|
+
/** @type {__se__GlobalEventInfo|null} */
|
|
52
|
+
__resize_editor: __se__GlobalEventInfo | null;
|
|
53
|
+
/** @type {__se__GlobalEventInfo|null} */
|
|
54
|
+
__close_move: __se__GlobalEventInfo | null;
|
|
55
|
+
/** @type {__se__GlobalEventInfo|null} */
|
|
56
|
+
__geckoActiveEvent: __se__GlobalEventInfo | null;
|
|
57
|
+
/** @type {Array<Element>} */
|
|
58
|
+
__scrollparents: Array<Element>;
|
|
59
|
+
/** @type {Array<Node>} */
|
|
60
|
+
__cacheStyleNodes: Array<Node>;
|
|
61
|
+
/** @type {__se__GlobalEventInfo|null} */
|
|
62
|
+
__selectionSyncEvent: __se__GlobalEventInfo | null;
|
|
63
|
+
/** @type {boolean} */
|
|
64
|
+
_inputFocus: boolean;
|
|
65
|
+
/** @type {Object<string, *>|null} */
|
|
66
|
+
__inputPlugin: {
|
|
67
|
+
[x: string]: any;
|
|
68
|
+
} | null;
|
|
69
|
+
/** @type {?__se__EventInfo=} */
|
|
70
|
+
__inputBlurEvent: (__se__EventInfo | null) | undefined;
|
|
71
|
+
/** @type {?__se__EventInfo=} */
|
|
72
|
+
__inputKeyEvent: (__se__EventInfo | null) | undefined;
|
|
73
|
+
/** @type {HTMLInputElement} */
|
|
74
|
+
__focusTemp: HTMLInputElement;
|
|
75
|
+
/** @type {number|void} */
|
|
76
|
+
__retainTimer: number | void;
|
|
77
|
+
/** @type {Element} */
|
|
78
|
+
__eventDoc: Element;
|
|
79
|
+
/** @type {string} */
|
|
80
|
+
__secopy: string;
|
|
81
|
+
/**
|
|
82
|
+
* @this {EventManagerThis}
|
|
83
|
+
* @description Register for an event.
|
|
84
|
+
* - Only events registered with this method are unregistered or re-registered when methods such as 'setOptions', 'destroy' are called.
|
|
85
|
+
* @param {*} target Target element
|
|
86
|
+
* @param {string} type Event type
|
|
87
|
+
* @param {(...args: *) => *} listener Event handler
|
|
88
|
+
* @param {boolean|AddEventListenerOptions=} useCapture Event useCapture option
|
|
89
|
+
* @return {__se__EventInfo|null} Registered event information
|
|
90
|
+
*/
|
|
91
|
+
addEvent(
|
|
92
|
+
this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
|
|
93
|
+
target: any,
|
|
94
|
+
type: string,
|
|
95
|
+
listener: (...args: any) => any,
|
|
96
|
+
useCapture?: (boolean | AddEventListenerOptions) | undefined
|
|
97
|
+
): __se__EventInfo | null;
|
|
98
|
+
/**
|
|
99
|
+
* @this {EventManagerThis}
|
|
100
|
+
* @description Remove event
|
|
101
|
+
* @param {__se__EventInfo} params event info = this.addEvent()
|
|
102
|
+
* @returns {undefined|null} Success: null, Not found: undefined
|
|
103
|
+
*/
|
|
104
|
+
removeEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, params: __se__EventInfo): undefined | null;
|
|
105
|
+
/**
|
|
106
|
+
* @this {EventManagerThis}
|
|
107
|
+
* @description Add an event to document.
|
|
108
|
+
* - When created as an Iframe, the same event is added to the document in the Iframe.
|
|
109
|
+
* @param {string} type Event type
|
|
110
|
+
* @param {(...args: *) => *} listener Event listener
|
|
111
|
+
* @param {boolean|AddEventListenerOptions=} useCapture Use event capture
|
|
112
|
+
* @return {__se__GlobalEventInfo} Registered event information
|
|
113
|
+
*/
|
|
114
|
+
addGlobalEvent(
|
|
115
|
+
this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
|
|
116
|
+
type: string,
|
|
117
|
+
listener: (...args: any) => any,
|
|
118
|
+
useCapture?: (boolean | AddEventListenerOptions) | undefined
|
|
119
|
+
): __se__GlobalEventInfo;
|
|
120
|
+
/**
|
|
121
|
+
* @this {EventManagerThis}
|
|
122
|
+
* @description Remove events from document.
|
|
123
|
+
* - When created as an Iframe, the event of the document inside the Iframe is also removed.
|
|
124
|
+
* @param {string|__se__GlobalEventInfo} type Event type or (Event info = this.addGlobalEvent())
|
|
125
|
+
* @param {(...args: *) => *=} listener Event listener
|
|
126
|
+
* @param {boolean|AddEventListenerOptions=} useCapture Use event capture
|
|
127
|
+
* @returns {undefined|null} Success: null, Not found: undefined
|
|
128
|
+
*/
|
|
129
|
+
removeGlobalEvent(
|
|
130
|
+
this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
|
|
131
|
+
type: string | __se__GlobalEventInfo,
|
|
132
|
+
listener?: ((...args: any) => any) | undefined,
|
|
133
|
+
useCapture?: (boolean | AddEventListenerOptions) | undefined
|
|
134
|
+
): undefined | null;
|
|
135
|
+
/**
|
|
136
|
+
* @this {EventManagerThis}
|
|
137
|
+
* @description Activates the corresponding button with the tags information of the current cursor position,
|
|
138
|
+
* - such as 'bold', 'underline', etc., and executes the 'active' method of the plugins.
|
|
139
|
+
* @param {?Node=} selectionNode selectionNode
|
|
140
|
+
* @returns {Node|undefined} selectionNode
|
|
141
|
+
*/
|
|
142
|
+
applyTagEffect(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, selectionNode?: (Node | null) | undefined): Node | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* @private
|
|
145
|
+
* @this {EventManagerThis}
|
|
146
|
+
* @description Gives an active effect when the mouse down event is blocked. (Used when "env.isGecko" is true)
|
|
147
|
+
* @param {Node} target Target element
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
_injectActiveEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, target: Node): void;
|
|
151
|
+
/**
|
|
152
|
+
* @private
|
|
153
|
+
* @this {EventManagerThis}
|
|
154
|
+
* @description remove class, display text.
|
|
155
|
+
* @param {Array<string>} ignoredList Igonred button list
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
_setKeyEffect(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, ignoredList: Array<string>): void;
|
|
159
|
+
/**
|
|
160
|
+
* @private
|
|
161
|
+
* @this {EventManagerThis}
|
|
162
|
+
* @description Show toolbar-balloon with delay.
|
|
163
|
+
*/
|
|
164
|
+
_showToolbarBalloonDelay(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
165
|
+
/**
|
|
166
|
+
* @private
|
|
167
|
+
* @this {EventManagerThis}
|
|
168
|
+
* @description Show or hide the toolbar-balloon.
|
|
169
|
+
*/
|
|
170
|
+
_toggleToolbarBalloon(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
171
|
+
/**
|
|
172
|
+
* @private
|
|
173
|
+
* @this {EventManagerThis}
|
|
174
|
+
* @description Hide the toolbar.
|
|
175
|
+
*/
|
|
176
|
+
_hideToolbar(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
177
|
+
/**
|
|
178
|
+
* @private
|
|
179
|
+
* @this {EventManagerThis}
|
|
180
|
+
* @description Hide the Sub-Toolbar.
|
|
181
|
+
*/
|
|
182
|
+
_hideToolbar_sub(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
183
|
+
/**
|
|
184
|
+
* @private
|
|
185
|
+
* @this {EventManagerThis}
|
|
186
|
+
* @description Checks if a node is a non-focusable element(.data-se-non-focus). (e.g. fileUpload.component > span)
|
|
187
|
+
* @param {Node} node Node to check
|
|
188
|
+
* @returns {boolean} True if the node is non-focusable, otherwise false
|
|
189
|
+
*/
|
|
190
|
+
_isNonFocusNode(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, node: Node): boolean;
|
|
191
|
+
/**
|
|
192
|
+
* @private
|
|
193
|
+
* @this {EventManagerThis}
|
|
194
|
+
* @description Determines if the "range" is within an uneditable node.
|
|
195
|
+
* @param {Range} range The range object
|
|
196
|
+
* @param {boolean} isFront Whether to check the start or end of the range
|
|
197
|
+
* @returns {Node|null} The uneditable node if found, otherwise null
|
|
198
|
+
*/
|
|
199
|
+
_isUneditableNode(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, range: Range, isFront: boolean): Node | null;
|
|
200
|
+
/**
|
|
201
|
+
* @private
|
|
202
|
+
* @this {EventManagerThis}
|
|
203
|
+
* @description Retrieves the sibling node of a selected node if it is uneditable.
|
|
204
|
+
* - Used only in `_isUneditableNode`.
|
|
205
|
+
* @param {Node} selectNode The selected node
|
|
206
|
+
* @param {string} siblingKey The key to access the sibling (`previousSibling` or `nextSibling`)
|
|
207
|
+
* @param {Node} container The parent container node
|
|
208
|
+
* @returns {Node|null} The sibling node if found, otherwise null
|
|
209
|
+
*/
|
|
210
|
+
_isUneditableNode_getSibling(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, selectNode: Node, siblingKey: string, container: Node): Node | null;
|
|
211
|
+
/**
|
|
212
|
+
* @private
|
|
213
|
+
* @this {EventManagerThis}
|
|
214
|
+
* @description Deletes specific elements such as tables in "Firefox" and media elements (image, video, audio) in "Chrome".
|
|
215
|
+
* - Handles deletion logic based on selection range and node types.
|
|
216
|
+
* @returns {boolean} Returns `true` if an element was deleted and focus was adjusted, otherwise `false`.
|
|
217
|
+
*/
|
|
218
|
+
_hardDelete(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): boolean;
|
|
219
|
+
/**
|
|
220
|
+
* @private
|
|
221
|
+
* @this {EventManagerThis}
|
|
222
|
+
* @description If there is no default format, add a line and move 'selection'.
|
|
223
|
+
* @param {string|null} formatName Format tag name (default: 'P')
|
|
224
|
+
*/
|
|
225
|
+
_setDefaultLine(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, formatName: string | null): any;
|
|
226
|
+
/**
|
|
227
|
+
* @private
|
|
228
|
+
* @this {EventManagerThis}
|
|
229
|
+
* @description Handles data transfer actions for paste and drop events.
|
|
230
|
+
* - It processes clipboard data, triggers relevant events, and inserts cleaned data into the editor.
|
|
231
|
+
* @param {"paste"|"drop"} type The type of event
|
|
232
|
+
* @param {Event} e The original event object
|
|
233
|
+
* @param {DataTransfer} clipboardData The clipboard data object
|
|
234
|
+
* @param {__se__FrameContext} frameContext The frame context
|
|
235
|
+
* @returns {Promise<boolean>} Resolves to `false` if processing is complete, otherwise allows default behavior
|
|
236
|
+
*/
|
|
237
|
+
_dataTransferAction(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, type: 'paste' | 'drop', e: Event, clipboardData: DataTransfer, frameContext: __se__FrameContext): Promise<boolean>;
|
|
238
|
+
/**
|
|
239
|
+
* @private
|
|
240
|
+
* @this {EventManagerThis}
|
|
241
|
+
* @description Processes clipboard data for paste and drop events, handling text and HTML cleanup.
|
|
242
|
+
* - Supports specific handling for content from Microsoft Office applications.
|
|
243
|
+
* @param {"paste"|"drop"} type The type of event
|
|
244
|
+
* @param {Event} e The original event object
|
|
245
|
+
* @param {DataTransfer} clipboardData The clipboard data object
|
|
246
|
+
* @param {__se__FrameContext} frameContext The frame context
|
|
247
|
+
* @returns {Promise<boolean>} Resolves to `false` if processing is complete, otherwise allows default behavior
|
|
248
|
+
*/
|
|
249
|
+
_setClipboardData(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, type: 'paste' | 'drop', e: Event, clipboardData: DataTransfer, frameContext: __se__FrameContext): Promise<boolean>;
|
|
250
|
+
/**
|
|
251
|
+
* @private
|
|
252
|
+
* @this {EventManagerThis}
|
|
253
|
+
* @description Registers common UI events such as toolbar and menu interactions.
|
|
254
|
+
* - Adds event listeners for various UI elements, sets up observers, and configures window events.
|
|
255
|
+
*/
|
|
256
|
+
_addCommonEvents(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
257
|
+
/**
|
|
258
|
+
* @private
|
|
259
|
+
* @this {EventManagerThis}
|
|
260
|
+
* @description Registers event listeners for the editor's frame, including text input, selection, and UI interactions.
|
|
261
|
+
* - Handles events inside an iframe or within the standard wysiwyg editor.
|
|
262
|
+
* @param {__se__FrameContext} fc The frame context object
|
|
263
|
+
*/
|
|
264
|
+
_addFrameEvents(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext): void;
|
|
265
|
+
/**
|
|
266
|
+
* @private
|
|
267
|
+
* @this {EventManagerThis}
|
|
268
|
+
* @description Adds event listeners for resizing the status bar if resizing is enabled.
|
|
269
|
+
* - If resizing is not enabled, applies a non-resizable class.
|
|
270
|
+
* @param {__se__FrameContext} fc The frame context object
|
|
271
|
+
* @param {__se__FrameOptions} fo The frame options object
|
|
272
|
+
*/
|
|
273
|
+
__addStatusbarEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, fo: __se__FrameOptions): void;
|
|
274
|
+
/**
|
|
275
|
+
* @private
|
|
276
|
+
* @this {EventManagerThis}
|
|
277
|
+
* @description Removes all registered event listeners from the editor.
|
|
278
|
+
* - Disconnects observers and clears stored event references.
|
|
279
|
+
*/
|
|
280
|
+
_removeAllEvents(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
281
|
+
/**
|
|
282
|
+
* @private
|
|
283
|
+
* @this {EventManagerThis}
|
|
284
|
+
* @description Adjusts the position of the editor's toolbar, controllers, and other floating elements based on scroll position.
|
|
285
|
+
* - Ensures UI elements maintain their intended relative positions when scrolling.
|
|
286
|
+
* @param {Element} eventWysiwyg The wysiwyg event object containing scroll data
|
|
287
|
+
*/
|
|
288
|
+
_moveContainer(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, eventWysiwyg: Element): void;
|
|
289
|
+
/**
|
|
290
|
+
* @private
|
|
291
|
+
* @this {EventManagerThis}
|
|
292
|
+
* @description Handles the scrolling of the editor container.
|
|
293
|
+
* - Repositions open controllers if necessary.
|
|
294
|
+
*/
|
|
295
|
+
_scrollContainer(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
296
|
+
/**
|
|
297
|
+
* @private
|
|
298
|
+
* @this {EventManagerThis}
|
|
299
|
+
* @description Repositions the currently open controllers within the editor.
|
|
300
|
+
* - Ensures elements are displayed in their correct positions after scrolling.
|
|
301
|
+
* @param {Array<object>} cont List of controllers to reposition
|
|
302
|
+
*/
|
|
303
|
+
__rePositionController(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, cont: Array<object>): void;
|
|
304
|
+
/**
|
|
305
|
+
* @private
|
|
306
|
+
* @this {EventManagerThis}
|
|
307
|
+
* @description Resets the frame status, adjusting toolbar and UI elements based on the current state.
|
|
308
|
+
* - Handles inline editor adjustments, fullscreen mode, and responsive toolbar updates.
|
|
309
|
+
*/
|
|
310
|
+
_resetFrameStatus(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
311
|
+
/**
|
|
312
|
+
* @private
|
|
313
|
+
* @this {EventManagerThis}
|
|
314
|
+
* @description Synchronizes the selection state by resetting it on mouseup.
|
|
315
|
+
* - Ensures selection updates correctly across different interactions.
|
|
316
|
+
*/
|
|
317
|
+
_setSelectionSync(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
318
|
+
/**
|
|
319
|
+
* @private
|
|
320
|
+
* @this {EventManagerThis}
|
|
321
|
+
* @description Retains the style nodes for formatting consistency when applying styles.
|
|
322
|
+
* - Preserves nested styling by cloning and restructuring the style nodes.
|
|
323
|
+
* @param {HTMLElement} formatEl The format element where styles should be retained
|
|
324
|
+
* @param {Array<Node>} _styleNodes The list of style nodes to retain
|
|
325
|
+
*/
|
|
326
|
+
_retainStyleNodes(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, formatEl: HTMLElement, _styleNodes: Array<Node>): void;
|
|
327
|
+
/**
|
|
328
|
+
* @private
|
|
329
|
+
* @this {EventManagerThis}
|
|
330
|
+
* @description Clears retained style nodes by replacing content with a single line break.
|
|
331
|
+
* - Resets the selection to the start of the cleared element.
|
|
332
|
+
* @param {HTMLElement} formatEl The format element where styles should be cleared
|
|
333
|
+
*/
|
|
334
|
+
_clearRetainStyleNodes(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, formatEl: HTMLElement): void;
|
|
335
|
+
/**
|
|
336
|
+
* @private
|
|
337
|
+
* @this {EventManagerThis}
|
|
338
|
+
* @description Calls a registered plugin event and executes associated handlers.
|
|
339
|
+
* - If any handler returns `false`, the event propagation stops.
|
|
340
|
+
* @param {string} name The name of the plugin event
|
|
341
|
+
* @param {{ frameContext: __se__FrameContext, event: Event, data?: string, line?: Node, range?: Range, file?: File }} e The event object passed to the plugin event handler
|
|
342
|
+
* @returns {boolean|undefined} Returns `false` if any handler stops the event, otherwise `undefined`
|
|
343
|
+
*/
|
|
344
|
+
_callPluginEvent(
|
|
345
|
+
this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
|
|
346
|
+
name: string,
|
|
347
|
+
e: {
|
|
348
|
+
frameContext: __se__FrameContext;
|
|
349
|
+
event: Event;
|
|
350
|
+
data?: string;
|
|
351
|
+
line?: Node;
|
|
352
|
+
range?: Range;
|
|
353
|
+
file?: File;
|
|
354
|
+
}
|
|
355
|
+
): boolean | undefined;
|
|
356
|
+
/**
|
|
357
|
+
* @private
|
|
358
|
+
* @this {EventManagerThis}
|
|
359
|
+
* @description Handles the selection of a component when hovering over it.
|
|
360
|
+
* - If the target is a component, it ensures that the component is selected properly.
|
|
361
|
+
* @param {Element} target The element being hovered over
|
|
362
|
+
*/
|
|
363
|
+
_overComponentSelect(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, target: Element): void;
|
|
364
|
+
/**
|
|
365
|
+
* @private
|
|
366
|
+
* @this {EventManagerThis}
|
|
367
|
+
* @description Removes input event listeners and resets input-related properties.
|
|
368
|
+
*/
|
|
369
|
+
__removeInput(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
|
|
370
|
+
/**
|
|
371
|
+
* @private
|
|
372
|
+
* @this {EventManagerThis}
|
|
373
|
+
* @description Prevents the default behavior of the Enter key and refocuses the editor.
|
|
374
|
+
* @param {Event} e The keyboard event
|
|
375
|
+
*/
|
|
376
|
+
__enterPrevent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, e: Event): void;
|
|
377
|
+
}
|