suneditor 3.0.0-alpha.9 → 3.0.0-beta.2
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 +170 -22
- package/{LICENSE.txt → LICENSE} +9 -9
- package/README.md +168 -30
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +47 -21
- package/src/assets/design/color.css +121 -0
- package/src/assets/design/index.css +3 -0
- package/src/assets/design/size.css +35 -0
- package/src/assets/design/typography.css +37 -0
- package/src/assets/icons/defaultIcons.js +232 -0
- package/src/assets/suneditor-contents.css +181 -46
- package/src/assets/suneditor.css +1403 -650
- package/src/core/base/eventHandlers/handler_toolbar.js +35 -14
- package/src/core/base/eventHandlers/handler_ww_clipboard.js +23 -4
- package/src/core/base/eventHandlers/handler_ww_dragDrop.js +49 -10
- package/src/core/base/eventHandlers/handler_ww_key_input.js +422 -224
- package/src/core/base/eventHandlers/handler_ww_mouse.js +83 -36
- package/src/core/base/eventManager.js +520 -179
- package/src/core/base/history.js +95 -41
- package/src/core/class/char.js +26 -11
- package/src/core/class/component.js +345 -137
- package/src/core/class/format.js +683 -519
- package/src/core/class/html.js +485 -305
- package/src/core/class/menu.js +133 -47
- package/src/core/class/nodeTransform.js +90 -71
- package/src/core/class/offset.js +408 -92
- package/src/core/class/selection.js +216 -106
- package/src/core/class/shortcuts.js +68 -8
- package/src/core/class/toolbar.js +106 -116
- package/src/core/class/ui.js +422 -0
- package/src/core/class/viewer.js +178 -74
- package/src/core/editor.js +496 -389
- package/src/core/section/actives.js +123 -27
- package/src/core/section/constructor.js +615 -206
- 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/events.js +622 -0
- package/src/helper/clipboard.js +59 -0
- package/src/helper/converter.js +202 -26
- package/src/helper/dom/domCheck.js +304 -0
- package/src/helper/dom/domQuery.js +669 -0
- package/src/helper/dom/domUtils.js +557 -0
- package/src/helper/dom/index.js +12 -0
- package/src/helper/env.js +46 -56
- package/src/helper/index.js +10 -4
- package/src/helper/keyCodeMap.js +183 -0
- package/src/helper/numbers.js +12 -8
- package/src/helper/unicode.js +9 -5
- package/src/langs/ckb.js +74 -4
- package/src/langs/cs.js +72 -2
- package/src/langs/da.js +73 -3
- package/src/langs/de.js +73 -4
- package/src/langs/en.js +23 -3
- package/src/langs/es.js +73 -4
- package/src/langs/fa.js +75 -3
- package/src/langs/fr.js +73 -3
- package/src/langs/he.js +73 -4
- package/src/langs/hu.js +230 -0
- package/src/langs/index.js +7 -3
- package/src/langs/it.js +70 -1
- package/src/langs/ja.js +72 -4
- package/src/langs/km.js +230 -0
- package/src/langs/ko.js +22 -2
- package/src/langs/lv.js +74 -5
- package/src/langs/nl.js +73 -4
- package/src/langs/pl.js +73 -4
- package/src/langs/pt_br.js +70 -1
- package/src/langs/ro.js +74 -5
- package/src/langs/ru.js +73 -4
- package/src/langs/se.js +73 -4
- package/src/langs/tr.js +73 -1
- package/src/langs/{ua.js → uk.js} +75 -6
- package/src/langs/ur.js +77 -8
- package/src/langs/zh_cn.js +74 -5
- 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 +273 -142
- package/src/modules/Figure.js +925 -484
- package/src/modules/FileManager.js +121 -69
- package/src/modules/HueSlider.js +113 -61
- package/src/modules/Modal.js +291 -122
- package/src/modules/ModalAnchorEditor.js +383 -234
- 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 +229 -162
- package/src/plugins/command/list_bulleted.js +83 -47
- package/src/plugins/command/list_numbered.js +83 -47
- package/src/plugins/dropdown/align.js +66 -54
- package/src/plugins/dropdown/backgroundColor.js +63 -49
- package/src/plugins/dropdown/font.js +71 -47
- package/src/plugins/dropdown/fontColor.js +63 -48
- package/src/plugins/dropdown/formatBlock.js +70 -33
- package/src/plugins/dropdown/hr.js +92 -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 +2003 -813
- package/src/plugins/dropdown/template.js +38 -26
- package/src/plugins/dropdown/textStyle.js +43 -31
- package/src/plugins/field/mention.js +147 -86
- 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 +358 -173
- package/src/plugins/modal/drawing.js +531 -0
- package/src/plugins/modal/embed.js +886 -0
- package/src/plugins/modal/image.js +674 -362
- package/src/plugins/modal/link.js +100 -71
- package/src/plugins/modal/math.js +367 -167
- package/src/plugins/modal/video.js +691 -335
- package/src/plugins/popup/anchor.js +222 -0
- package/src/suneditor.js +50 -13
- package/src/themes/dark.css +122 -0
- package/src/typedef.js +130 -0
- package/types/assets/icons/defaultIcons.d.ts +153 -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 +385 -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 +212 -0
- package/types/core/class/format.d.ts +616 -0
- package/types/core/class/html.d.ts +422 -0
- package/types/core/class/menu.d.ts +126 -0
- package/types/core/class/nodeTransform.d.ts +93 -0
- package/types/core/class/offset.d.ts +522 -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 +164 -0
- package/types/core/class/viewer.d.ts +140 -0
- package/types/core/editor.d.ts +610 -0
- package/types/core/section/actives.d.ts +46 -0
- package/types/core/section/constructor.d.ts +777 -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/events.d.ts +273 -0
- package/types/helper/clipboard.d.ts +12 -0
- package/types/helper/converter.d.ts +197 -0
- package/types/helper/dom/domCheck.d.ts +189 -0
- package/types/helper/dom/domQuery.d.ts +223 -0
- package/types/helper/dom/domUtils.d.ts +226 -0
- package/types/helper/dom/index.d.ts +9 -0
- package/types/helper/env.d.ts +132 -0
- package/types/helper/index.d.ts +174 -0
- package/types/helper/keyCodeMap.d.ts +110 -0
- package/types/helper/numbers.d.ts +46 -0
- package/types/helper/unicode.d.ts +28 -0
- package/types/index.d.ts +120 -0
- package/{typings/Lang.d.ts → types/langs/_Lang.d.ts} +173 -103
- package/types/langs/ckb.d.ts +3 -0
- package/types/langs/cs.d.ts +3 -0
- package/types/langs/da.d.ts +3 -0
- package/types/langs/de.d.ts +3 -0
- package/types/langs/en.d.ts +3 -0
- package/types/langs/es.d.ts +3 -0
- package/types/langs/fa.d.ts +3 -0
- package/types/langs/fr.d.ts +3 -0
- package/types/langs/he.d.ts +3 -0
- package/types/langs/hu.d.ts +3 -0
- package/types/langs/index.d.ts +54 -0
- package/types/langs/it.d.ts +3 -0
- package/types/langs/ja.d.ts +3 -0
- package/types/langs/km.d.ts +3 -0
- package/types/langs/ko.d.ts +3 -0
- package/types/langs/lv.d.ts +3 -0
- package/types/langs/nl.d.ts +3 -0
- package/types/langs/pl.d.ts +3 -0
- package/types/langs/pt_br.d.ts +3 -0
- package/types/langs/ro.d.ts +3 -0
- package/types/langs/ru.d.ts +3 -0
- package/types/langs/se.d.ts +3 -0
- package/types/langs/tr.d.ts +3 -0
- package/types/langs/uk.d.ts +3 -0
- package/types/langs/ur.d.ts +3 -0
- package/types/langs/zh_cn.d.ts +3 -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 +251 -0
- package/types/modules/Figure.d.ts +517 -0
- package/types/modules/FileManager.d.ts +202 -0
- package/types/modules/HueSlider.d.ts +136 -0
- package/types/modules/Modal.d.ts +111 -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 +46 -0
- package/types/plugins/command/list_numbered.d.ts +46 -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 +54 -0
- package/types/plugins/dropdown/hr.d.ts +71 -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 +627 -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.d.ts +233 -0
- package/.eslintignore +0 -7
- package/.eslintrc.json +0 -64
- package/src/assets/icons/_default.js +0 -194
- package/src/core/base/events.js +0 -320
- 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,610 @@
|
|
|
1
|
+
export default Editor;
|
|
2
|
+
export type EditorInitOptions_editor = import('./section/constructor').EditorInitOptions;
|
|
3
|
+
export type EditorFrameOptions_editor = import('./section/constructor').EditorFrameOptions;
|
|
4
|
+
export type ControllerInfo_editor = import('../modules/Controller').ControllerInfo;
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {import('./section/constructor').EditorInitOptions} EditorInitOptions_editor
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {import('./section/constructor').EditorFrameOptions} EditorFrameOptions_editor
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {import('../modules/Controller').ControllerInfo} ControllerInfo_editor
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @constructor
|
|
16
|
+
* @description SunEditor constructor function.
|
|
17
|
+
* @param {Array<{target: Element, key: *, options: EditorFrameOptions_editor}>} multiTargets Target element
|
|
18
|
+
* @param {EditorInitOptions_editor} options options
|
|
19
|
+
*/
|
|
20
|
+
declare function Editor(
|
|
21
|
+
multiTargets: Array<{
|
|
22
|
+
target: Element;
|
|
23
|
+
key: any;
|
|
24
|
+
options: EditorFrameOptions_editor;
|
|
25
|
+
}>,
|
|
26
|
+
options: EditorInitOptions_editor
|
|
27
|
+
): void;
|
|
28
|
+
declare class Editor {
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {import('./section/constructor').EditorInitOptions} EditorInitOptions_editor
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* @typedef {import('./section/constructor').EditorFrameOptions} EditorFrameOptions_editor
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {import('../modules/Controller').ControllerInfo} ControllerInfo_editor
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* @constructor
|
|
40
|
+
* @description SunEditor constructor function.
|
|
41
|
+
* @param {Array<{target: Element, key: *, options: EditorFrameOptions_editor}>} multiTargets Target element
|
|
42
|
+
* @param {EditorInitOptions_editor} options options
|
|
43
|
+
*/
|
|
44
|
+
constructor(
|
|
45
|
+
multiTargets: Array<{
|
|
46
|
+
target: Element;
|
|
47
|
+
key: any;
|
|
48
|
+
options: EditorFrameOptions_editor;
|
|
49
|
+
}>,
|
|
50
|
+
options: EditorInitOptions_editor
|
|
51
|
+
);
|
|
52
|
+
/**
|
|
53
|
+
* @description Frame root key array
|
|
54
|
+
* @type {Array<*>}
|
|
55
|
+
*/
|
|
56
|
+
rootKeys: Array<any>;
|
|
57
|
+
/**
|
|
58
|
+
* @description Frame root map
|
|
59
|
+
* @type {Map<*, __se__FrameContext>}
|
|
60
|
+
*/
|
|
61
|
+
frameRoots: Map<any, __se__FrameContext>;
|
|
62
|
+
/**
|
|
63
|
+
* @description Editor context object
|
|
64
|
+
* @type {__se__Context}
|
|
65
|
+
*/
|
|
66
|
+
context: __se__Context;
|
|
67
|
+
/**
|
|
68
|
+
* @description Current focusing frame context
|
|
69
|
+
* @type {__se__FrameContext}
|
|
70
|
+
*/
|
|
71
|
+
frameContext: __se__FrameContext;
|
|
72
|
+
/**
|
|
73
|
+
* @description Current focusing frame context options
|
|
74
|
+
* @type {__se__FrameOptions}
|
|
75
|
+
*/
|
|
76
|
+
frameOptions: __se__FrameOptions;
|
|
77
|
+
/**
|
|
78
|
+
* @description Document object
|
|
79
|
+
* @type {Document}
|
|
80
|
+
*/
|
|
81
|
+
_d: Document;
|
|
82
|
+
/**
|
|
83
|
+
* @description Window object
|
|
84
|
+
* @type {Window}
|
|
85
|
+
*/
|
|
86
|
+
_w: Window;
|
|
87
|
+
/**
|
|
88
|
+
* @description Controllers carrier
|
|
89
|
+
* @type {HTMLElement}
|
|
90
|
+
*/
|
|
91
|
+
carrierWrapper: HTMLElement;
|
|
92
|
+
/**
|
|
93
|
+
* @description Editor options
|
|
94
|
+
* @type {Map<string, *>}
|
|
95
|
+
*/
|
|
96
|
+
options: Map<string, any>;
|
|
97
|
+
/**
|
|
98
|
+
* @description Plugins
|
|
99
|
+
* @type {Object<string, *>}
|
|
100
|
+
*/
|
|
101
|
+
plugins: {
|
|
102
|
+
[x: string]: any;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* @description Events object, call by triggerEvent function
|
|
106
|
+
* @type {Object<string, *>}
|
|
107
|
+
*/
|
|
108
|
+
events: {
|
|
109
|
+
[x: string]: any;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* @description Call the event function by injecting self: this.
|
|
113
|
+
* @type {(eventName: string, ...args: *) => Promise<*>}
|
|
114
|
+
*/
|
|
115
|
+
triggerEvent: (eventName: string, ...args: any) => Promise<any>;
|
|
116
|
+
/**
|
|
117
|
+
* @description Default icons object
|
|
118
|
+
* @type {Object<string, string>}
|
|
119
|
+
*/
|
|
120
|
+
icons: {
|
|
121
|
+
[x: string]: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* @description loaded language
|
|
125
|
+
* @type {Object<string, *>}
|
|
126
|
+
*/
|
|
127
|
+
lang: {
|
|
128
|
+
[x: string]: any;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* @description Variables used internally in editor operation
|
|
132
|
+
* @type {__se__EditorStatus}
|
|
133
|
+
*/
|
|
134
|
+
status: __se__EditorStatus;
|
|
135
|
+
/**
|
|
136
|
+
* @description Is classic mode?
|
|
137
|
+
* @type {boolean}
|
|
138
|
+
*/
|
|
139
|
+
isClassic: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* @description Is inline mode?
|
|
142
|
+
* @type {boolean}
|
|
143
|
+
*/
|
|
144
|
+
isInline: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* @description Is balloon|balloon-always mode?
|
|
147
|
+
* @type {boolean}
|
|
148
|
+
*/
|
|
149
|
+
isBalloon: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* @description Is balloon-always mode?
|
|
152
|
+
* @type {boolean}
|
|
153
|
+
*/
|
|
154
|
+
isBalloonAlways: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* @description Is subToolbar balloon|balloon-always mode?
|
|
157
|
+
* @type {boolean}
|
|
158
|
+
*/
|
|
159
|
+
isSubBalloon: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* @description Is subToolbar balloon-always mode?
|
|
162
|
+
* @type {boolean}
|
|
163
|
+
*/
|
|
164
|
+
isSubBalloonAlways: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* @description All command buttons map
|
|
167
|
+
* @type {Map<string, HTMLElement>}
|
|
168
|
+
*/
|
|
169
|
+
allCommandButtons: Map<string, HTMLElement>;
|
|
170
|
+
/**
|
|
171
|
+
* @description All command buttons map
|
|
172
|
+
* @type {Map<string, HTMLElement>}
|
|
173
|
+
*/
|
|
174
|
+
subAllCommandButtons: Map<string, HTMLElement>;
|
|
175
|
+
/**
|
|
176
|
+
* @description Shoutcuts key map
|
|
177
|
+
* @type {Map<string, *>}
|
|
178
|
+
*/
|
|
179
|
+
shortcutsKeyMap: Map<string, any>;
|
|
180
|
+
/**
|
|
181
|
+
* @description Shoutcuts reverse key array
|
|
182
|
+
* - An array of key codes generated with the reverseButtons option, used to reverse the action for a specific key combination.
|
|
183
|
+
* @type {Array<string>}
|
|
184
|
+
*/
|
|
185
|
+
reverseKeys: Array<string>;
|
|
186
|
+
/**
|
|
187
|
+
* @description A map with the plugin's buttons having an "active" method and the default command buttons with an "active" action.
|
|
188
|
+
* - Each button is contained in an array.
|
|
189
|
+
* @type {Map<string, Array<HTMLButtonElement>>}
|
|
190
|
+
*/
|
|
191
|
+
commandTargets: Map<string, Array<HTMLButtonElement>>;
|
|
192
|
+
/**
|
|
193
|
+
* @description Plugins array with "active" method.
|
|
194
|
+
* - "activeCommands" runs the "add" method when creating the editor.
|
|
195
|
+
* @type {Array<string>}
|
|
196
|
+
*/
|
|
197
|
+
activeCommands: Array<string>;
|
|
198
|
+
/**
|
|
199
|
+
* @description The selection node (selection.getNode()) to which the effect was last applied
|
|
200
|
+
* @type {Node|null}
|
|
201
|
+
*/
|
|
202
|
+
effectNode: Node | null;
|
|
203
|
+
/**
|
|
204
|
+
* @description Currently open "Modal" instance
|
|
205
|
+
* @type {*}
|
|
206
|
+
*/
|
|
207
|
+
opendModal: any;
|
|
208
|
+
/**
|
|
209
|
+
* @description Currently open "Controller" info array
|
|
210
|
+
* @type {Array<ControllerInfo_editor>}
|
|
211
|
+
*/
|
|
212
|
+
opendControllers: Array<ControllerInfo_editor>;
|
|
213
|
+
/**
|
|
214
|
+
* @description Currently open "Controller" caller plugin name
|
|
215
|
+
*/
|
|
216
|
+
currentControllerName: string;
|
|
217
|
+
/**
|
|
218
|
+
* @description Currently open "Browser" instance
|
|
219
|
+
* @type {*}
|
|
220
|
+
*/
|
|
221
|
+
opendBrowser: any;
|
|
222
|
+
/**
|
|
223
|
+
* @description Whether "SelectMenu" is open
|
|
224
|
+
* @type {boolean}
|
|
225
|
+
*/
|
|
226
|
+
selectMenuOn: boolean;
|
|
227
|
+
/** @description History class instance @type {ReturnType<typeof import('./base/history').default>} */
|
|
228
|
+
history: ReturnType<typeof import('./base/history').default>;
|
|
229
|
+
/** @description EventManager class instance @type {import('./base/eventManager').default} */
|
|
230
|
+
eventManager: import('./base/eventManager').default;
|
|
231
|
+
/** @description Toolbar class instance @type {import('./class/toolbar').default} */
|
|
232
|
+
toolbar: import('./class/toolbar').default;
|
|
233
|
+
/** @description Sub-Toolbar class instance @type {import('./class/toolbar').default|null} */
|
|
234
|
+
subToolbar: import('./class/toolbar').default | null;
|
|
235
|
+
/** @description Char class instance @type {import('./class/char').default} */
|
|
236
|
+
char: import('./class/char').default;
|
|
237
|
+
/** @description Component class instance @type {import('./class/component').default} */
|
|
238
|
+
component: import('./class/component').default;
|
|
239
|
+
/** @description Format class instance @type {import('./class/format').default} */
|
|
240
|
+
format: import('./class/format').default;
|
|
241
|
+
/** @description HTML class instance @type {import('./class/html').default} */
|
|
242
|
+
html: import('./class/html').default;
|
|
243
|
+
/** @description Menu class instance @type {import('./class/menu').default} */
|
|
244
|
+
menu: import('./class/menu').default;
|
|
245
|
+
/** @description NodeTransform class instance @type {import('./class/nodeTransform').default} */
|
|
246
|
+
nodeTransform: import('./class/nodeTransform').default;
|
|
247
|
+
/** @description Offset class instance @type {import('./class/offset').default} */
|
|
248
|
+
offset: import('./class/offset').default;
|
|
249
|
+
/** @description Selection class instance @type {import('./class/selection').default} */
|
|
250
|
+
selection: import('./class/selection').default;
|
|
251
|
+
/** @description Shortcuts class instance @type {import('./class/shortcuts').default} */
|
|
252
|
+
shortcuts: import('./class/shortcuts').default;
|
|
253
|
+
/** @description UI class instance @type {import('./class/ui').default} */
|
|
254
|
+
ui: import('./class/ui').default;
|
|
255
|
+
/** @description Viewer class instance @type {import('./class/viewer').default} */
|
|
256
|
+
viewer: import('./class/viewer').default;
|
|
257
|
+
/**
|
|
258
|
+
* @description Line breaker (top)
|
|
259
|
+
* @type {HTMLElement}
|
|
260
|
+
*/
|
|
261
|
+
_lineBreaker_t: HTMLElement;
|
|
262
|
+
/**
|
|
263
|
+
* @description Line breaker (bottom)
|
|
264
|
+
* @type {HTMLElement}
|
|
265
|
+
*/
|
|
266
|
+
_lineBreaker_b: HTMLElement;
|
|
267
|
+
/**
|
|
268
|
+
* @description Closest ShadowRoot to editor if found
|
|
269
|
+
* @type {ShadowRoot}
|
|
270
|
+
*/
|
|
271
|
+
_shadowRoot: ShadowRoot;
|
|
272
|
+
/**
|
|
273
|
+
* @description Plugin call event map
|
|
274
|
+
* @type {Map<string, Array<((...args: *) => *) & { index: number }>>}
|
|
275
|
+
*/
|
|
276
|
+
_onPluginEvents: Map<
|
|
277
|
+
string,
|
|
278
|
+
Array<
|
|
279
|
+
((...args: any) => any) & {
|
|
280
|
+
index: number;
|
|
281
|
+
}
|
|
282
|
+
>
|
|
283
|
+
>;
|
|
284
|
+
/**
|
|
285
|
+
* @description Copy format info
|
|
286
|
+
* - eventManager.__cacheStyleNodes copied
|
|
287
|
+
* @type {Array<Node>|null}
|
|
288
|
+
*/
|
|
289
|
+
_onCopyFormatInfo: Array<Node> | null;
|
|
290
|
+
/**
|
|
291
|
+
* @description Copy format init method
|
|
292
|
+
* @type {(...args: *) => *|null}
|
|
293
|
+
*/
|
|
294
|
+
_onCopyFormatInitMethod: (...args: any) => any | null;
|
|
295
|
+
/**
|
|
296
|
+
* @description Controller target's frame div (editor.frameContext.get('topArea'))
|
|
297
|
+
* @type {HTMLElement|null}
|
|
298
|
+
*/
|
|
299
|
+
_controllerTargetContext: HTMLElement | null;
|
|
300
|
+
/**
|
|
301
|
+
* @description List of buttons that are disabled when "controller" is opened
|
|
302
|
+
* @type {Array<HTMLButtonElement|HTMLInputElement>}
|
|
303
|
+
*/
|
|
304
|
+
_controllerOnDisabledButtons: Array<HTMLButtonElement | HTMLInputElement>;
|
|
305
|
+
/**
|
|
306
|
+
* @description List of buttons that are disabled when "codeView" mode opened
|
|
307
|
+
* @type {Array<HTMLButtonElement|HTMLInputElement>}
|
|
308
|
+
*/
|
|
309
|
+
_codeViewDisabledButtons: Array<HTMLButtonElement | HTMLInputElement>;
|
|
310
|
+
/**
|
|
311
|
+
* @description List of buttons to run plugins in the toolbar
|
|
312
|
+
* @type {Array<HTMLElement>}
|
|
313
|
+
*/
|
|
314
|
+
_pluginCallButtons: Array<HTMLElement>;
|
|
315
|
+
/**
|
|
316
|
+
* @description List of buttons to run plugins in the Sub-Toolbar
|
|
317
|
+
* @type {Array<HTMLElement>}
|
|
318
|
+
*/
|
|
319
|
+
_pluginCallButtons_sub: Array<HTMLElement>;
|
|
320
|
+
/**
|
|
321
|
+
* @description Responsive Toolbar Button Structure array
|
|
322
|
+
* @type {Array<*>}
|
|
323
|
+
*/
|
|
324
|
+
_responsiveButtons: Array<any>;
|
|
325
|
+
/**
|
|
326
|
+
* @description Responsive Sub-Toolbar Button Structure array
|
|
327
|
+
* @type {Array<*>}
|
|
328
|
+
*/
|
|
329
|
+
_responsiveButtons_sub: Array<any>;
|
|
330
|
+
/**
|
|
331
|
+
* @description Variable that controls the "blur" event in the editor of inline or balloon mode when the focus is moved to dropdown
|
|
332
|
+
* @type {boolean}
|
|
333
|
+
*/
|
|
334
|
+
_notHideToolbar: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* @description Variables for controlling focus and blur events
|
|
337
|
+
* @type {boolean}
|
|
338
|
+
*/
|
|
339
|
+
_preventBlur: boolean;
|
|
340
|
+
/**
|
|
341
|
+
* @description Variables for controlling selection change events
|
|
342
|
+
*/
|
|
343
|
+
_preventSelection: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* @description If true, initialize all indexes of image, video information
|
|
346
|
+
* @type {boolean}
|
|
347
|
+
*/
|
|
348
|
+
_componentsInfoInit: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* @description If true, reset all indexes of image, video information
|
|
351
|
+
* @type {boolean}
|
|
352
|
+
*/
|
|
353
|
+
_componentsInfoReset: boolean;
|
|
354
|
+
/**
|
|
355
|
+
* @description plugin retainFormat info Map()
|
|
356
|
+
* @type {Map<string, ((...args: *) => *)>}
|
|
357
|
+
*/
|
|
358
|
+
_MELInfo: Map<string, (...args: any) => any>;
|
|
359
|
+
/**
|
|
360
|
+
* @description Properties for managing files in the "FileManager" module
|
|
361
|
+
* @type {Array<*>}
|
|
362
|
+
*/
|
|
363
|
+
_fileInfoPluginsCheck: Array<any>;
|
|
364
|
+
/**
|
|
365
|
+
* @description Properties for managing files in the "FileManager" module
|
|
366
|
+
* @type {Array<*>}
|
|
367
|
+
*/
|
|
368
|
+
_fileInfoPluginsReset: Array<any>;
|
|
369
|
+
/**
|
|
370
|
+
* @description Variables for file component management
|
|
371
|
+
* @type {Object<string, *>}
|
|
372
|
+
*/
|
|
373
|
+
_fileManager: {
|
|
374
|
+
[x: string]: any;
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* @description Variables for managing the components
|
|
378
|
+
* @type {Array<*>}
|
|
379
|
+
*/
|
|
380
|
+
_componentManager: Array<any>;
|
|
381
|
+
/**
|
|
382
|
+
* @description Current Figure container.
|
|
383
|
+
* @type {HTMLElement|null}
|
|
384
|
+
*/
|
|
385
|
+
_figureContainer: HTMLElement | null;
|
|
386
|
+
/**
|
|
387
|
+
* @description Origin options
|
|
388
|
+
* @type {EditorInitOptions_editor}
|
|
389
|
+
*/
|
|
390
|
+
_originOptions: EditorInitOptions_editor;
|
|
391
|
+
/**
|
|
392
|
+
* @description If the plugin is not added, add the plugin and call the 'add' function.
|
|
393
|
+
* - If the plugin is added call callBack function.
|
|
394
|
+
* @param {string} pluginName The name of the plugin to call
|
|
395
|
+
* @param {?Array<HTMLElement>} targets Plugin target button (This is not necessary if you have a button list when creating the editor)
|
|
396
|
+
* @param {?Object<string, *>} pluginOptions Plugin's options
|
|
397
|
+
*/
|
|
398
|
+
registerPlugin(
|
|
399
|
+
pluginName: string,
|
|
400
|
+
targets: Array<HTMLElement> | null,
|
|
401
|
+
pluginOptions: {
|
|
402
|
+
[x: string]: any;
|
|
403
|
+
} | null
|
|
404
|
+
): void;
|
|
405
|
+
/**
|
|
406
|
+
* @description Run plugin calls and basic commands.
|
|
407
|
+
* @param {string} command Command string
|
|
408
|
+
* @param {string} type Display type string ('command', 'dropdown', 'modal', 'container')
|
|
409
|
+
* @param {?Node=} button The element of command button
|
|
410
|
+
*/
|
|
411
|
+
run(command: string, type: string, button?: (Node | null) | undefined): void;
|
|
412
|
+
/**
|
|
413
|
+
* @description Execute default command of command button
|
|
414
|
+
* - (selectAll, codeView, fullScreen, indent, outdent, undo, redo, removeFormat, print, preview, showBlocks, save, bold, underline, italic, strike, subscript, superscript, copy, cut, paste)
|
|
415
|
+
* @param {string} command Property of command button (data-value)
|
|
416
|
+
* @param {?Node=} button Command button
|
|
417
|
+
* @returns {Promise<void>}
|
|
418
|
+
*/
|
|
419
|
+
commandHandler(command: string, button?: (Node | null) | undefined): Promise<void>;
|
|
420
|
+
/**
|
|
421
|
+
* @description Execute "editor.run" with command button.
|
|
422
|
+
* @param {Node} target Command target
|
|
423
|
+
*/
|
|
424
|
+
runFromTarget(target: Node): void;
|
|
425
|
+
/**
|
|
426
|
+
* @description It is executed by inserting the button of commandTargets as the argument value of the "f" function.
|
|
427
|
+
* - "func" is called as long as the button array's length.
|
|
428
|
+
* @param {string} cmd data-command
|
|
429
|
+
* @param {(...args: *) => *} func Function.
|
|
430
|
+
*/
|
|
431
|
+
applyCommandTargets(cmd: string, func: (...args: any) => any): void;
|
|
432
|
+
/**
|
|
433
|
+
* @description Execute a function by traversing all root targets.
|
|
434
|
+
* @param {(...args: *) => *} f Function
|
|
435
|
+
*/
|
|
436
|
+
applyFrameRoots(f: (...args: any) => any): void;
|
|
437
|
+
/**
|
|
438
|
+
* @description Checks if the content of the editor is empty.
|
|
439
|
+
* - Display criteria for "placeholder".
|
|
440
|
+
* @param {?__se__FrameContext=} fc Frame context, if not present, currently selected frame context.
|
|
441
|
+
* @returns {boolean}
|
|
442
|
+
*/
|
|
443
|
+
isEmpty(fc?: (__se__FrameContext | null) | undefined): boolean;
|
|
444
|
+
/**
|
|
445
|
+
* @description Set direction to "rtl" or "ltr".
|
|
446
|
+
* @param {string} dir "rtl" or "ltr"
|
|
447
|
+
*/
|
|
448
|
+
setDir(dir: string): void;
|
|
449
|
+
/**
|
|
450
|
+
* @description Add or reset option property (Editor is reloaded)
|
|
451
|
+
* @param {EditorInitOptions_editor} newOptions Options
|
|
452
|
+
*/
|
|
453
|
+
resetOptions(newOptions: EditorInitOptions_editor): void;
|
|
454
|
+
/**
|
|
455
|
+
* @description Change the current root index.
|
|
456
|
+
* @param {*} rootKey
|
|
457
|
+
*/
|
|
458
|
+
changeFrameContext(rootKey: any): void;
|
|
459
|
+
/**
|
|
460
|
+
* @description javascript execCommand
|
|
461
|
+
* @param {string} command javascript execCommand function property
|
|
462
|
+
* @param {boolean=} showDefaultUI javascript execCommand function property
|
|
463
|
+
* @param {string=} value javascript execCommand function property
|
|
464
|
+
*/
|
|
465
|
+
execCommand(command: string, showDefaultUI?: boolean | undefined, value?: string | undefined): void;
|
|
466
|
+
/**
|
|
467
|
+
* @description Focus to wysiwyg area
|
|
468
|
+
* @param {*} rootKey Root index
|
|
469
|
+
*/
|
|
470
|
+
focus(rootKey: any): void;
|
|
471
|
+
/**
|
|
472
|
+
* @description If "focusEl" is a component, then that component is selected; if it is a format element, the last text is selected
|
|
473
|
+
* - If "focusEdge" is null, then selected last element
|
|
474
|
+
* @param {?Node=} focusEl Focus element
|
|
475
|
+
*/
|
|
476
|
+
focusEdge(focusEl?: (Node | null) | undefined): void;
|
|
477
|
+
/**
|
|
478
|
+
* @description Focusout to wysiwyg area (.blur())
|
|
479
|
+
*/
|
|
480
|
+
blur(): void;
|
|
481
|
+
/**
|
|
482
|
+
* @description Destroy the suneditor
|
|
483
|
+
*/
|
|
484
|
+
destroy(): any;
|
|
485
|
+
/** ----- private methods ----------------------------------------------------------------------------------------------------------------------------- */
|
|
486
|
+
/**
|
|
487
|
+
* @private
|
|
488
|
+
* @description Set frameContext, frameOptions
|
|
489
|
+
* @param {__se__FrameContext} rt Root target[key] FrameContext
|
|
490
|
+
*/
|
|
491
|
+
_setFrameInfo(rt: __se__FrameContext): void;
|
|
492
|
+
/**
|
|
493
|
+
* @private
|
|
494
|
+
* @description Focus to wysiwyg area using "native focus function"
|
|
495
|
+
*/
|
|
496
|
+
_nativeFocus(): void;
|
|
497
|
+
/**
|
|
498
|
+
* @private
|
|
499
|
+
* @description Check the components such as image and video and modify them according to the format.
|
|
500
|
+
* @param {boolean} loaded If true, the component is loaded.
|
|
501
|
+
*/
|
|
502
|
+
_checkComponents(loaded: boolean): void;
|
|
503
|
+
/**
|
|
504
|
+
* @private
|
|
505
|
+
* @description Initialize the information of the components.
|
|
506
|
+
*/
|
|
507
|
+
_resetComponents(): void;
|
|
508
|
+
/**
|
|
509
|
+
* @private
|
|
510
|
+
* @description Initializ wysiwyg area (Only called from core._init)
|
|
511
|
+
* @param {__se__FrameContext} e frameContext
|
|
512
|
+
* @param {string} value initial html string
|
|
513
|
+
*/
|
|
514
|
+
_initWysiwygArea(e: __se__FrameContext, value: string): void;
|
|
515
|
+
/**
|
|
516
|
+
* @private
|
|
517
|
+
* @description Called when there are changes to tags in the wysiwyg region.
|
|
518
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
519
|
+
*/
|
|
520
|
+
_resourcesStateChange(fc: __se__FrameContext): void;
|
|
521
|
+
/**
|
|
522
|
+
* @private
|
|
523
|
+
* @description Modify the height value of the iframe when the height of the iframe is automatic.
|
|
524
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
525
|
+
*/
|
|
526
|
+
_iframeAutoHeight(fc: __se__FrameContext): void;
|
|
527
|
+
/**
|
|
528
|
+
* @private
|
|
529
|
+
* @description Call the "onResizeEditor" event
|
|
530
|
+
* @param {__se__FrameContext} fc - Frame context object
|
|
531
|
+
* @param {number} h - Height value
|
|
532
|
+
* @param {ResizeObserverEntry} resizeObserverEntry - ResizeObserverEntry object
|
|
533
|
+
*/
|
|
534
|
+
__callResizeFunction(fc: __se__FrameContext, h: number, resizeObserverEntry: ResizeObserverEntry): void;
|
|
535
|
+
/**
|
|
536
|
+
* @private
|
|
537
|
+
* @description Set display property when there is placeholder.
|
|
538
|
+
* @param {?__se__FrameContext=} fc - Frame context object, If null fc is this.frameContext
|
|
539
|
+
*/
|
|
540
|
+
_checkPlaceholder(fc?: (__se__FrameContext | null) | undefined): void;
|
|
541
|
+
/**
|
|
542
|
+
* @private
|
|
543
|
+
* @description Initializ editor
|
|
544
|
+
* @param {EditorInitOptions_editor} options Options
|
|
545
|
+
*/
|
|
546
|
+
__editorInit(options: EditorInitOptions_editor): void;
|
|
547
|
+
/**
|
|
548
|
+
* @private
|
|
549
|
+
* @description Initializ core variable
|
|
550
|
+
* @param {EditorInitOptions_editor} options Options
|
|
551
|
+
*/
|
|
552
|
+
__init(options: EditorInitOptions_editor): void;
|
|
553
|
+
/**
|
|
554
|
+
* @private
|
|
555
|
+
* @description Caching basic buttons to use
|
|
556
|
+
*/
|
|
557
|
+
__cachingButtons(): void;
|
|
558
|
+
/**
|
|
559
|
+
* @private
|
|
560
|
+
* @description Set the disabled button list
|
|
561
|
+
* - this._codeViewDisabledButtons, this._controllerOnDisabledButtons
|
|
562
|
+
*/
|
|
563
|
+
__setDisabledButtons(): void;
|
|
564
|
+
/**
|
|
565
|
+
* @private
|
|
566
|
+
* @description Save the current buttons
|
|
567
|
+
* @param {Map<string, Element>} cmdButtons Command button map
|
|
568
|
+
* @param {Element} tray Button tray
|
|
569
|
+
*/
|
|
570
|
+
__saveCommandButtons(cmdButtons: Map<string, Element>, tray: Element): void;
|
|
571
|
+
/**
|
|
572
|
+
* @private
|
|
573
|
+
* @description Caches shortcut keys for commands.
|
|
574
|
+
*/
|
|
575
|
+
__cachingShortcuts(): void;
|
|
576
|
+
/**
|
|
577
|
+
* @private
|
|
578
|
+
* @description Sets command target elements.
|
|
579
|
+
* @param {string} cmd - The command identifier.
|
|
580
|
+
* @param {HTMLButtonElement} target - The associated command button.
|
|
581
|
+
*/
|
|
582
|
+
__setCommandTargets(cmd: string, target: HTMLButtonElement): void;
|
|
583
|
+
/**
|
|
584
|
+
* @private
|
|
585
|
+
* @description Configures the document properties of an iframe editor.
|
|
586
|
+
* @param {HTMLIFrameElement} frame - The editor iframe.
|
|
587
|
+
* @param {Map<string, *>} originOptions - The original options.
|
|
588
|
+
* @param {__se__FrameOptions} targetOptions - The new options.
|
|
589
|
+
*/
|
|
590
|
+
__setIframeDocument(frame: HTMLIFrameElement, originOptions: Map<string, any>, targetOptions: __se__FrameOptions): void;
|
|
591
|
+
/**
|
|
592
|
+
* @private
|
|
593
|
+
* @description Set the FrameContext parameters and options
|
|
594
|
+
* @param {__se__FrameContext} e - Frame context object
|
|
595
|
+
*/
|
|
596
|
+
__setEditorParams(e: __se__FrameContext): void;
|
|
597
|
+
/**
|
|
598
|
+
* @private
|
|
599
|
+
* @description Registers and initializes editor classes.
|
|
600
|
+
*/
|
|
601
|
+
__registerClass(): void;
|
|
602
|
+
/**
|
|
603
|
+
* @private
|
|
604
|
+
* @description Creates the editor instance and initializes components.
|
|
605
|
+
* @param {EditorInitOptions_editor} originOptions - The initial editor options.
|
|
606
|
+
* @returns {Promise<void>}
|
|
607
|
+
*/
|
|
608
|
+
__Create(originOptions: EditorInitOptions_editor): Promise<void>;
|
|
609
|
+
Constructor: typeof Editor;
|
|
610
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Selects all content in the editor.
|
|
3
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
4
|
+
*/
|
|
5
|
+
export function SELECT_ALL(editor: __se__EditorCore): void;
|
|
6
|
+
/**
|
|
7
|
+
* @description Toggles direction button active state.
|
|
8
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
9
|
+
* @param {boolean} rtl - Whether the text direction is right-to-left.
|
|
10
|
+
*/
|
|
11
|
+
export function DIR_BTN_ACTIVE(editor: __se__EditorCore, rtl: boolean): void;
|
|
12
|
+
/**
|
|
13
|
+
* @description Saves the editor content.
|
|
14
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
15
|
+
* @returns {Promise<void>}
|
|
16
|
+
*/
|
|
17
|
+
export function SAVE(editor: __se__EditorCore): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* @description Copies formatting from selected text.
|
|
20
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
21
|
+
* @param {Node} button - The button triggering the copy format function.
|
|
22
|
+
*/
|
|
23
|
+
export function COPY_FORMAT(editor: __se__EditorCore, button: Node): void;
|
|
24
|
+
/**
|
|
25
|
+
* @description Applies font styling to selected text.
|
|
26
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
27
|
+
* @param {string} command - The font style command (e.g., bold, italic, underline).
|
|
28
|
+
*/
|
|
29
|
+
export function FONT_STYLE(editor: __se__EditorCore, command: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* @description Inserts a page break element into the editor.
|
|
32
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
33
|
+
*/
|
|
34
|
+
export function PAGE_BREAK(editor: __se__EditorCore): void;
|
|
35
|
+
/**
|
|
36
|
+
* @description List of commands that trigger active event handling in the editor.
|
|
37
|
+
* - These commands typically apply inline formatting or structural changes.
|
|
38
|
+
* @constant {string[]}
|
|
39
|
+
*/
|
|
40
|
+
export const ACTIVE_EVENT_COMMANDS: string[];
|
|
41
|
+
/**
|
|
42
|
+
* @description List of basic editor commands, including active event commands and additional actions
|
|
43
|
+
* - such as undo, redo, saving, full-screen toggle, and text direction commands.
|
|
44
|
+
* @constant {string[]}
|
|
45
|
+
*/
|
|
46
|
+
export const BASIC_COMMANDS: string[];
|