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,222 @@
|
|
|
1
|
+
import EditorInjector from '../../editorInjector';
|
|
2
|
+
import { Controller } from '../../modules';
|
|
3
|
+
import { dom, env } from '../../helper';
|
|
4
|
+
|
|
5
|
+
const { _w } = env;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class
|
|
9
|
+
* @description Anchor plugin
|
|
10
|
+
* - Allows you to create, edit, and delete elements that act as anchors (bookmarks) within a document.
|
|
11
|
+
*/
|
|
12
|
+
class Anchor extends EditorInjector {
|
|
13
|
+
static key = 'anchor';
|
|
14
|
+
static type = 'popup';
|
|
15
|
+
static className = '';
|
|
16
|
+
/**
|
|
17
|
+
* @this {Anchor}
|
|
18
|
+
* @param {HTMLElement} node - The node to check.
|
|
19
|
+
* @returns {HTMLElement|null} Returns a node if the node is a valid component.
|
|
20
|
+
*/
|
|
21
|
+
static component(node) {
|
|
22
|
+
return dom.check.isAnchor(node) && node.hasAttribute('id') && node.hasAttribute('data-se-anchor') ? node : null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @constructor
|
|
27
|
+
* @param {__se__EditorCore} editor - The root editor instance
|
|
28
|
+
*/
|
|
29
|
+
constructor(editor) {
|
|
30
|
+
super(editor);
|
|
31
|
+
// plugin basic properties
|
|
32
|
+
this.title = this.lang.anchor;
|
|
33
|
+
this.icon = 'bookmark_anchor';
|
|
34
|
+
|
|
35
|
+
// members
|
|
36
|
+
const parser = new DOMParser();
|
|
37
|
+
const svgDoc = parser.parseFromString(this.icons.bookmark_anchor, 'image/svg+xml');
|
|
38
|
+
this.bookmarkIcon = svgDoc.documentElement;
|
|
39
|
+
this._element = null;
|
|
40
|
+
this._range = null;
|
|
41
|
+
|
|
42
|
+
// controller
|
|
43
|
+
const controllerSelectEl = CreateHTML_controller_select(this);
|
|
44
|
+
this.displayId = controllerSelectEl.querySelector('.se-controller-display');
|
|
45
|
+
this.controllerSelect = new Controller(this, controllerSelectEl, { position: 'bottom', disabled: true }, Anchor.key);
|
|
46
|
+
|
|
47
|
+
const controllerEl = CreateHTML_controller(this);
|
|
48
|
+
this.inputEl = controllerEl.querySelector('input');
|
|
49
|
+
this.controller = new Controller(this, controllerEl, { position: 'bottom', disabled: true, parents: [this.controllerSelect.form], parentsHide: true }, Anchor.key);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @editorMethod Editor.Plugin<popup>
|
|
54
|
+
* @description Displays a popup and gives focus to the input field.
|
|
55
|
+
*/
|
|
56
|
+
show() {
|
|
57
|
+
this.controller.open((this._range = this.selection.getRange()));
|
|
58
|
+
_w.setTimeout(() => {
|
|
59
|
+
this.inputEl.focus();
|
|
60
|
+
}, 0);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @editorMethod Modules.Component
|
|
65
|
+
* @description Executes the method that is called when a component of a plugin is selected.
|
|
66
|
+
* @param {HTMLElement} target Target component element
|
|
67
|
+
*/
|
|
68
|
+
select(target) {
|
|
69
|
+
this._element = target;
|
|
70
|
+
this.displayId.textContent = target.getAttribute('id');
|
|
71
|
+
this.controllerSelect.open(target);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @editorMethod Editor.Component
|
|
76
|
+
* @description Called when a container is deselected.
|
|
77
|
+
*/
|
|
78
|
+
deselect() {
|
|
79
|
+
this._init();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @editorMethod Modules.Controller
|
|
84
|
+
* @description Executes the method that is called when a button is clicked in the "controller".
|
|
85
|
+
* @param {HTMLButtonElement} target Target button element
|
|
86
|
+
*/
|
|
87
|
+
controllerAction(target) {
|
|
88
|
+
const command = target.getAttribute('data-command');
|
|
89
|
+
if (!command) return;
|
|
90
|
+
const currentElement = this._element;
|
|
91
|
+
|
|
92
|
+
switch (command) {
|
|
93
|
+
case 'submit': {
|
|
94
|
+
if (!currentElement) {
|
|
95
|
+
const id = this.inputEl.value.trim();
|
|
96
|
+
if (!id) {
|
|
97
|
+
this.inputEl.focus();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const a = dom.utils.createElement('A', {
|
|
102
|
+
id,
|
|
103
|
+
'data-se-anchor': this.inputEl.value,
|
|
104
|
+
'data-se-non-link': 'true',
|
|
105
|
+
contenteditable: 'false',
|
|
106
|
+
class: 'se-component se-inline-component'
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
this.component.insert(a, { skipCharCount: false, skipSelection: true, skipHistory: false });
|
|
110
|
+
|
|
111
|
+
const r = this.selection.getNearRange(a);
|
|
112
|
+
if (r) {
|
|
113
|
+
this.selection.setRange(r.container, r.offset, r.container, r.offset);
|
|
114
|
+
} else {
|
|
115
|
+
this.component.select(a, Anchor.key, false);
|
|
116
|
+
}
|
|
117
|
+
this._init();
|
|
118
|
+
} else {
|
|
119
|
+
this.controller.close();
|
|
120
|
+
currentElement.id = this.inputEl.value;
|
|
121
|
+
this.select(currentElement);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case 'cancel': {
|
|
127
|
+
this.controller.close(!currentElement);
|
|
128
|
+
if (this._range) {
|
|
129
|
+
this.selection.setRange(this._range);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
this._init();
|
|
133
|
+
if (currentElement) {
|
|
134
|
+
this.select(currentElement);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
case 'edit': {
|
|
140
|
+
this.inputEl.value = this.displayId.textContent;
|
|
141
|
+
this.controllerSelect.hide();
|
|
142
|
+
this.controller.open(currentElement);
|
|
143
|
+
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
case 'delete': {
|
|
147
|
+
const r = this.selection.getNearRange(currentElement);
|
|
148
|
+
|
|
149
|
+
dom.utils.removeItem(currentElement);
|
|
150
|
+
this.controllerSelect.close(true);
|
|
151
|
+
|
|
152
|
+
if (r) {
|
|
153
|
+
this.selection.setRange(r.container, r.offset, r.container, r.offset);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
this._init();
|
|
157
|
+
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @private
|
|
165
|
+
* @description Initializes state variables.
|
|
166
|
+
* - called when the popup is closed
|
|
167
|
+
*/
|
|
168
|
+
_init() {
|
|
169
|
+
this._element = null;
|
|
170
|
+
this._range = null;
|
|
171
|
+
this.inputEl.value = '';
|
|
172
|
+
this.displayId.textContent = '';
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function CreateHTML_controller({ lang, icons }) {
|
|
177
|
+
const html = /*html*/ `
|
|
178
|
+
<div class="se-arrow se-arrow-up"></div>
|
|
179
|
+
<form>
|
|
180
|
+
<div class="se-controller-display">${lang.id}</div>
|
|
181
|
+
<div class="se-btn-group se-form-group">
|
|
182
|
+
<input type="text" required />
|
|
183
|
+
<button type="submit" data-command="submit" class="se-btn se-tooltip se-btn-success">
|
|
184
|
+
${icons.checked}
|
|
185
|
+
<span class="se-tooltip-inner"><span class="se-tooltip-text">${lang.save}</span></span>
|
|
186
|
+
</button>
|
|
187
|
+
<button type="button" data-command="cancel" class="se-btn se-tooltip se-btn-danger">
|
|
188
|
+
${icons.cancel}
|
|
189
|
+
<span class="se-tooltip-inner"><span class="se-tooltip-text">${lang.cancel}</span></span>
|
|
190
|
+
</button>
|
|
191
|
+
</div>
|
|
192
|
+
</form>
|
|
193
|
+
`;
|
|
194
|
+
|
|
195
|
+
return dom.utils.createElement('DIV', { class: 'se-controller se-controller-simple-input' }, html);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function CreateHTML_controller_select({ lang, icons }) {
|
|
199
|
+
const html = /*html*/ `
|
|
200
|
+
<div class="se-arrow se-arrow-up"></div>
|
|
201
|
+
<div class="link-content">
|
|
202
|
+
<div class="se-controller-display"></div>
|
|
203
|
+
<div class="se-btn-group">
|
|
204
|
+
<button type="button" data-command="edit" tabindex="-1" class="se-btn se-tooltip">
|
|
205
|
+
${icons.edit}
|
|
206
|
+
<span class="se-tooltip-inner">
|
|
207
|
+
<span class="se-tooltip-text">${lang.edit}</span>
|
|
208
|
+
</span>
|
|
209
|
+
</button>
|
|
210
|
+
<button type="button" data-command="delete" tabindex="-1" class="se-btn se-tooltip">
|
|
211
|
+
${icons.delete}
|
|
212
|
+
<span class="se-tooltip-inner">
|
|
213
|
+
<span class="se-tooltip-text">${lang.remove}</span>
|
|
214
|
+
</span>
|
|
215
|
+
</button>
|
|
216
|
+
</div>
|
|
217
|
+
</div>`;
|
|
218
|
+
|
|
219
|
+
return dom.utils.createElement('DIV', { class: 'se-controller se-controller-link' }, html);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export default Anchor;
|
package/src/suneditor.js
CHANGED
|
@@ -6,18 +6,58 @@ import Langs from './langs';
|
|
|
6
6
|
import Modules from './modules';
|
|
7
7
|
import Helper from './helper';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const langs = Langs;
|
|
13
|
-
export const helper = Helper;
|
|
9
|
+
/**
|
|
10
|
+
* @module SunEditorExports
|
|
11
|
+
*/
|
|
14
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {import('./core/section/constructor').EditorFrameOptions} EditorFrameOptions
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Editor Injector module, Inject "editor" and basic frequently used objects by calling it with "call(this, editor)".
|
|
19
|
+
* @type {(...args: *) => *}
|
|
20
|
+
*/
|
|
21
|
+
export { EditorInjector };
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Available editor plugins
|
|
25
|
+
* @type {Object<string, *>}
|
|
26
|
+
*/
|
|
27
|
+
export { Plugins };
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Editor modules
|
|
31
|
+
* @type {{[key: string]: ((...args: *) => *)|Map}}
|
|
32
|
+
*/
|
|
33
|
+
export { Modules };
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Language packs for the editor
|
|
37
|
+
* @type {Object<string, Object<string, string> | ((...args: *) => *)>}
|
|
38
|
+
*/
|
|
39
|
+
export { Langs };
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Helper functions for the editor
|
|
43
|
+
* @type {Object<string|symbol, Object<string, ((...args: *) => *)>>}
|
|
44
|
+
*/
|
|
45
|
+
export { Helper };
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @typedef {import('./core/section/constructor').EditorInitOptions} EditorInitOptions
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* SunEditor Factory Object
|
|
53
|
+
* @namespace SunEditor
|
|
54
|
+
*/
|
|
15
55
|
export default {
|
|
16
56
|
/**
|
|
17
|
-
*
|
|
57
|
+
* Returns the create function with preset options.
|
|
18
58
|
* If the options overlap, the options of the 'create' function take precedence.
|
|
19
|
-
* @param {
|
|
20
|
-
* @returns {Object}
|
|
59
|
+
* @param {EditorInitOptions} init_options - Initialization options
|
|
60
|
+
* @returns {{create: (targets: Element|Object<string, {target: Element, options: EditorFrameOptions}>, options: EditorInitOptions) => Editor}}}
|
|
21
61
|
*/
|
|
22
62
|
init(init_options) {
|
|
23
63
|
return {
|
|
@@ -26,10 +66,12 @@ export default {
|
|
|
26
66
|
},
|
|
27
67
|
|
|
28
68
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @param {
|
|
31
|
-
* @param {
|
|
32
|
-
* @
|
|
69
|
+
* Creates a new instance of the SunEditor
|
|
70
|
+
* @param {Element|Object<string, {target: Element, options: EditorFrameOptions}>} target - Target element or multi-root object
|
|
71
|
+
* @param {EditorInitOptions} options - Initialization options
|
|
72
|
+
* @param {EditorInitOptions} [_init_options] - Optional preset initialization options
|
|
73
|
+
* @returns {Editor} - Instance of the SunEditor
|
|
74
|
+
* @throws {Error} If the target element is not provided or is invalid
|
|
33
75
|
*/
|
|
34
76
|
create(target, options, _init_options) {
|
|
35
77
|
if (typeof options !== 'object') options = {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
.sun-editor.se-theme-dark,
|
|
2
|
+
.sun-editor-editable.se-theme-dark {
|
|
3
|
+
/** --------- editable - styles --------- */
|
|
4
|
+
--se-edit-font-color: #ccc;
|
|
5
|
+
--se-edit-font-pre: #aaa;
|
|
6
|
+
--se-edit-font-quote: #888;
|
|
7
|
+
--se-edit-background-color: #1e1e1e;
|
|
8
|
+
--se-edit-background-pre: #2a2a2a;
|
|
9
|
+
--se-edit-border-light: #555;
|
|
10
|
+
--se-edit-border-dark: #444;
|
|
11
|
+
--se-edit-border-dark-n1: #555;
|
|
12
|
+
--se-edit-border-dark-n2: #666;
|
|
13
|
+
--se-edit-anchor: #77aaff;
|
|
14
|
+
--se-edit-anchor-on-back: #004cff;
|
|
15
|
+
--se-edit-anchor-on-font: #e8f7ff;
|
|
16
|
+
--se-edit-hr-color: #ccc;
|
|
17
|
+
--se-edit-hr-on-back: #2a2a2a;
|
|
18
|
+
--se-edit-active: #77aaff;
|
|
19
|
+
--se-edit-hover: #5599ff;
|
|
20
|
+
--se-edit-outline: #444;
|
|
21
|
+
|
|
22
|
+
/** --------- editor - styles --------- */
|
|
23
|
+
--se-main-out-color: #444;
|
|
24
|
+
--se-main-color: #ccc;
|
|
25
|
+
--se-main-color-lighter: #aaa;
|
|
26
|
+
--se-main-background-color: #1e1e1e;
|
|
27
|
+
--se-main-background-color2: #2a2a2a;
|
|
28
|
+
--se-main-background-color3: #333;
|
|
29
|
+
--se-main-font-color: #ccc;
|
|
30
|
+
--se-main-font-color2: #ddd;
|
|
31
|
+
--se-main-divider-color: #555;
|
|
32
|
+
--se-main-border-color: #666;
|
|
33
|
+
--se-main-outline-color: #444;
|
|
34
|
+
--se-main-shadow-color: #222;
|
|
35
|
+
--se-statusbar-font-color: #aaa;
|
|
36
|
+
--se-overlay-background-color: #111;
|
|
37
|
+
--se-active-color: #77aaff;
|
|
38
|
+
--se-active-dark-color: #5599ff;
|
|
39
|
+
--se-active-dark2-color: #407dd1;
|
|
40
|
+
--se-active-dark3-color: #77aaff;
|
|
41
|
+
--se-active-dark4-color: #5599ff;
|
|
42
|
+
--se-active-dark5-color: #004cff;
|
|
43
|
+
--se-active-light-color: #002244;
|
|
44
|
+
--se-active-light2-color: #003366;
|
|
45
|
+
--se-active-light3-color: #004488;
|
|
46
|
+
--se-active-light4-color: #0055aa;
|
|
47
|
+
--se-active-light5-color: #0066cc;
|
|
48
|
+
--se-active-light6-color: #0077ee;
|
|
49
|
+
--se-drag-over-color: #ffcc00;
|
|
50
|
+
--se-modal-border-color: #555;
|
|
51
|
+
--se-modal-anchor-color: #77aaff;
|
|
52
|
+
--se-modal-preview-color: #aaa;
|
|
53
|
+
--se-modal-input-disabled-color: #666;
|
|
54
|
+
--se-modal-input-disabled-background-color: #333;
|
|
55
|
+
--se-dropdown-font-color: #ccc;
|
|
56
|
+
--se-controller-border-color: #555;
|
|
57
|
+
--se-input-btn-border-color: #444;
|
|
58
|
+
--se-input-btn-disabled-color: #666;
|
|
59
|
+
--se-success-color: #33cc33;
|
|
60
|
+
--se-success-dark-color: #2a7a2a;
|
|
61
|
+
--se-success-dark2-color: #207a20;
|
|
62
|
+
--se-success-dark3-color: #1a661a;
|
|
63
|
+
--se-success-light-color: #00ff00;
|
|
64
|
+
--se-success-light2-color: #00cc00;
|
|
65
|
+
--se-success-light3-color: #009900;
|
|
66
|
+
--se-success-light4-color: #006600;
|
|
67
|
+
--se-success-light5-color: #003300;
|
|
68
|
+
--se-error-color: #ff6666;
|
|
69
|
+
--se-error-dark-color: #b24a48;
|
|
70
|
+
--se-error-dark2-color: #993333;
|
|
71
|
+
--se-error-dark3-color: #662222;
|
|
72
|
+
--se-error-light-color: #ff9999;
|
|
73
|
+
--se-error-light2-color: #ffcccc;
|
|
74
|
+
--se-error-light3-color: #ff3333;
|
|
75
|
+
--se-error-light4-color: #ff0000;
|
|
76
|
+
--se-error-light5-color: #cc0000;
|
|
77
|
+
--se-doc-background: #2a2a2a;
|
|
78
|
+
--se-doc-info-font-color: #ccc;
|
|
79
|
+
--se-doc-info-page-background-color: #444;
|
|
80
|
+
--se-doc-info-active-color: #77aaff;
|
|
81
|
+
--se-loading-color: #77aaff;
|
|
82
|
+
--se-show-blocks-color: #5599ff;
|
|
83
|
+
--se-show-blocks-li-color: #d539ff;
|
|
84
|
+
--se-show-blocks-pre-color: #27c022;
|
|
85
|
+
}
|
package/src/typedef.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @version 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// --------------------------------------------------------- [Node] ---------------------------------------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {Array<Node>|HTMLCollection|NodeList} __se__NodeCollection
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// --------------------------------------------------------- [Editor] ---------------------------------------------------------------------------------------------------
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {import('./core/editor').default} __se__EditorCore
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {import('./editorInjector').default} __se__EditorInjector
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @typedef {import('./editorInjector/_core').default} __se__CoreInjector
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @typedef {Object} __se__EditorStatus
|
|
25
|
+
* @property {boolean} hasFocus Boolean value of whether the editor has focus
|
|
26
|
+
* @property {number} tabSize Indent size of tab (4)
|
|
27
|
+
* @property {number} indentSize Indent size (25)px
|
|
28
|
+
* @property {number} codeIndentSize Indent size of Code view mode (2)
|
|
29
|
+
* @property {Array<string>} currentNodes An element array of the current cursor's node structure
|
|
30
|
+
* @property {Array<string>} currentNodesMap An element name array of the current cursor's node structure
|
|
31
|
+
* @property {boolean} onSelected Boolean value of whether component is selected
|
|
32
|
+
* @property {number} rootKey Current root key
|
|
33
|
+
* @property {Range} _range Current range object
|
|
34
|
+
* @property {boolean} _onMousedown Mouse down event status
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
// --------------------------------------------------------- [Event] ---------------------------------------------------------------------------------------------------
|
|
38
|
+
/**
|
|
39
|
+
* @typedef {Object} __se__EventInfo
|
|
40
|
+
* @property {*} target Target element
|
|
41
|
+
* @property {string} type Event type
|
|
42
|
+
* @property {(...args: *) => *} listener Event listener
|
|
43
|
+
* @property {boolean|AddEventListenerOptions=} useCapture Event useCapture option
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @typedef {Object} __se__GlobalEventInfo
|
|
48
|
+
* @property {string} type Event type
|
|
49
|
+
* @property {(...args: *) => *} listener Event listener
|
|
50
|
+
* @property {boolean|AddEventListenerOptions=} useCapture Use event capture
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
// --------------------------------------------------------- [Plugin Event] ---------------------------------------------------------------------------------------------------
|
|
54
|
+
/**
|
|
55
|
+
* @typedef {Object} __se__PluginMouseEventInfo
|
|
56
|
+
* @property {__se__FrameContext} frameContext Frame context
|
|
57
|
+
* @property {MouseEvent} event Event object
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {Object} __se__PluginKeyEventInfo
|
|
62
|
+
* @property {__se__FrameContext} frameContext Frame context
|
|
63
|
+
* @property {KeyboardEvent} event Event object
|
|
64
|
+
* @property {Range} range range object
|
|
65
|
+
* @property {HTMLElement} line Current line element
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @typedef {Object} __se__PluginToolbarInputChangeEventInfo
|
|
70
|
+
* @property {HTMLElement} target Input element
|
|
71
|
+
* @property {Event} event Event object
|
|
72
|
+
* @property {string} value Input value
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
// --------------------------------------------------------- [Context] ---------------------------------------------------------------------------------------------------
|
|
76
|
+
/**
|
|
77
|
+
* @typedef {Map<string, *>} __se__FrameOptions
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @typedef {Map<string, *>} __se__FrameContext
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @typedef {Map<string, *>} __se__Context
|
|
86
|
+
*/
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export let redo: string;
|
|
3
|
+
export let undo: string;
|
|
4
|
+
export let bold: string;
|
|
5
|
+
export let underline: string;
|
|
6
|
+
export let italic: string;
|
|
7
|
+
export let strike: string;
|
|
8
|
+
export let subscript: string;
|
|
9
|
+
export let superscript: string;
|
|
10
|
+
export let remove_color: string;
|
|
11
|
+
export let remove_format: string;
|
|
12
|
+
export let indent: string;
|
|
13
|
+
export let outdent: string;
|
|
14
|
+
export let expansion: string;
|
|
15
|
+
export let reduction: string;
|
|
16
|
+
export let code_view: string;
|
|
17
|
+
export let preview: string;
|
|
18
|
+
export let print: string;
|
|
19
|
+
export let template: string;
|
|
20
|
+
export let layout: string;
|
|
21
|
+
export let new_document: string;
|
|
22
|
+
export let select_all: string;
|
|
23
|
+
export let line_height: string;
|
|
24
|
+
export let paragraph_style: string;
|
|
25
|
+
export let text_style: string;
|
|
26
|
+
export let save: string;
|
|
27
|
+
export let blockquote: string;
|
|
28
|
+
export let arrow_down: string;
|
|
29
|
+
export let align_justify: string;
|
|
30
|
+
export let align_left: string;
|
|
31
|
+
export let align_right: string;
|
|
32
|
+
export let align_center: string;
|
|
33
|
+
export let align_top: string;
|
|
34
|
+
export let align_middle: string;
|
|
35
|
+
export let align_bottom: string;
|
|
36
|
+
export let format_float_none: string;
|
|
37
|
+
export let format_float_left: string;
|
|
38
|
+
export let format_float_right: string;
|
|
39
|
+
export let format_float_center: string;
|
|
40
|
+
export let font_color: string;
|
|
41
|
+
export let background_color: string;
|
|
42
|
+
export let list_bulleted: string;
|
|
43
|
+
export let list_numbered: string;
|
|
44
|
+
export let table: string;
|
|
45
|
+
export let table_header: string;
|
|
46
|
+
export let table_properties: string;
|
|
47
|
+
export let cell_properties: string;
|
|
48
|
+
export let table_column: string;
|
|
49
|
+
export let table_row: string;
|
|
50
|
+
export let color_checked: string;
|
|
51
|
+
export let color_palette: string;
|
|
52
|
+
export let border_all: string;
|
|
53
|
+
export let border_inside: string;
|
|
54
|
+
export let border_horizontal: string;
|
|
55
|
+
export let border_vertical: string;
|
|
56
|
+
export let border_outside: string;
|
|
57
|
+
export let border_left: string;
|
|
58
|
+
export let border_top: string;
|
|
59
|
+
export let border_right: string;
|
|
60
|
+
export let border_bottom: string;
|
|
61
|
+
export let border_none: string;
|
|
62
|
+
export let horizontal_line: string;
|
|
63
|
+
export let show_blocks: string;
|
|
64
|
+
export let cancel: string;
|
|
65
|
+
export let selection_remove: string;
|
|
66
|
+
export let image: string;
|
|
67
|
+
export let image_thumbnail: string;
|
|
68
|
+
export let video: string;
|
|
69
|
+
export let video_thumbnail: string;
|
|
70
|
+
export let link: string;
|
|
71
|
+
export let link_rel: string;
|
|
72
|
+
export let math: string;
|
|
73
|
+
export let unlink: string;
|
|
74
|
+
export let merge_cell: string;
|
|
75
|
+
export let split_cell: string;
|
|
76
|
+
export let caption: string;
|
|
77
|
+
export let edit: string;
|
|
78
|
+
let _delete: string;
|
|
79
|
+
export { _delete as delete };
|
|
80
|
+
export let revert: string;
|
|
81
|
+
export let auto_size: string;
|
|
82
|
+
export let resize: string;
|
|
83
|
+
export let insert_row_below: string;
|
|
84
|
+
export let insert_row_above: string;
|
|
85
|
+
export let insert_column_left: string;
|
|
86
|
+
export let insert_column_right: string;
|
|
87
|
+
export let delete_row: string;
|
|
88
|
+
export let delete_column: string;
|
|
89
|
+
export let fixed_column_width: string;
|
|
90
|
+
export let rotate_left: string;
|
|
91
|
+
export let rotate_right: string;
|
|
92
|
+
export let mirror_horizontal: string;
|
|
93
|
+
export let mirror_vertical: string;
|
|
94
|
+
export let checked: string;
|
|
95
|
+
export let line_break: string;
|
|
96
|
+
export let audio: string;
|
|
97
|
+
export let audio_thumbnail: string;
|
|
98
|
+
export let image_gallery: string;
|
|
99
|
+
export let audio_gallery: string;
|
|
100
|
+
export let video_gallery: string;
|
|
101
|
+
export let file_gallery: string;
|
|
102
|
+
export let file_browser: string;
|
|
103
|
+
export let bookmark: string;
|
|
104
|
+
export let bookmark_anchor: string;
|
|
105
|
+
export let download: string;
|
|
106
|
+
export let dir_ltr: string;
|
|
107
|
+
export let dir_rtl: string;
|
|
108
|
+
export let file_upload: string;
|
|
109
|
+
export let file_thumbnail: string;
|
|
110
|
+
export let file_plus: string;
|
|
111
|
+
export let upload_tray: string;
|
|
112
|
+
export let folder: string;
|
|
113
|
+
export let plus: string;
|
|
114
|
+
export let minus: string;
|
|
115
|
+
export let selection: string;
|
|
116
|
+
export let copy: string;
|
|
117
|
+
export let cut: string;
|
|
118
|
+
export let PDF: string;
|
|
119
|
+
export let format_paint: string;
|
|
120
|
+
export let find_replace: string;
|
|
121
|
+
export let drawing: string;
|
|
122
|
+
export let eraser: string;
|
|
123
|
+
export let search: string;
|
|
124
|
+
export let selection_search: string;
|
|
125
|
+
export let embed: string;
|
|
126
|
+
export let menu_arrow_down: string;
|
|
127
|
+
export let menu_arrow_up: string;
|
|
128
|
+
export let menu_arrow_right: string;
|
|
129
|
+
export let menu_arrow_left: string;
|
|
130
|
+
export let side_menu_hamburger: string;
|
|
131
|
+
export let side_menu_folder: string;
|
|
132
|
+
export let side_menu_folder_item: string;
|
|
133
|
+
export let side_menu_item: string;
|
|
134
|
+
export let side_menu_folder_plus: string;
|
|
135
|
+
export let alert_outline: string;
|
|
136
|
+
export let more_text: string;
|
|
137
|
+
export let more_paragraph: string;
|
|
138
|
+
export let more_plus: string;
|
|
139
|
+
export let more_horizontal: string;
|
|
140
|
+
export let more_vertical: string;
|
|
141
|
+
export let as_inline: string;
|
|
142
|
+
export let as_block: string;
|
|
143
|
+
export let page_break: string;
|
|
144
|
+
export let page_down: string;
|
|
145
|
+
export let page_up: string;
|
|
146
|
+
export let collapse_left: string;
|
|
147
|
+
export let collapse_right: string;
|
|
148
|
+
export let map: string;
|
|
149
|
+
export let magic_stick: string;
|
|
150
|
+
export let open_in_new: string;
|
|
151
|
+
}
|
|
152
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @this {EventManagerThis}
|
|
7
|
+
* @param {MouseEvent} e - Event object
|
|
8
|
+
*/
|
|
9
|
+
export function ButtonsHandler(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, e: MouseEvent): void;
|
|
10
|
+
export class ButtonsHandler {
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
* @this {EventManagerThis}
|
|
17
|
+
* @param {MouseEvent} e - Event object
|
|
18
|
+
*/
|
|
19
|
+
private constructor();
|
|
20
|
+
_inputFocus: boolean;
|
|
21
|
+
__inputPlugin: {
|
|
22
|
+
obj: any;
|
|
23
|
+
target: HTMLInputElement;
|
|
24
|
+
value: string;
|
|
25
|
+
};
|
|
26
|
+
__inputBlurEvent: __se__EventInfo;
|
|
27
|
+
__inputKeyEvent: __se__EventInfo;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
* @this {EventManagerThis}
|
|
32
|
+
* @param {MouseEvent} e - Event object
|
|
33
|
+
*/
|
|
34
|
+
export function OnClick_menuTray(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, e: MouseEvent): void;
|
|
35
|
+
/**
|
|
36
|
+
* @private
|
|
37
|
+
* @this {EventManagerThis}
|
|
38
|
+
* @param {MouseEvent} e - Event object
|
|
39
|
+
*/
|
|
40
|
+
export function OnClick_toolbar(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, e: MouseEvent): void;
|
|
41
|
+
export type EventManagerThis = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
|