suneditor 3.0.0-beta.2 → 3.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +186 -184
- package/LICENSE +21 -21
- package/README.md +157 -180
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +126 -123
- package/src/assets/design/color.css +131 -121
- package/src/assets/design/index.css +3 -3
- package/src/assets/design/size.css +37 -35
- package/src/assets/design/typography.css +37 -37
- package/src/assets/icons/defaultIcons.js +247 -232
- package/src/assets/suneditor-contents.css +779 -778
- package/src/assets/suneditor.css +43 -35
- package/src/core/base/eventHandlers/handler_toolbar.js +135 -135
- package/src/core/base/eventHandlers/handler_ww_clipboard.js +56 -56
- package/src/core/base/eventHandlers/handler_ww_dragDrop.js +115 -113
- package/src/core/base/eventHandlers/handler_ww_key_input.js +1200 -1200
- package/src/core/base/eventHandlers/handler_ww_mouse.js +194 -194
- package/src/core/base/eventManager.js +1550 -1484
- package/src/core/base/history.js +355 -355
- package/src/core/class/char.js +163 -162
- package/src/core/class/component.js +856 -842
- package/src/core/class/format.js +3433 -3422
- package/src/core/class/html.js +1927 -1890
- package/src/core/class/menu.js +357 -346
- package/src/core/class/nodeTransform.js +424 -424
- package/src/core/class/offset.js +858 -891
- package/src/core/class/selection.js +710 -620
- package/src/core/class/shortcuts.js +98 -98
- package/src/core/class/toolbar.js +438 -430
- package/src/core/class/ui.js +424 -422
- package/src/core/class/viewer.js +750 -750
- package/src/core/editor.js +1810 -1708
- package/src/core/section/actives.js +268 -241
- package/src/core/section/constructor.js +1348 -1661
- package/src/core/section/context.js +102 -102
- package/src/core/section/documentType.js +582 -561
- package/src/core/section/options.js +367 -0
- package/src/core/util/instanceCheck.js +59 -0
- package/src/editorInjector/_classes.js +36 -36
- package/src/editorInjector/_core.js +92 -92
- package/src/editorInjector/index.js +75 -75
- package/src/events.js +634 -622
- package/src/helper/clipboard.js +59 -59
- package/src/helper/converter.js +586 -564
- package/src/helper/dom/domCheck.js +304 -304
- package/src/helper/dom/domQuery.js +677 -669
- package/src/helper/dom/domUtils.js +618 -557
- package/src/helper/dom/index.js +12 -12
- package/src/helper/env.js +249 -240
- package/src/helper/index.js +25 -25
- package/src/helper/keyCodeMap.js +183 -183
- package/src/helper/numbers.js +72 -72
- package/src/helper/unicode.js +47 -47
- package/src/langs/ckb.js +231 -231
- package/src/langs/cs.js +231 -231
- package/src/langs/da.js +231 -231
- package/src/langs/de.js +231 -231
- package/src/langs/en.js +230 -230
- package/src/langs/es.js +231 -231
- package/src/langs/fa.js +231 -231
- package/src/langs/fr.js +231 -231
- package/src/langs/he.js +231 -231
- package/src/langs/hu.js +230 -230
- package/src/langs/index.js +28 -28
- package/src/langs/it.js +231 -231
- package/src/langs/ja.js +230 -230
- package/src/langs/km.js +230 -230
- package/src/langs/ko.js +230 -230
- package/src/langs/lv.js +231 -231
- package/src/langs/nl.js +231 -231
- package/src/langs/pl.js +231 -231
- package/src/langs/pt_br.js +231 -231
- package/src/langs/ro.js +231 -231
- package/src/langs/ru.js +231 -231
- package/src/langs/se.js +231 -231
- package/src/langs/tr.js +231 -231
- package/src/langs/uk.js +231 -231
- package/src/langs/ur.js +231 -231
- package/src/langs/zh_cn.js +231 -231
- package/src/modules/ApiManager.js +191 -191
- package/src/modules/Browser.js +669 -667
- package/src/modules/ColorPicker.js +364 -362
- package/src/modules/Controller.js +474 -454
- package/src/modules/Figure.js +1620 -1617
- package/src/modules/FileManager.js +359 -359
- package/src/modules/HueSlider.js +577 -565
- package/src/modules/Modal.js +346 -346
- package/src/modules/ModalAnchorEditor.js +643 -643
- package/src/modules/SelectMenu.js +549 -549
- package/src/modules/_DragHandle.js +17 -17
- package/src/modules/index.js +14 -14
- package/src/plugins/browser/audioGallery.js +83 -83
- package/src/plugins/browser/fileBrowser.js +103 -103
- package/src/plugins/browser/fileGallery.js +83 -83
- package/src/plugins/browser/imageGallery.js +81 -81
- package/src/plugins/browser/videoGallery.js +103 -103
- package/src/plugins/command/blockquote.js +61 -60
- package/src/plugins/command/exportPDF.js +134 -134
- package/src/plugins/command/fileUpload.js +456 -456
- package/src/plugins/command/list_bulleted.js +149 -148
- package/src/plugins/command/list_numbered.js +152 -151
- package/src/plugins/dropdown/align.js +157 -155
- package/src/plugins/dropdown/backgroundColor.js +108 -104
- package/src/plugins/dropdown/font.js +141 -137
- package/src/plugins/dropdown/fontColor.js +109 -105
- package/src/plugins/dropdown/formatBlock.js +170 -178
- package/src/plugins/dropdown/hr.js +152 -152
- package/src/plugins/dropdown/layout.js +83 -83
- package/src/plugins/dropdown/lineHeight.js +131 -130
- package/src/plugins/dropdown/list.js +123 -122
- package/src/plugins/dropdown/paragraphStyle.js +138 -138
- package/src/plugins/dropdown/table.js +4110 -4000
- package/src/plugins/dropdown/template.js +83 -83
- package/src/plugins/dropdown/textStyle.js +149 -149
- package/src/plugins/field/mention.js +242 -242
- package/src/plugins/index.js +120 -120
- package/src/plugins/input/fontSize.js +414 -410
- package/src/plugins/input/pageNavigator.js +71 -70
- package/src/plugins/modal/audio.js +677 -677
- package/src/plugins/modal/drawing.js +537 -531
- package/src/plugins/modal/embed.js +886 -886
- package/src/plugins/modal/image.js +1377 -1376
- package/src/plugins/modal/link.js +248 -240
- package/src/plugins/modal/math.js +563 -563
- package/src/plugins/modal/video.js +1226 -1226
- package/src/plugins/popup/anchor.js +224 -222
- package/src/suneditor.js +114 -107
- package/src/themes/dark.css +132 -122
- package/src/typedef.js +132 -130
- package/types/assets/icons/defaultIcons.d.ts +8 -0
- package/types/core/base/eventManager.d.ts +29 -4
- package/types/core/class/char.d.ts +2 -1
- package/types/core/class/component.d.ts +1 -2
- package/types/core/class/format.d.ts +8 -1
- package/types/core/class/html.d.ts +8 -0
- package/types/core/class/menu.d.ts +8 -0
- package/types/core/class/offset.d.ts +24 -26
- package/types/core/class/selection.d.ts +2 -0
- package/types/core/class/toolbar.d.ts +6 -0
- package/types/core/class/ui.d.ts +1 -1
- package/types/core/editor.d.ts +34 -12
- package/types/core/section/constructor.d.ts +5 -638
- package/types/core/section/documentType.d.ts +12 -2
- package/types/core/section/options.d.ts +740 -0
- package/types/core/util/instanceCheck.d.ts +50 -0
- package/types/editorInjector/_core.d.ts +5 -5
- package/types/editorInjector/index.d.ts +2 -2
- package/types/events.d.ts +2 -0
- package/types/helper/converter.d.ts +9 -0
- package/types/helper/dom/domQuery.d.ts +5 -5
- package/types/helper/dom/domUtils.d.ts +8 -0
- package/types/helper/env.d.ts +6 -1
- package/types/helper/index.d.ts +4 -1
- package/types/index.d.ts +122 -120
- package/types/langs/_Lang.d.ts +194 -194
- package/types/modules/ColorPicker.d.ts +5 -1
- package/types/modules/Controller.d.ts +8 -4
- package/types/modules/Figure.d.ts +2 -1
- package/types/modules/HueSlider.d.ts +4 -1
- package/types/modules/SelectMenu.d.ts +1 -1
- package/types/plugins/command/blockquote.d.ts +1 -0
- package/types/plugins/command/list_bulleted.d.ts +1 -0
- package/types/plugins/command/list_numbered.d.ts +1 -0
- package/types/plugins/dropdown/align.d.ts +1 -0
- package/types/plugins/dropdown/backgroundColor.d.ts +1 -0
- package/types/plugins/dropdown/font.d.ts +1 -0
- package/types/plugins/dropdown/fontColor.d.ts +1 -0
- package/types/plugins/dropdown/formatBlock.d.ts +3 -2
- package/types/plugins/dropdown/lineHeight.d.ts +1 -0
- package/types/plugins/dropdown/list.d.ts +1 -0
- package/types/plugins/dropdown/table.d.ts +6 -0
- package/types/plugins/input/fontSize.d.ts +1 -0
- package/types/plugins/modal/drawing.d.ts +4 -0
- package/types/plugins/modal/link.d.ts +32 -15
- package/types/suneditor.d.ts +13 -9
- package/types/typedef.d.ts +8 -0
package/src/assets/suneditor.css
CHANGED
|
@@ -201,9 +201,13 @@
|
|
|
201
201
|
/* se-type-document - placeholder position set */
|
|
202
202
|
.sun-editor .se-wrapper.se-type-document .se-placeholder {
|
|
203
203
|
top: clamp(var(--se-doc-min-padding));
|
|
204
|
+
left: clamp(var(--se-doc-min-padding));
|
|
205
|
+
right: clamp(var(--se-doc-min-padding));
|
|
206
|
+
padding: var(--se-edit-inner-padding-doc-type);
|
|
207
|
+
}
|
|
208
|
+
.sun-editor .se-wrapper.se-type-document.se-type-document-header .se-placeholder {
|
|
204
209
|
left: var(--se-doc-info-width);
|
|
205
210
|
right: var(--se-doc-info-width);
|
|
206
|
-
padding: var(--se-edit-inner-padding-doc-type);
|
|
207
211
|
}
|
|
208
212
|
/** --- se-type-document end ---------------------------------------------------------- */
|
|
209
213
|
|
|
@@ -247,22 +251,19 @@
|
|
|
247
251
|
border-width: 1px;
|
|
248
252
|
}
|
|
249
253
|
|
|
250
|
-
.sun-editor .se-btn.se-btn-info {
|
|
251
|
-
color: var(--se-active-color);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
254
|
.sun-editor .se-btn:not(.on):not(.active):enabled:hover,
|
|
255
255
|
.sun-editor .se-btn:not(.on):not(.active):enabled:focus {
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
color: var(--se-hover-color);
|
|
257
|
+
background-color: var(--se-hover-light-color);
|
|
258
|
+
border-color: var(--se-hover-dark-color);
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
.sun-editor .se-btn:not(.on):not(.active):enabled:active,
|
|
261
262
|
.sun-editor .se-btn:not(.on):not(.active):enabled.__se__active {
|
|
262
|
-
background-color: var(--se-
|
|
263
|
-
border-color: var(--se-
|
|
264
|
-
outline: 1px solid var(--se-
|
|
265
|
-
box-shadow: 0 0 0 0.3rem var(--se-
|
|
263
|
+
background-color: var(--se-hover-light2-color);
|
|
264
|
+
border-color: var(--se-hover-dark2-color) !important;
|
|
265
|
+
outline: 1px solid var(--se-hover-dark3-color) !important;
|
|
266
|
+
box-shadow: 0 0 0 0.3rem var(--se-hover-light2-color);
|
|
266
267
|
transition: box-shadow 0.1s ease-in-out;
|
|
267
268
|
}
|
|
268
269
|
|
|
@@ -274,7 +275,7 @@
|
|
|
274
275
|
.sun-editor .se-menu-list li:hover .se-btn-input input:enabled {
|
|
275
276
|
border-width: 1px;
|
|
276
277
|
border-style: solid;
|
|
277
|
-
border-color: var(--se-
|
|
278
|
+
border-color: var(--se-hover-dark-color);
|
|
278
279
|
}
|
|
279
280
|
|
|
280
281
|
/* after, before button - on, active */
|
|
@@ -284,7 +285,7 @@
|
|
|
284
285
|
.sun-editor .se-menu-list li .se-side-btn-before.active:enabled,
|
|
285
286
|
.sun-editor .se-menu-list li .se-btn-input.on input:enabled,
|
|
286
287
|
.sun-editor .se-menu-list li .se-btn-input.active input:enabled {
|
|
287
|
-
border-color: var(--se-active-
|
|
288
|
+
border-color: var(--se-active-dark3-color);
|
|
288
289
|
}
|
|
289
290
|
|
|
290
291
|
/* after, before button : hover - on, active - border */
|
|
@@ -324,7 +325,7 @@
|
|
|
324
325
|
.sun-editor .se-btn:enabled.on:hover,
|
|
325
326
|
.sun-editor .se-btn:enabled.on:focus {
|
|
326
327
|
background-color: var(--se-active-light3-color);
|
|
327
|
-
color: var(--se-active-
|
|
328
|
+
color: var(--se-active-hover-color);
|
|
328
329
|
border-color: var(--se-active-light5-color);
|
|
329
330
|
}
|
|
330
331
|
|
|
@@ -349,18 +350,19 @@
|
|
|
349
350
|
.sun-editor .se-btn:enabled.active:hover,
|
|
350
351
|
.sun-editor .se-btn:enabled.active:focus {
|
|
351
352
|
background-color: var(--se-active-light5-color);
|
|
352
|
-
color: var(--se-active-
|
|
353
|
+
color: var(--se-active-hover-color);
|
|
353
354
|
border-color: var(--se-active-dark4-color);
|
|
354
355
|
}
|
|
355
356
|
|
|
356
357
|
.sun-editor .se-btn:enabled.active:active,
|
|
357
358
|
.sun-editor .se-btn:enabled.active.__se__active {
|
|
358
359
|
background-color: var(--se-active-light5-color);
|
|
359
|
-
color: var(--se-active-
|
|
360
|
+
color: var(--se-active-hover-color);
|
|
360
361
|
border-color: var(--se-active-dark5-color) !important;
|
|
361
362
|
outline: 1px solid var(--se-active-dark5-color) !important;
|
|
362
363
|
box-shadow: 0 0 0 0.3rem var(--se-active-light5-color);
|
|
363
364
|
transition: box-shadow 0.1s ease-in-out;
|
|
365
|
+
z-index: 1;
|
|
364
366
|
}
|
|
365
367
|
|
|
366
368
|
/** --- primary button */
|
|
@@ -755,7 +757,7 @@
|
|
|
755
757
|
top: -12px;
|
|
756
758
|
content: ' ';
|
|
757
759
|
border-bottom-width: 0;
|
|
758
|
-
border-top-color: var(--se-
|
|
760
|
+
border-top-color: var(--se-controller-background-color);
|
|
759
761
|
}
|
|
760
762
|
|
|
761
763
|
/** --- container */
|
|
@@ -773,9 +775,7 @@
|
|
|
773
775
|
height: 100%;
|
|
774
776
|
top: 0;
|
|
775
777
|
left: 0;
|
|
776
|
-
background-color:
|
|
777
|
-
opacity: 0.7;
|
|
778
|
-
filter: alpha(opacity=70);
|
|
778
|
+
background-color: transparent;
|
|
779
779
|
z-index: 2147483647;
|
|
780
780
|
}
|
|
781
781
|
|
|
@@ -811,7 +811,7 @@
|
|
|
811
811
|
opacity: 0.95;
|
|
812
812
|
border-radius: var(--se-border-radius);
|
|
813
813
|
cursor: pointer;
|
|
814
|
-
z-index:
|
|
814
|
+
z-index: 2147483646;
|
|
815
815
|
transition: opacity 0.3s ease, color 0.3s ease, background-color 0.3s ease;
|
|
816
816
|
}
|
|
817
817
|
.sun-editor .se-line-breaker-component.se-on-selected {
|
|
@@ -868,7 +868,7 @@
|
|
|
868
868
|
.sun-editor .se-toolbar.se-toolbar-balloon {
|
|
869
869
|
display: none;
|
|
870
870
|
position: absolute;
|
|
871
|
-
z-index:
|
|
871
|
+
z-index: 2147483646;
|
|
872
872
|
width: auto;
|
|
873
873
|
box-shadow: 0 3px 9px var(--se-shadow-layer-color);
|
|
874
874
|
-webkit-box-shadow: 0 3px 9px var(--se-shadow-layer-color);
|
|
@@ -1057,7 +1057,7 @@
|
|
|
1057
1057
|
left: 0px;
|
|
1058
1058
|
width: 100%;
|
|
1059
1059
|
height: 0px;
|
|
1060
|
-
z-index:
|
|
1060
|
+
z-index: 2147483646;
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
1063
|
/** --- dropdown layer ---------------------------------------------------------- */
|
|
@@ -1271,8 +1271,13 @@
|
|
|
1271
1271
|
border-radius: var(--se-border-radius);
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
1274
|
+
.sun-editor-editable[contenteditable='true'],
|
|
1275
|
+
.sun-editor-editable[contenteditable='true'] * {
|
|
1276
|
+
scroll-margin: var(--se-edit-scroll-margin);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1274
1279
|
.sun-editor-editable[contenteditable='true'].se-copy-format-cursor {
|
|
1275
|
-
cursor: url('data:image/svg+xml;base64,
|
|
1280
|
+
cursor: url('data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIxNiIKICB2aWV3Qm94PSIwIDAgMjQgMTYiCj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9IndoaXRlLW91dGxpbmUiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CiAgICAgIDxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImRpbGF0ZWQiIG9wZXJhdG9yPSJkaWxhdGUiIHJhZGl1cz0iMSIvPgogICAgICA8ZmVGbG9vZCBmbG9vZC1jb2xvcj0id2hpdGUiIHJlc3VsdD0id2hpdGUiLz4KICAgICAgPGZlQ29tcG9zaXRlIGluPSJ3aGl0ZSIgaW4yPSJkaWxhdGVkIiBvcGVyYXRvcj0iaW4iIHJlc3VsdD0ib3V0bGluZSIvPgogICAgICA8ZmVNZXJnZT4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49Im91dGxpbmUiLz4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49IlNvdXJjZUdyYXBoaWMiLz4KICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIDxnIGZpbHRlcj0idXJsKCN3aGl0ZS1vdXRsaW5lKSI+CiAgICA8cGF0aAogICAgICBkPSJNNC4zMzIgMTIuNjY4CiAgICAgICAgIEM0LjMzMiAxMy4wMzUgNC40ODQgMTMuMzMyIDQuNjY4IDEzLjMzMgogICAgICAgICBMNS4zMzIgMTMuMzMyCiAgICAgICAgIEw1LjMzMiAxNC42NjgKICAgICAgICAgTDQuNSAxNC42NjgKICAgICAgICAgQzQuMzE2IDE0LjY2OCA0IDE0LjM2NyA0IDE0CiAgICAgICAgIEM0IDE0LjM2NyAzLjY4NCAxNC42NjggMy41IDE0LjY2OAogICAgICAgICBMMi42NjggMTQuNjY4CiAgICAgICAgIEwyLjY2OCAxMy4zMzIKICAgICAgICAgTDMuMzMyIDEzLjMzMgogICAgICAgICBDMy41MTYgMTMuMzMyIDMuNjY4IDEzLjAzNSAzLjY2OCAxMi42NjgKICAgICAgICAgTDMuNjY4IDMuMzMyCiAgICAgICAgIEMzLjY2OCAyLjk2NSAzLjUxNiAyLjY2OCAzLjMzMiAyLjY2OAogICAgICAgICBMMi42NjggMi42NjgKICAgICAgICAgTDIuNjY4IDEuMzMyCiAgICAgICAgIEwzLjUgMS4zMzIKICAgICAgICAgQzMuNjg0IDEuMzMyIDQgMS42MzMgNCAyCiAgICAgICAgIEM0IDEuNjMzIDQuMzE2IDEuMzMyIDQuNSAxLjMzMgogICAgICAgICBMNS4zMzIgMS4zMzIKICAgICAgICAgTDUuMzMyIDIuNjY4CiAgICAgICAgIEw0LjY2OCAyLjY2OAogICAgICAgICBDNC40ODQgMi42NjggNC4zMzIgMi45NjUgNC4zMzIgMy4zMzIKICAgICAgICAgWiIKICAgICAgZmlsbD0iYmxhY2siCiAgICAvPgogICAgPHBhdGgKICAgICAgZD0iTTIwIDIuNjY4CiAgICAgICAgIEwyMCAyCiAgICAgICAgIEMyMCAxLjYzMyAxOS43MDMgMS4zMzIgMTkuMzMyIDEuMzMyCiAgICAgICAgIEwxMS4zMzIgMS4zMzIKICAgICAgICAgQzEwLjk2NSAxLjMzMiAxMC42NjggMS42MzMgMTAuNjY4IDIKICAgICAgICAgTDEwLjY2OCA0LjY2OAogICAgICAgICBDMTAuNjY4IDUuMDM1IDEwLjk2NSA1LjMzMiAxMS4zMzIgNS4zMzIKICAgICAgICAgTDE5LjMzMiA1LjMzMgogICAgICAgICBDMTkuNzAzIDUuMzMyIDIwIDUuMDM1IDIwIDQuNjY4CiAgICAgICAgIEwyMCA0CiAgICAgICAgIEwyMC42NjggNAogICAgICAgICBMMjAuNjY4IDYuNjY4CiAgICAgICAgIEwxNCA2LjY2OAogICAgICAgICBMMTQgMTQKICAgICAgICAgQzE0IDE0LjM2NyAxNC4yOTcgMTQuNjY4IDE0LjY2OCAxNC42NjgKICAgICAgICAgTDE2IDE0LjY2OAogICAgICAgICBDMTYuMzY3IDE0LjY2OCAxNi42NjggMTQuMzY3IDE2LjY2OCAxNAogICAgICAgICBMMTYuNjY4IDgKICAgICAgICAgTDIyIDgKICAgICAgICAgTDIyIDIuNjY4CiAgICAgICAgIFoiCiAgICAgIGZpbGw9ImJsYWNrIgogICAgLz4KICA8L2c+Cjwvc3ZnPgo=')
|
|
1276
1281
|
0 8,
|
|
1277
1282
|
text;
|
|
1278
1283
|
}
|
|
@@ -1306,9 +1311,9 @@
|
|
|
1306
1311
|
.sun-editor .se-table-resize-line {
|
|
1307
1312
|
position: absolute;
|
|
1308
1313
|
top: 0;
|
|
1309
|
-
width:
|
|
1314
|
+
width: 6px;
|
|
1310
1315
|
height: 100%;
|
|
1311
|
-
margin-left: -
|
|
1316
|
+
margin-left: -3px;
|
|
1312
1317
|
background-color: var(--se-active-dark-color);
|
|
1313
1318
|
opacity: 0.4;
|
|
1314
1319
|
pointer-events: none;
|
|
@@ -1320,7 +1325,7 @@
|
|
|
1320
1325
|
position: absolute;
|
|
1321
1326
|
left: 0;
|
|
1322
1327
|
width: 100%;
|
|
1323
|
-
height:
|
|
1328
|
+
height: 6px;
|
|
1324
1329
|
margin-top: -3px;
|
|
1325
1330
|
background-color: var(--se-active-dark-color);
|
|
1326
1331
|
opacity: 0.4;
|
|
@@ -1649,6 +1654,9 @@
|
|
|
1649
1654
|
.sun-editor .se-wrapper .se-code-wrapper {
|
|
1650
1655
|
width: 100%;
|
|
1651
1656
|
}
|
|
1657
|
+
.sun-editor .se-wrapper .se-code-wrapper > div {
|
|
1658
|
+
width: 100%;
|
|
1659
|
+
}
|
|
1652
1660
|
.sun-editor .se-wrapper .se-code-wrapper .se-code-view-line {
|
|
1653
1661
|
background-color: var(--se-code-view-color);
|
|
1654
1662
|
color: var(--se-code-view-background-color);
|
|
@@ -1783,7 +1791,7 @@
|
|
|
1783
1791
|
left: 0;
|
|
1784
1792
|
width: 100%;
|
|
1785
1793
|
height: 100%;
|
|
1786
|
-
z-index:
|
|
1794
|
+
z-index: 2147483646;
|
|
1787
1795
|
}
|
|
1788
1796
|
.sun-editor .se-modal-area.se-backdrop-show {
|
|
1789
1797
|
display: block;
|
|
@@ -2774,7 +2782,7 @@
|
|
|
2774
2782
|
min-width: auto;
|
|
2775
2783
|
top: 0px;
|
|
2776
2784
|
left: 0px;
|
|
2777
|
-
z-index:
|
|
2785
|
+
z-index: 2147483646;
|
|
2778
2786
|
display: none;
|
|
2779
2787
|
width: -webkit-max-content;
|
|
2780
2788
|
width: -moz-max-content;
|
|
@@ -2845,7 +2853,7 @@
|
|
|
2845
2853
|
background-color: var(--se-active-light4-color);
|
|
2846
2854
|
border-color: var(--se-active-light4-color) !important;
|
|
2847
2855
|
outline: 1px solid var(--se-active-color) !important;
|
|
2848
|
-
box-shadow:
|
|
2856
|
+
box-shadow: none;
|
|
2849
2857
|
transition: background-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
|
|
2850
2858
|
}
|
|
2851
2859
|
|
|
@@ -2866,7 +2874,7 @@
|
|
|
2866
2874
|
left: 0;
|
|
2867
2875
|
width: 100%;
|
|
2868
2876
|
height: 100%;
|
|
2869
|
-
z-index:
|
|
2877
|
+
z-index: 2147483646;
|
|
2870
2878
|
}
|
|
2871
2879
|
|
|
2872
2880
|
.sun-editor .se-browser label,
|
|
@@ -3313,7 +3321,7 @@
|
|
|
3313
3321
|
left: 0;
|
|
3314
3322
|
width: 100%;
|
|
3315
3323
|
height: 100%;
|
|
3316
|
-
z-index:
|
|
3324
|
+
z-index: 2147483646;
|
|
3317
3325
|
pointer-events: none;
|
|
3318
3326
|
}
|
|
3319
3327
|
|
|
@@ -3806,7 +3814,7 @@
|
|
|
3806
3814
|
}
|
|
3807
3815
|
|
|
3808
3816
|
.sun-editor-editable.se-rtl[contenteditable='true'].se-copy-format-cursor {
|
|
3809
|
-
cursor: url('data:image/svg+xml;base64,
|
|
3817
|
+
cursor: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDE2Ij4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9IndoaXRlLW91dGxpbmUiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CiAgICAgIDxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImRpbGF0ZWQiIG9wZXJhdG9yPSJkaWxhdGUiIHJhZGl1cz0iMSIvPgogICAgICA8ZmVGbG9vZCBmbG9vZC1jb2xvcj0id2hpdGUiIHJlc3VsdD0id2hpdGUiLz4KICAgICAgPGZlQ29tcG9zaXRlIGluPSJ3aGl0ZSIgaW4yPSJkaWxhdGVkIiBvcGVyYXRvcj0iaW4iIHJlc3VsdD0ib3V0bGluZSIvPgogICAgICA8ZmVNZXJnZT4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49Im91dGxpbmUiLz4KICAgICAgICA8ZmVNZXJnZU5vZGUgaW49IlNvdXJjZUdyYXBoaWMiLz4KICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIDxnIGZpbHRlcj0idXJsKCN3aGl0ZS1vdXRsaW5lKSIgdHJhbnNmb3JtPSJzY2FsZSgtMSwxKSB0cmFuc2xhdGUoLTI0LDApIj4KICAgIDxwYXRoCiAgICAgIGQ9Ik00LjMzMiAxMi42NjgKICAgICAgICAgQzQuMzMyIDEzLjAzNSA0LjQ4NCAxMy4zMzIgNC42NjggMTMuMzMyCiAgICAgICAgIEw1LjMzMiAxMy4zMzIKICAgICAgICAgTDUuMzMyIDE0LjY2OAogICAgICAgICBMNC41IDE0LjY2OAogICAgICAgICBDNC4zMTYgMTQuNjY4IDQgMTQuMzY3IDQgMTQKICAgICAgICAgQzQgMTQuMzY3IDMuNjg0IDE0LjY2OCAzLjUgMTQuNjY4CiAgICAgICAgIEwyLjY2OCAxNC42NjgKICAgICAgICAgTDIuNjY4IDEzLjMzMgogICAgICAgICBMMy4zMzIgMTMuMzMyCiAgICAgICAgIEMzLjUxNiAxMy4zMzIgMy42NjggMTMuMDM1IDMuNjY4IDEyLjY2OAogICAgICAgICBMMy42NjggMy4zMzIKICAgICAgICAgQzMuNjY4IDIuOTY1IDMuNTE2IDIuNjY4IDMuMzMyIDIuNjY4CiAgICAgICAgIEwyLjY2OCAyLjY2OAogICAgICAgICBMMi42NjggMS4zMzIKICAgICAgICAgTDMuNSAxLjMzMgogICAgICAgICBDMy42ODQgMS4zMzIgNCAxLjYzMyA0IDIKICAgICAgICAgQzQgMS42MzMgNC4zMTYgMS4zMzIgNC41IDEuMzMyCiAgICAgICAgIEw1LjMzMiAxLjMzMgogICAgICAgICBMNS4zMzIgMi42NjgKICAgICAgICAgTDQuNjY4IDIuNjY4CiAgICAgICAgIEM0LjQ4NCAyLjY2OCA0LjMzMiAyLjk2NSA0LjMzMiAzLjMzMgogICAgICAgICBaIgogICAgICBmaWxsPSJibGFjayIKICAgIC8+CiAgICA8cGF0aAogICAgICBkPSJNMjAgMi42NjgKICAgICAgICAgTDIwIDIKICAgICAgICAgQzIwIDEuNjMzIDE5LjcwMyAxLjMzMiAxOS4zMzIgMS4zMzIKICAgICAgICAgTDExLjMzMiAxLjMzMgogICAgICAgICBDMTAuOTY1IDEuMzMyIDEwLjY2OCAxLjYzMyAxMC42NjggMgogICAgICAgICBMMTAuNjY4IDQuNjY4CiAgICAgICAgIEMxMC42NjggNS4wMzUgMTAuOTY1IDUuMzMyIDExLjMzMiA1LjMzMgogICAgICAgICBMMTkuMzMyIDUuMzMyCiAgICAgICAgIEMxOS43MDMgNS4zMzIgMjAgNS4wMzUgMjAgNC42NjgKICAgICAgICAgTDIwIDQKICAgICAgICAgTDIwLjY2OCA0CiAgICAgICAgIEwyMC42NjggNi42NjgKICAgICAgICAgTDE0IDYuNjY4CiAgICAgICAgIEwxNCAxNAogICAgICAgICBDMTQgMTQuMzY3IDE0LjI5NyAxNC42NjggMTQuNjY4IDE0LjY2OAogICAgICAgICBMMTYgMTQuNjY4CiAgICAgICAgIEMxNi4zNjcgMTQuNjY4IDE2LjY2OCAxNC4zNjcgMTYuNjY4IDE0CiAgICAgICAgIEwxNi42NjggOAogICAgICAgICBMMjIgOAogICAgICAgICBMMjIgMi42NjgKICAgICAgICAgWiIKICAgICAgZmlsbD0iYmxhY2siCiAgICAvPgogIDwvZz4KPC9zdmc+Cg==')
|
|
3810
3818
|
24 0,
|
|
3811
3819
|
text;
|
|
3812
3820
|
}
|
|
@@ -4031,7 +4039,7 @@
|
|
|
4031
4039
|
pointer-events: none;
|
|
4032
4040
|
width: 2px;
|
|
4033
4041
|
background-color: var(--se-active-dark5-color);
|
|
4034
|
-
z-index:
|
|
4042
|
+
z-index: 2147483646;
|
|
4035
4043
|
}
|
|
4036
4044
|
.sun-editor.sun-editor-carrier-wrapper .se-drag-cursor::before {
|
|
4037
4045
|
content: '';
|
|
@@ -4070,7 +4078,7 @@
|
|
|
4070
4078
|
clear: both;
|
|
4071
4079
|
width: 100%;
|
|
4072
4080
|
height: 24px;
|
|
4073
|
-
margin:
|
|
4081
|
+
margin: 0;
|
|
4074
4082
|
padding: 0;
|
|
4075
4083
|
z-index: 1;
|
|
4076
4084
|
}
|
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
import { dom, env } from '../../../helper';
|
|
2
|
-
|
|
3
|
-
const { isMobile } = env;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_toolbar
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @private
|
|
11
|
-
* @this {EventManagerThis_handler_toolbar}
|
|
12
|
-
* @param {MouseEvent} e - Event object
|
|
13
|
-
*/
|
|
14
|
-
export function ButtonsHandler(e) {
|
|
15
|
-
const eventTarget = dom.query.getEventTarget(e);
|
|
16
|
-
let target = eventTarget;
|
|
17
|
-
|
|
18
|
-
if (this.editor.isSubBalloon && !this.context.get('toolbar.sub.main')?.contains(target)) {
|
|
19
|
-
this._hideToolbar_sub();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const isInput = dom.check.isInputElement(target);
|
|
23
|
-
|
|
24
|
-
if (isInput) {
|
|
25
|
-
this.editor._preventBlur = false;
|
|
26
|
-
} else if (!this.editor.frameContext.get('wysiwyg').contains(this.selection.getNode())) {
|
|
27
|
-
this.editor.focus();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (dom.query.getParentElement(target, '.se-dropdown')) {
|
|
31
|
-
e.stopPropagation();
|
|
32
|
-
this.editor._notHideToolbar = true;
|
|
33
|
-
} else {
|
|
34
|
-
let command = target.getAttribute('data-command');
|
|
35
|
-
let className = target.className;
|
|
36
|
-
|
|
37
|
-
while (target && !command && !/(se-menu-list|sun-editor-common|se-menu-tray)/.test(className)) {
|
|
38
|
-
target = target.parentElement;
|
|
39
|
-
command = target.getAttribute('data-command');
|
|
40
|
-
className = target.className;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// toolbar input button
|
|
44
|
-
if (isInput && /^INPUT$/i.test(target?.getAttribute('data-type'))) {
|
|
45
|
-
this.editor._preventBlur = this._inputFocus = true;
|
|
46
|
-
if (!this.status.hasFocus) this.applyTagEffect();
|
|
47
|
-
/* event */
|
|
48
|
-
if (!dom.check.isInputElement(eventTarget) || eventTarget.disabled) return;
|
|
49
|
-
|
|
50
|
-
const plugin = this.plugins[command];
|
|
51
|
-
if (!plugin) return;
|
|
52
|
-
|
|
53
|
-
if (this.__inputBlurEvent) this.__removeInput();
|
|
54
|
-
|
|
55
|
-
// blur event
|
|
56
|
-
if (typeof plugin.onInputChange === 'function') this.__inputPlugin = { obj: plugin, target: eventTarget, value: eventTarget.value };
|
|
57
|
-
this.__inputBlurEvent = this.addEvent(eventTarget, 'blur', (ev) => {
|
|
58
|
-
if (plugin.isInputActive) return;
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
const value = eventTarget.value.trim();
|
|
62
|
-
if (typeof plugin.onInputChange === 'function' && value !== this.__inputPlugin.value) plugin.onInputChange({ target: eventTarget, value, event: ev });
|
|
63
|
-
} finally {
|
|
64
|
-
this._w.setTimeout(() => (this._inputFocus = false), 0);
|
|
65
|
-
this.__removeInput();
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
if (!plugin) return;
|
|
70
|
-
|
|
71
|
-
// keydown event
|
|
72
|
-
if (typeof plugin.onInputKeyDown === 'function') {
|
|
73
|
-
this.__inputKeyEvent = this.addEvent(eventTarget, 'keydown', (event) => {
|
|
74
|
-
plugin.onInputKeyDown({ target: eventTarget, event });
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
} else if (this.__inputBlurEvent && this.__inputPlugin) {
|
|
78
|
-
const value = this.__inputPlugin.target.value.trim();
|
|
79
|
-
if (value !== this.__inputPlugin.value) {
|
|
80
|
-
this.__inputPlugin.obj.onInputChange({ target: this.__inputPlugin.target, value, event: e });
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
this.__removeInput();
|
|
84
|
-
return;
|
|
85
|
-
} else if (!this.editor.frameContext.get('isCodeView')) {
|
|
86
|
-
if (isMobile) {
|
|
87
|
-
this.editor._preventBlur = true;
|
|
88
|
-
} else {
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
if (env.isGecko && command) {
|
|
91
|
-
this._injectActiveEvent(target);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (command === this.menu.currentDropdownName || command === this.menu.currentContainerName) {
|
|
97
|
-
e.stopPropagation();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @private
|
|
104
|
-
* @this {EventManagerThis_handler_toolbar}
|
|
105
|
-
* @param {MouseEvent} e - Event object
|
|
106
|
-
*/
|
|
107
|
-
export function OnClick_menuTray(e) {
|
|
108
|
-
const eventTarget = dom.query.getEventTarget(e);
|
|
109
|
-
const target = dom.query.getCommandTarget(eventTarget);
|
|
110
|
-
if (!target) return;
|
|
111
|
-
|
|
112
|
-
let t = target;
|
|
113
|
-
let k = '';
|
|
114
|
-
while (t && !/se-menu-tray/.test(t.className) && !k) {
|
|
115
|
-
t = t.parentElement;
|
|
116
|
-
k = t.getAttribute('data-key');
|
|
117
|
-
}
|
|
118
|
-
if (!k) return;
|
|
119
|
-
|
|
120
|
-
const plugin = this.plugins[k];
|
|
121
|
-
if (!plugin || typeof plugin.action !== 'function') return;
|
|
122
|
-
|
|
123
|
-
e.stopPropagation();
|
|
124
|
-
plugin.action(target);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @private
|
|
129
|
-
* @this {EventManagerThis_handler_toolbar}
|
|
130
|
-
* @param {MouseEvent} e - Event object
|
|
131
|
-
*/
|
|
132
|
-
export function OnClick_toolbar(e) {
|
|
133
|
-
const eventTarget = dom.query.getEventTarget(e);
|
|
134
|
-
this.editor.runFromTarget(eventTarget);
|
|
135
|
-
}
|
|
1
|
+
import { dom, env } from '../../../helper';
|
|
2
|
+
|
|
3
|
+
const { isMobile } = env;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_toolbar
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* @this {EventManagerThis_handler_toolbar}
|
|
12
|
+
* @param {MouseEvent} e - Event object
|
|
13
|
+
*/
|
|
14
|
+
export function ButtonsHandler(e) {
|
|
15
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
16
|
+
let target = eventTarget;
|
|
17
|
+
|
|
18
|
+
if (this.editor.isSubBalloon && !this.context.get('toolbar.sub.main')?.contains(target)) {
|
|
19
|
+
this._hideToolbar_sub();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const isInput = dom.check.isInputElement(target);
|
|
23
|
+
|
|
24
|
+
if (isInput) {
|
|
25
|
+
this.editor._preventBlur = false;
|
|
26
|
+
} else if (!this.editor.frameContext.get('wysiwyg').contains(this.selection.getNode())) {
|
|
27
|
+
this.editor.focus();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (dom.query.getParentElement(target, '.se-dropdown')) {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
this.editor._notHideToolbar = true;
|
|
33
|
+
} else {
|
|
34
|
+
let command = target.getAttribute('data-command');
|
|
35
|
+
let className = target.className;
|
|
36
|
+
|
|
37
|
+
while (target && !command && !/(se-menu-list|sun-editor-common|se-menu-tray)/.test(className)) {
|
|
38
|
+
target = target.parentElement;
|
|
39
|
+
command = target.getAttribute('data-command');
|
|
40
|
+
className = target.className;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// toolbar input button
|
|
44
|
+
if (isInput && /^INPUT$/i.test(target?.getAttribute('data-type'))) {
|
|
45
|
+
this.editor._preventBlur = this._inputFocus = true;
|
|
46
|
+
if (!this.status.hasFocus) this.applyTagEffect();
|
|
47
|
+
/* event */
|
|
48
|
+
if (!dom.check.isInputElement(eventTarget) || eventTarget.disabled) return;
|
|
49
|
+
|
|
50
|
+
const plugin = this.plugins[command];
|
|
51
|
+
if (!plugin) return;
|
|
52
|
+
|
|
53
|
+
if (this.__inputBlurEvent) this.__removeInput();
|
|
54
|
+
|
|
55
|
+
// blur event
|
|
56
|
+
if (typeof plugin.onInputChange === 'function') this.__inputPlugin = { obj: plugin, target: eventTarget, value: eventTarget.value };
|
|
57
|
+
this.__inputBlurEvent = this.addEvent(eventTarget, 'blur', (ev) => {
|
|
58
|
+
if (plugin.isInputActive) return;
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
const value = eventTarget.value.trim();
|
|
62
|
+
if (typeof plugin.onInputChange === 'function' && value !== this.__inputPlugin.value) plugin.onInputChange({ target: eventTarget, value, event: ev });
|
|
63
|
+
} finally {
|
|
64
|
+
this._w.setTimeout(() => (this._inputFocus = false), 0);
|
|
65
|
+
this.__removeInput();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
if (!plugin) return;
|
|
70
|
+
|
|
71
|
+
// keydown event
|
|
72
|
+
if (typeof plugin.onInputKeyDown === 'function') {
|
|
73
|
+
this.__inputKeyEvent = this.addEvent(eventTarget, 'keydown', (event) => {
|
|
74
|
+
plugin.onInputKeyDown({ target: eventTarget, event });
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
} else if (this.__inputBlurEvent && this.__inputPlugin) {
|
|
78
|
+
const value = this.__inputPlugin.target.value.trim();
|
|
79
|
+
if (value !== this.__inputPlugin.value) {
|
|
80
|
+
this.__inputPlugin.obj.onInputChange({ target: this.__inputPlugin.target, value, event: e });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
this.__removeInput();
|
|
84
|
+
return;
|
|
85
|
+
} else if (!this.editor.frameContext.get('isCodeView')) {
|
|
86
|
+
if (isMobile) {
|
|
87
|
+
this.editor._preventBlur = true;
|
|
88
|
+
} else {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
if (env.isGecko && command) {
|
|
91
|
+
this._injectActiveEvent(target);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (command === this.menu.currentDropdownName || command === this.menu.currentContainerName) {
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @private
|
|
104
|
+
* @this {EventManagerThis_handler_toolbar}
|
|
105
|
+
* @param {MouseEvent} e - Event object
|
|
106
|
+
*/
|
|
107
|
+
export function OnClick_menuTray(e) {
|
|
108
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
109
|
+
const target = dom.query.getCommandTarget(eventTarget);
|
|
110
|
+
if (!target) return;
|
|
111
|
+
|
|
112
|
+
let t = target;
|
|
113
|
+
let k = '';
|
|
114
|
+
while (t && !/se-menu-tray/.test(t.className) && !k) {
|
|
115
|
+
t = t.parentElement;
|
|
116
|
+
k = t.getAttribute('data-key');
|
|
117
|
+
}
|
|
118
|
+
if (!k) return;
|
|
119
|
+
|
|
120
|
+
const plugin = this.plugins[k];
|
|
121
|
+
if (!plugin || typeof plugin.action !== 'function') return;
|
|
122
|
+
|
|
123
|
+
e.stopPropagation();
|
|
124
|
+
plugin.action(target);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @private
|
|
129
|
+
* @this {EventManagerThis_handler_toolbar}
|
|
130
|
+
* @param {MouseEvent} e - Event object
|
|
131
|
+
*/
|
|
132
|
+
export function OnClick_toolbar(e) {
|
|
133
|
+
const eventTarget = dom.query.getEventTarget(e);
|
|
134
|
+
this.editor.runFromTarget(eventTarget);
|
|
135
|
+
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_ww_clipboard
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
* @this {EventManagerThis_handler_ww_clipboard}
|
|
8
|
-
* @param {ClipboardEvent} e - Event object
|
|
9
|
-
*/
|
|
10
|
-
export function OnPaste_wysiwyg(frameContext, e) {
|
|
11
|
-
const clipboardData = e.clipboardData;
|
|
12
|
-
if (!clipboardData) return true;
|
|
13
|
-
return this._dataTransferAction('paste', e, clipboardData, frameContext);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @private
|
|
18
|
-
* @this {EventManagerThis_handler_ww_clipboard}
|
|
19
|
-
* @param {ClipboardEvent} e - Event object
|
|
20
|
-
*/
|
|
21
|
-
export async function OnCopy_wysiwyg(frameContext, e) {
|
|
22
|
-
const clipboardData = e.clipboardData;
|
|
23
|
-
|
|
24
|
-
// user event
|
|
25
|
-
if ((await this.triggerEvent('onCopy', { frameContext, event: e, clipboardData })) === false) {
|
|
26
|
-
e.preventDefault();
|
|
27
|
-
e.stopPropagation();
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const fcSelection = frameContext.get('_ww').getSelection();
|
|
32
|
-
this.__secopy = fcSelection.toString();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @private
|
|
37
|
-
* @this {EventManagerThis_handler_ww_clipboard}
|
|
38
|
-
* @param {ClipboardEvent} e - Event object
|
|
39
|
-
*/
|
|
40
|
-
export async function OnCut_wysiwyg(frameContext, e) {
|
|
41
|
-
const clipboardData = e.clipboardData;
|
|
42
|
-
|
|
43
|
-
// user event
|
|
44
|
-
if ((await this.triggerEvent('onCut', { frameContext, event: e, clipboardData })) === false) {
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
e.stopPropagation();
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const fcSelection = frameContext.get('_ww').getSelection();
|
|
51
|
-
this.__secopy = fcSelection.toString();
|
|
52
|
-
|
|
53
|
-
this._w.setTimeout(() => {
|
|
54
|
-
this.history.push(false);
|
|
55
|
-
}, 0);
|
|
56
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_ww_clipboard
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* @this {EventManagerThis_handler_ww_clipboard}
|
|
8
|
+
* @param {ClipboardEvent} e - Event object
|
|
9
|
+
*/
|
|
10
|
+
export function OnPaste_wysiwyg(frameContext, e) {
|
|
11
|
+
const clipboardData = e.clipboardData;
|
|
12
|
+
if (!clipboardData) return true;
|
|
13
|
+
return this._dataTransferAction('paste', e, clipboardData, frameContext);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
* @this {EventManagerThis_handler_ww_clipboard}
|
|
19
|
+
* @param {ClipboardEvent} e - Event object
|
|
20
|
+
*/
|
|
21
|
+
export async function OnCopy_wysiwyg(frameContext, e) {
|
|
22
|
+
const clipboardData = e.clipboardData;
|
|
23
|
+
|
|
24
|
+
// user event
|
|
25
|
+
if ((await this.triggerEvent('onCopy', { frameContext, event: e, clipboardData })) === false) {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const fcSelection = frameContext.get('_ww').getSelection();
|
|
32
|
+
this.__secopy = fcSelection.toString();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @private
|
|
37
|
+
* @this {EventManagerThis_handler_ww_clipboard}
|
|
38
|
+
* @param {ClipboardEvent} e - Event object
|
|
39
|
+
*/
|
|
40
|
+
export async function OnCut_wysiwyg(frameContext, e) {
|
|
41
|
+
const clipboardData = e.clipboardData;
|
|
42
|
+
|
|
43
|
+
// user event
|
|
44
|
+
if ((await this.triggerEvent('onCut', { frameContext, event: e, clipboardData })) === false) {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const fcSelection = frameContext.get('_ww').getSelection();
|
|
51
|
+
this.__secopy = fcSelection.toString();
|
|
52
|
+
|
|
53
|
+
this._w.setTimeout(() => {
|
|
54
|
+
this.history.push(false);
|
|
55
|
+
}, 0);
|
|
56
|
+
}
|