suneditor 3.0.0-beta.1 → 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 +166 -29
- package/README.md +13 -1
- package/dist/suneditor.min.css +1 -1
- package/dist/suneditor.min.js +1 -1
- package/package.json +13 -5
- package/src/assets/{variables.css → design/color.css} +34 -58
- 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/suneditor-contents.css +1 -1
- package/src/assets/suneditor.css +24 -17
- package/src/core/base/eventHandlers/handler_ww_key_input.js +15 -15
- package/src/core/base/eventHandlers/handler_ww_mouse.js +1 -1
- package/src/core/base/eventManager.js +21 -9
- package/src/core/class/component.js +21 -11
- package/src/core/class/menu.js +19 -0
- package/src/core/editor.js +3 -3
- package/src/core/section/actives.js +42 -4
- package/src/core/section/constructor.js +116 -41
- package/src/core/section/documentType.js +2 -2
- package/src/events.js +13 -1
- package/src/helper/dom/domCheck.js +10 -0
- package/src/modules/Figure.js +6 -6
- package/src/modules/FileManager.js +1 -1
- package/src/plugins/command/fileUpload.js +3 -3
- package/src/plugins/dropdown/table.js +51 -18
- package/src/plugins/modal/audio.js +2 -2
- package/src/plugins/modal/embed.js +2 -2
- package/src/plugins/modal/image.js +3 -3
- package/src/plugins/modal/math.js +2 -2
- package/src/plugins/modal/video.js +1 -1
- package/src/plugins/popup/anchor.js +1 -1
- package/src/suneditor.js +1 -1
- package/src/themes/dark.css +78 -45
- package/types/core/base/eventManager.d.ts +7 -0
- package/types/core/class/component.d.ts +12 -3
- package/types/core/class/menu.d.ts +8 -0
- package/types/core/section/constructor.d.ts +160 -149
- package/types/events.d.ts +1 -0
- package/types/helper/dom/domCheck.d.ts +7 -0
- package/types/helper/index.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/plugins/dropdown/table.d.ts +1 -0
- package/.eslintignore +0 -7
- package/.eslintrc.json +0 -81
- /package/src/assets/icons/{_default.js → defaultIcons.js} +0 -0
- /package/types/assets/icons/{_default.d.ts → defaultIcons.d.ts} +0 -0
|
@@ -263,6 +263,7 @@ class Table extends EditorInjector {
|
|
|
263
263
|
this._fixedColumn = false;
|
|
264
264
|
this._physical_cellCnt = 0;
|
|
265
265
|
this._logical_cellCnt = 0;
|
|
266
|
+
this._cellCnt = 0;
|
|
266
267
|
this._rowCnt = 0;
|
|
267
268
|
this._rowIndex = 0;
|
|
268
269
|
this._physical_cellIndex = 0;
|
|
@@ -630,22 +631,27 @@ class Table extends EditorInjector {
|
|
|
630
631
|
*/
|
|
631
632
|
onKeyDown({ event, range, line }) {
|
|
632
633
|
this._ref = null;
|
|
633
|
-
|
|
634
|
+
|
|
635
|
+
const keyCode = event.code;
|
|
636
|
+
const isTab = keyCodeMap.isTab(keyCode);
|
|
637
|
+
if (this.editor.selectMenuOn || this._resizing || (!isTab && this.__s) || keyCodeMap.isCtrl(event)) return;
|
|
634
638
|
|
|
635
639
|
if (!this.cellControllerTop) {
|
|
636
640
|
this.controller_cell.hide();
|
|
637
641
|
}
|
|
638
642
|
|
|
639
|
-
|
|
640
|
-
|
|
643
|
+
this.__s = keyCodeMap.isShift(event);
|
|
644
|
+
|
|
641
645
|
// table tabkey
|
|
642
|
-
if (
|
|
646
|
+
if (isTab) {
|
|
643
647
|
this._deleteStyleSelectedCells();
|
|
644
648
|
const tableCell = dom.query.getParentElement(line, dom.check.isTableCell);
|
|
645
649
|
if (tableCell && range.collapsed && dom.check.isEdgePoint(range.startContainer, range.startOffset)) {
|
|
646
650
|
this._closeController();
|
|
647
651
|
|
|
648
|
-
const shift =
|
|
652
|
+
const shift = this.__s;
|
|
653
|
+
this._shift = this.__s = false;
|
|
654
|
+
|
|
649
655
|
/** @type {HTMLTableElement} */
|
|
650
656
|
const table = dom.query.getParentElement(tableCell, 'table');
|
|
651
657
|
/** @type {HTMLTableCellElement[]} */
|
|
@@ -655,7 +661,7 @@ class Table extends EditorInjector {
|
|
|
655
661
|
if (idx === cells.length && !shift) {
|
|
656
662
|
if (!dom.query.getParentElement(tableCell, 'thead')) {
|
|
657
663
|
const rows = table.rows;
|
|
658
|
-
const newRow = this.insertBodyRow(table, rows.length,
|
|
664
|
+
const newRow = this.insertBodyRow(table, rows.length, this._cellCnt);
|
|
659
665
|
const firstTd = newRow.querySelector('td div');
|
|
660
666
|
this.selection.setRange(firstTd, 0, firstTd, 0);
|
|
661
667
|
}
|
|
@@ -666,7 +672,7 @@ class Table extends EditorInjector {
|
|
|
666
672
|
return false;
|
|
667
673
|
}
|
|
668
674
|
|
|
669
|
-
if (idx === -1 && shift) return;
|
|
675
|
+
if (idx === -1 && shift) return false;
|
|
670
676
|
|
|
671
677
|
const moveCell = cells[idx];
|
|
672
678
|
if (!moveCell) return;
|
|
@@ -832,13 +838,13 @@ class Table extends EditorInjector {
|
|
|
832
838
|
this._maxWidth = !this._maxWidth;
|
|
833
839
|
this._setTableStyle('width', false);
|
|
834
840
|
this._historyPush();
|
|
835
|
-
this.component.select(this._element, Table.key, true);
|
|
841
|
+
this.component.select(this._element, Table.key, { isInput: true });
|
|
836
842
|
break;
|
|
837
843
|
case 'layout':
|
|
838
844
|
this._fixedColumn = !this._fixedColumn;
|
|
839
845
|
this._setTableStyle('column', false);
|
|
840
846
|
this._historyPush();
|
|
841
|
-
this.component.select(this._element, Table.key, true);
|
|
847
|
+
this.component.select(this._element, Table.key, { isInput: true });
|
|
842
848
|
break;
|
|
843
849
|
case 'copy':
|
|
844
850
|
this.component.copy(this._figure);
|
|
@@ -979,7 +985,7 @@ class Table extends EditorInjector {
|
|
|
979
985
|
|
|
980
986
|
// cell cnt, physical cell index
|
|
981
987
|
this._physical_cellCnt = this._trElement.cells.length;
|
|
982
|
-
this._logical_cellCnt = cellCnt;
|
|
988
|
+
this._logical_cellCnt = this._cellCnt = cellCnt;
|
|
983
989
|
this._physical_cellIndex = cellIndex;
|
|
984
990
|
|
|
985
991
|
// span
|
|
@@ -1460,15 +1466,43 @@ class Table extends EditorInjector {
|
|
|
1460
1466
|
// --- copy info ---
|
|
1461
1467
|
const copyRows = copyTable.rows;
|
|
1462
1468
|
let rowCnt = 0;
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1469
|
+
const colIndexMap = [];
|
|
1470
|
+
for (let row = 0; row < copyRows.length; row++) {
|
|
1471
|
+
const cells = copyRows[row].cells;
|
|
1472
|
+
let logicalCol = 0;
|
|
1473
|
+
|
|
1474
|
+
for (let i = 0; i < cells.length; i++) {
|
|
1475
|
+
const cell = cells[i];
|
|
1476
|
+
|
|
1477
|
+
while (colIndexMap[row]?.[logicalCol]) {
|
|
1478
|
+
logicalCol++;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
const rowspan = cell.rowSpan || 1;
|
|
1482
|
+
const colspan = cell.colSpan || 1;
|
|
1483
|
+
|
|
1484
|
+
if (logicalCol === 0) {
|
|
1485
|
+
rowCnt += rowspan;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
// rowspan map
|
|
1489
|
+
for (let r = 0; r < rowspan; r++) {
|
|
1490
|
+
for (let c = 0; c < colspan; c++) {
|
|
1491
|
+
if (!colIndexMap[row + r]) colIndexMap[row + r] = [];
|
|
1492
|
+
colIndexMap[row + r][logicalCol + c] = true;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
logicalCol += colspan;
|
|
1497
|
+
}
|
|
1466
1498
|
}
|
|
1499
|
+
|
|
1467
1500
|
let logicalColCount = 0;
|
|
1468
1501
|
for (let i = 0, cells = copyRows[0].cells, len = cells.length; i < len; i++) {
|
|
1469
1502
|
const cell = cells[i];
|
|
1470
1503
|
logicalColCount += cell.colSpan || 1;
|
|
1471
1504
|
}
|
|
1505
|
+
|
|
1472
1506
|
const copyInfo = {
|
|
1473
1507
|
rowCnt: rowCnt,
|
|
1474
1508
|
logicalCellCnt: logicalColCount
|
|
@@ -2049,7 +2083,7 @@ class Table extends EditorInjector {
|
|
|
2049
2083
|
if (this._fixedCell === tdElement) dom.utils.addClass(tdElement, 'se-selected-cell-focus');
|
|
2050
2084
|
if (!this._selectedCells?.length) this._selectedCells = [tdElement];
|
|
2051
2085
|
const tableElement = this._selectedTable || this._element || dom.query.getParentElement(tdElement, 'TABLE');
|
|
2052
|
-
this.component.select(tableElement, Table.key, true);
|
|
2086
|
+
this.component.select(tableElement, Table.key, { isInput: true });
|
|
2053
2087
|
}
|
|
2054
2088
|
|
|
2055
2089
|
/**
|
|
@@ -2117,8 +2151,7 @@ class Table extends EditorInjector {
|
|
|
2117
2151
|
() => {
|
|
2118
2152
|
this.__removeGlobalEvents();
|
|
2119
2153
|
this.history.push(true);
|
|
2120
|
-
|
|
2121
|
-
this.component.select(this._element, Table.key, true);
|
|
2154
|
+
this.component.select(this._element, Table.key, { isInput: true });
|
|
2122
2155
|
},
|
|
2123
2156
|
(e) => {
|
|
2124
2157
|
this._stopResize(col, prevValue, 'width', e);
|
|
@@ -2213,7 +2246,7 @@ class Table extends EditorInjector {
|
|
|
2213
2246
|
() => {
|
|
2214
2247
|
this.__removeGlobalEvents();
|
|
2215
2248
|
// figure reopen
|
|
2216
|
-
this.component.select(this._element, Table.key, true);
|
|
2249
|
+
this.component.select(this._element, Table.key, { isInput: true });
|
|
2217
2250
|
},
|
|
2218
2251
|
this._stopResize.bind(this, figure, figure.style.width, 'width')
|
|
2219
2252
|
);
|
|
@@ -2286,7 +2319,7 @@ class Table extends EditorInjector {
|
|
|
2286
2319
|
target.style[styleProp] = prevValue;
|
|
2287
2320
|
// figure reopen
|
|
2288
2321
|
if (styleProp === 'width') {
|
|
2289
|
-
this.component.select(this._element, Table.key, true);
|
|
2322
|
+
this.component.select(this._element, Table.key, { isInput: true });
|
|
2290
2323
|
}
|
|
2291
2324
|
}
|
|
2292
2325
|
|
|
@@ -438,9 +438,9 @@ class Audio_ extends EditorInjector {
|
|
|
438
438
|
this.fileManager.setFileData(element, file);
|
|
439
439
|
if (element && element.src !== src) {
|
|
440
440
|
element.src = src;
|
|
441
|
-
this.component.select(element, Audio_.key
|
|
441
|
+
this.component.select(element, Audio_.key);
|
|
442
442
|
} else {
|
|
443
|
-
this.component.select(element, Audio_.key
|
|
443
|
+
this.component.select(element, Audio_.key);
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
446
|
}
|
|
@@ -257,7 +257,7 @@ class Embed extends EditorInjector {
|
|
|
257
257
|
result = await this.submitSRC(this._linkValue);
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
if (result) this._w.setTimeout(this.component.select.bind(this.component, this._element,
|
|
260
|
+
if (result) this._w.setTimeout(this.component.select.bind(this.component, this._element, Embed.key), 0);
|
|
261
261
|
|
|
262
262
|
return result;
|
|
263
263
|
}
|
|
@@ -386,7 +386,7 @@ class Embed extends EditorInjector {
|
|
|
386
386
|
const focusEl = container.previousElementSibling || container.nextElementSibling;
|
|
387
387
|
const emptyDiv = container.parentNode;
|
|
388
388
|
|
|
389
|
-
const message = await this.triggerEvent('
|
|
389
|
+
const message = await this.triggerEvent('onEmbedDeleteBefore', { element: targetEl, container, align: this._align, url: this._linkValue });
|
|
390
390
|
if (message === false) return;
|
|
391
391
|
|
|
392
392
|
dom.utils.removeItem(container);
|
|
@@ -946,7 +946,7 @@ class Image_ extends EditorInjector {
|
|
|
946
946
|
_updateSrc(src, element, file) {
|
|
947
947
|
element.src = src;
|
|
948
948
|
this.fileManager.setFileData(element, file);
|
|
949
|
-
this.component.select(element, Image_.key
|
|
949
|
+
this.component.select(element, Image_.key);
|
|
950
950
|
}
|
|
951
951
|
|
|
952
952
|
/**
|
|
@@ -1203,7 +1203,7 @@ class Image_ extends EditorInjector {
|
|
|
1203
1203
|
// svg exception handling
|
|
1204
1204
|
if (oImg.offsetWidth === 0) this._applySize(_svgDefaultSize, '');
|
|
1205
1205
|
if (this.options.get('componentAutoSelect')) {
|
|
1206
|
-
this.component.select(oImg, Image_.key
|
|
1206
|
+
this.component.select(oImg, Image_.key);
|
|
1207
1207
|
} else {
|
|
1208
1208
|
if (!this.component.isInline(container)) {
|
|
1209
1209
|
const line = this.format.addLine(container, null);
|
|
@@ -1213,7 +1213,7 @@ class Image_ extends EditorInjector {
|
|
|
1213
1213
|
if (r) {
|
|
1214
1214
|
this.selection.setRange(r.container, r.offset, r.container, r.offset);
|
|
1215
1215
|
} else {
|
|
1216
|
-
this.component.select(oImg, Image_.key
|
|
1216
|
+
this.component.select(oImg, Image_.key);
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
}
|
|
@@ -259,7 +259,7 @@ class Math_ extends EditorInjector {
|
|
|
259
259
|
const containerEl = dom.query.getParentElement(this.controller.currentTarget, '.se-component');
|
|
260
260
|
containerEl.replaceWith(mathEl);
|
|
261
261
|
const compInfo = this.component.get(mathEl);
|
|
262
|
-
this.component.select(compInfo.target, compInfo.pluginName
|
|
262
|
+
this.component.select(compInfo.target, compInfo.pluginName);
|
|
263
263
|
return true;
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -271,7 +271,7 @@ class Math_ extends EditorInjector {
|
|
|
271
271
|
if (r) {
|
|
272
272
|
this.selection.setRange(r.container, r.offset, r.container, r.offset);
|
|
273
273
|
} else {
|
|
274
|
-
this.component.select(mathEl, Math_.key
|
|
274
|
+
this.component.select(mathEl, Math_.key);
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
return true;
|
|
@@ -285,7 +285,7 @@ class Video extends EditorInjector {
|
|
|
285
285
|
result = await this.submitURL(this._linkValue);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
if (result) this._w.setTimeout(this.component.select.bind(this.component, this._element,
|
|
288
|
+
if (result) this._w.setTimeout(this.component.select.bind(this.component, this._element, Video.key), 0);
|
|
289
289
|
|
|
290
290
|
return result;
|
|
291
291
|
}
|
|
@@ -112,7 +112,7 @@ class Anchor extends EditorInjector {
|
|
|
112
112
|
if (r) {
|
|
113
113
|
this.selection.setRange(r.container, r.offset, r.container, r.offset);
|
|
114
114
|
} else {
|
|
115
|
-
this.component.select(a, Anchor.key
|
|
115
|
+
this.component.select(a, Anchor.key);
|
|
116
116
|
}
|
|
117
117
|
this._init();
|
|
118
118
|
} else {
|
package/src/suneditor.js
CHANGED
package/src/themes/dark.css
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
.sun-editor.se-theme-dark,
|
|
2
2
|
.sun-editor-editable.se-theme-dark {
|
|
3
|
-
/**
|
|
3
|
+
/** --------------------------- content - [colors] ----------- */
|
|
4
|
+
--se-caret-color: #ccc;
|
|
5
|
+
--se-placeholder-color: #64718c;
|
|
4
6
|
--se-edit-font-color: #ccc;
|
|
5
7
|
--se-edit-font-pre: #aaa;
|
|
6
8
|
--se-edit-font-quote: #888;
|
|
7
|
-
--se-edit-background-color: #
|
|
8
|
-
--se-edit-background-pre: #
|
|
9
|
+
--se-edit-background-color: #0f1828;
|
|
10
|
+
--se-edit-background-pre: #364153;
|
|
9
11
|
--se-edit-border-light: #555;
|
|
10
12
|
--se-edit-border-dark: #444;
|
|
11
13
|
--se-edit-border-dark-n1: #555;
|
|
@@ -14,76 +16,107 @@
|
|
|
14
16
|
--se-edit-anchor-on-back: #004cff;
|
|
15
17
|
--se-edit-anchor-on-font: #e8f7ff;
|
|
16
18
|
--se-edit-hr-color: #ccc;
|
|
17
|
-
--se-edit-hr-on-back: #
|
|
19
|
+
--se-edit-hr-on-back: #77aaff;
|
|
18
20
|
--se-edit-active: #77aaff;
|
|
19
21
|
--se-edit-hover: #5599ff;
|
|
20
22
|
--se-edit-outline: #444;
|
|
21
23
|
|
|
22
|
-
/**
|
|
24
|
+
/** --------------------------- layout - [colors] ----------- */
|
|
25
|
+
/** main, common */
|
|
26
|
+
--se-main-font-family: Helvetica Neue;
|
|
23
27
|
--se-main-out-color: #444;
|
|
24
28
|
--se-main-color: #ccc;
|
|
25
29
|
--se-main-color-lighter: #aaa;
|
|
26
|
-
--se-main-background-color: #
|
|
27
|
-
--se-
|
|
28
|
-
--se-main-background-color3: #333;
|
|
30
|
+
--se-main-background-color: #0f1828;
|
|
31
|
+
--se-code-view-color: #030712;
|
|
29
32
|
--se-main-font-color: #ccc;
|
|
30
|
-
--se-
|
|
33
|
+
--se-code-view-background-color: #ddd;
|
|
31
34
|
--se-main-divider-color: #555;
|
|
32
35
|
--se-main-border-color: #666;
|
|
33
36
|
--se-main-outline-color: #444;
|
|
34
37
|
--se-main-shadow-color: #222;
|
|
35
38
|
--se-statusbar-font-color: #aaa;
|
|
36
39
|
--se-overlay-background-color: #111;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
--se-active-
|
|
40
|
-
--se-active-
|
|
41
|
-
--se-active-
|
|
42
|
-
--se-active-
|
|
43
|
-
--se-active-
|
|
44
|
-
--se-active-
|
|
45
|
-
--se-active-
|
|
46
|
-
--se-active-
|
|
47
|
-
--se-active-
|
|
48
|
-
--se-active-
|
|
40
|
+
|
|
41
|
+
/* hover, active */
|
|
42
|
+
--se-active-color: #5cd2e6;
|
|
43
|
+
--se-active-dark-color: #3bb9cd;
|
|
44
|
+
--se-active-dark2-color: #2a9fb1;
|
|
45
|
+
--se-active-dark3-color: #5cd2e6;
|
|
46
|
+
--se-active-dark4-color: #3bb9cd;
|
|
47
|
+
--se-active-dark5-color: #197d91;
|
|
48
|
+
--se-active-light-color: #17303a;
|
|
49
|
+
--se-active-light2-color: #1e3f4d;
|
|
50
|
+
--se-active-light3-color: #255e6f;
|
|
51
|
+
--se-active-light4-color: #2c7d91;
|
|
52
|
+
--se-active-light5-color: #33aacc;
|
|
53
|
+
--se-active-light6-color: #3bd1f2;
|
|
54
|
+
|
|
55
|
+
/* [toolbar, menu, modal] layer - shadow */
|
|
56
|
+
--se-shadow-layer-color: rgba(0, 64, 128, 0.25);
|
|
57
|
+
|
|
58
|
+
/* drag */
|
|
49
59
|
--se-drag-over-color: #ffcc00;
|
|
60
|
+
|
|
61
|
+
/* modal, browser, dropdown */
|
|
62
|
+
--se-modal-background-color: #1c202a;
|
|
63
|
+
--se-modal-color: #ececec;
|
|
50
64
|
--se-modal-border-color: #555;
|
|
51
65
|
--se-modal-anchor-color: #77aaff;
|
|
52
66
|
--se-modal-preview-color: #aaa;
|
|
67
|
+
--se-modal-file-input-background-color: #232837;
|
|
53
68
|
--se-modal-input-disabled-color: #666;
|
|
54
69
|
--se-modal-input-disabled-background-color: #333;
|
|
70
|
+
|
|
71
|
+
/* dropdown, selectMenu */
|
|
55
72
|
--se-dropdown-font-color: #ccc;
|
|
73
|
+
|
|
74
|
+
/* controller */
|
|
56
75
|
--se-controller-border-color: #555;
|
|
76
|
+
--se-controller-background-color: #091025;
|
|
77
|
+
--se-controller-color: #ececec;
|
|
78
|
+
--se-shadow-controller-color: rgba(80, 200, 255, 0.2);
|
|
79
|
+
|
|
80
|
+
/* button : input-side */
|
|
57
81
|
--se-input-btn-border-color: #444;
|
|
58
82
|
--se-input-btn-disabled-color: #666;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
--se-success-
|
|
62
|
-
--se-success-
|
|
63
|
-
--se-success-
|
|
64
|
-
--se-success-
|
|
65
|
-
--se-success-
|
|
66
|
-
--se-success-
|
|
67
|
-
--se-success-
|
|
68
|
-
--se-
|
|
69
|
-
--se-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
--se-error-
|
|
73
|
-
--se-error-
|
|
74
|
-
--se-error-
|
|
75
|
-
--se-error-
|
|
76
|
-
--se-error-
|
|
77
|
-
--se-
|
|
78
|
-
--se-
|
|
83
|
+
|
|
84
|
+
/* success */
|
|
85
|
+
--se-success-color: #2cb67d;
|
|
86
|
+
--se-success-dark-color: #1f8f65;
|
|
87
|
+
--se-success-dark2-color: #186f4f;
|
|
88
|
+
--se-success-dark3-color: #125f44;
|
|
89
|
+
--se-success-light-color: #3dd9a5;
|
|
90
|
+
--se-success-light2-color: #57e2b7;
|
|
91
|
+
--se-success-light3-color: #8cf0ce;
|
|
92
|
+
--se-success-light4-color: #c1fae4;
|
|
93
|
+
--se-success-light5-color: #e9fef5;
|
|
94
|
+
|
|
95
|
+
/* error */
|
|
96
|
+
--se-error-color: #ef4444;
|
|
97
|
+
--se-error-dark-color: #991b1b;
|
|
98
|
+
--se-error-dark2-color: #7f1d1d;
|
|
99
|
+
--se-error-dark3-color: #651616;
|
|
100
|
+
--se-error-light-color: #f87171;
|
|
101
|
+
--se-error-light2-color: #fca5a5;
|
|
102
|
+
--se-error-light3-color: #fecaca;
|
|
103
|
+
--se-error-light4-color: #fee2e2;
|
|
104
|
+
--se-error-light5-color: #fef2f2;
|
|
105
|
+
|
|
106
|
+
/* document type */
|
|
107
|
+
--se-doc-background: #344153;
|
|
108
|
+
--se-doc-info-page-font-color: #0f1828;
|
|
79
109
|
--se-doc-info-page-background-color: #cfcfcf;
|
|
80
|
-
|
|
81
|
-
--se-doc-info-
|
|
110
|
+
/* document type - font, active */
|
|
111
|
+
--se-doc-info-font-color: #cfcfcf;
|
|
112
|
+
--se-doc-info-active-color: #5599ff;
|
|
113
|
+
|
|
114
|
+
/* loading */
|
|
82
115
|
--se-loading-color: #77aaff;
|
|
116
|
+
|
|
117
|
+
/* show blocks */
|
|
83
118
|
--se-show-blocks-color: #5599ff;
|
|
84
119
|
--se-show-blocks-li-color: #d539ff;
|
|
85
120
|
--se-show-blocks-pre-color: #27c022;
|
|
86
|
-
--se-shadow-layer-color: rgba(255, 255, 255, 0.5);
|
|
87
|
-
--se-shadow-controller-color: rgba(255, 255, 255, 0.2);
|
|
88
121
|
--se-show-blocks-component-color: #f4b124;
|
|
89
122
|
}
|
|
@@ -375,4 +375,11 @@ declare class EventManager {
|
|
|
375
375
|
* @param {Event} e The keyboard event
|
|
376
376
|
*/
|
|
377
377
|
__enterPrevent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, e: Event): void;
|
|
378
|
+
/**
|
|
379
|
+
* @private
|
|
380
|
+
* @description Scrolls the editor view to the caret position after pressing Enter. (Ignored on mobile devices)
|
|
381
|
+
* @this {EventManagerThis}
|
|
382
|
+
* @param {*} range Range object
|
|
383
|
+
*/
|
|
384
|
+
__enterScrollTo(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, range: any): void;
|
|
378
385
|
}
|
|
@@ -104,10 +104,19 @@ declare class Component {
|
|
|
104
104
|
* @description The component(media, file component, table, etc) is selected and the resizing module is called.
|
|
105
105
|
* @param {Node} element Target element
|
|
106
106
|
* @param {string} pluginName The plugin name for the selected target.
|
|
107
|
-
* @param {
|
|
108
|
-
* @param {boolean} [
|
|
107
|
+
* @param {Object} [options] Options
|
|
108
|
+
* @param {boolean} [options.isInput=false] Whether the target is an input component.(table)
|
|
109
109
|
*/
|
|
110
|
-
select(
|
|
110
|
+
select(
|
|
111
|
+
this: Omit<Component & Partial<import('../../editorInjector').default>, 'component'>,
|
|
112
|
+
element: Node,
|
|
113
|
+
pluginName: string,
|
|
114
|
+
{
|
|
115
|
+
isInput
|
|
116
|
+
}?: {
|
|
117
|
+
isInput?: boolean;
|
|
118
|
+
}
|
|
119
|
+
): boolean;
|
|
111
120
|
/**
|
|
112
121
|
* @this {ComponentThis}
|
|
113
122
|
* @description Deselects the selected component.
|
|
@@ -46,6 +46,8 @@ declare class Menu {
|
|
|
46
46
|
_bindClose_dropdown_key: any;
|
|
47
47
|
_bindClose_cons_mouse: any;
|
|
48
48
|
currentDropdownPlugin: any;
|
|
49
|
+
__menuBtn: Node;
|
|
50
|
+
__menuContainer: HTMLElement;
|
|
49
51
|
/**
|
|
50
52
|
* @this {MenuThis}
|
|
51
53
|
* @description Method for managing dropdown element.
|
|
@@ -94,6 +96,12 @@ declare class Menu {
|
|
|
94
96
|
* @param {HTMLElement} menu Menu element
|
|
95
97
|
*/
|
|
96
98
|
_setMenuPosition(this: Omit<Menu & Partial<import('../../editorInjector').default>, 'menu'>, element: Node, menu: HTMLElement): void;
|
|
99
|
+
/**
|
|
100
|
+
* @private
|
|
101
|
+
* @this {MenuThis}
|
|
102
|
+
* @description Restore the last menu position using previously stored button and menu elements.
|
|
103
|
+
*/
|
|
104
|
+
_restoreMenuPosition(this: Omit<Menu & Partial<import('../../editorInjector').default>, 'menu'>): void;
|
|
97
105
|
/**
|
|
98
106
|
* @private
|
|
99
107
|
* @this {MenuThis}
|