lakelib 0.0.6 → 0.1.0
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/README.md +14 -62
- package/dist/lake.css +65 -34
- package/dist/lake.min.js +9 -9
- package/dist/lake.min.js.map +1 -1
- package/lib/lake.css +65 -34
- package/lib/lake.js +60 -21
- package/lib/lake.js.map +1 -1
- package/package.json +28 -42
- package/dist/codemirror.min.js +0 -1
package/lib/lake.css
CHANGED
|
@@ -33,9 +33,11 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.lake-container {
|
|
36
|
+
box-sizing: content-box;
|
|
36
37
|
font-family: var(--font-family);
|
|
37
38
|
font-size: 16px;
|
|
38
|
-
|
|
39
|
+
font-weight: normal;
|
|
40
|
+
line-height: normal;
|
|
39
41
|
padding: 16px 24px;
|
|
40
42
|
}
|
|
41
43
|
.lake-container:focus {
|
|
@@ -91,10 +93,11 @@
|
|
|
91
93
|
background-color: #0000000a;
|
|
92
94
|
}
|
|
93
95
|
|
|
94
|
-
.lake-button {
|
|
96
|
+
button.lake-button {
|
|
97
|
+
box-sizing: content-box;
|
|
95
98
|
border-radius: 5px;
|
|
96
99
|
border: 0;
|
|
97
|
-
font-family:
|
|
100
|
+
font-family: Arial;
|
|
98
101
|
font-size: 14px;
|
|
99
102
|
color: var(--text-color);
|
|
100
103
|
background-color: #fff;
|
|
@@ -104,41 +107,42 @@
|
|
|
104
107
|
cursor: pointer;
|
|
105
108
|
user-select: none;
|
|
106
109
|
}
|
|
107
|
-
.lake-button:focus-visible {
|
|
110
|
+
button.lake-button:focus-visible {
|
|
108
111
|
outline: var(--button-outline);
|
|
109
112
|
}
|
|
110
|
-
.lake-button[disabled] {
|
|
113
|
+
button.lake-button[disabled] {
|
|
111
114
|
opacity: 0.25;
|
|
112
115
|
cursor: default;
|
|
113
116
|
}
|
|
114
|
-
.lake-button svg {
|
|
117
|
+
button.lake-button svg {
|
|
118
|
+
display: inline-block;
|
|
115
119
|
width: 16px;
|
|
116
120
|
height: 16px;
|
|
117
121
|
margin: 6px;
|
|
118
122
|
}
|
|
119
|
-
.lake-icon-button.lake-button-hovered {
|
|
123
|
+
button.lake-icon-button.lake-button-hovered {
|
|
120
124
|
background-color: var(--background-hover-color);
|
|
121
125
|
}
|
|
122
|
-
.lake-icon-button.lake-button-selected {
|
|
126
|
+
button.lake-icon-button.lake-button-selected {
|
|
123
127
|
background-color: var(--background-active-color);
|
|
124
128
|
}
|
|
125
|
-
.lake-text-button {
|
|
129
|
+
button.lake-text-button {
|
|
126
130
|
background-color: transparent;
|
|
127
131
|
border: 1px solid var(--border-color);
|
|
128
132
|
padding: 8px 16px;
|
|
129
133
|
}
|
|
130
|
-
.lake-text-button.lake-button-hovered {
|
|
134
|
+
button.lake-text-button.lake-button-hovered {
|
|
131
135
|
background-color: var(--background-hover-color);
|
|
132
136
|
}
|
|
133
|
-
.lake-text-button.lake-button-selected {
|
|
137
|
+
button.lake-text-button.lake-button-selected {
|
|
134
138
|
background-color: var(--background-active-color);
|
|
135
139
|
}
|
|
136
|
-
.lake-text-button svg {
|
|
140
|
+
button.lake-text-button svg {
|
|
137
141
|
background-color: transparent;
|
|
138
142
|
margin: 0 6px 0 0;
|
|
139
143
|
vertical-align: middle;
|
|
140
144
|
}
|
|
141
|
-
.lake-text-button span {
|
|
145
|
+
button.lake-text-button span {
|
|
142
146
|
display: inline-block;
|
|
143
147
|
line-height: 16px;
|
|
144
148
|
vertical-align: middle;
|
|
@@ -151,30 +155,34 @@
|
|
|
151
155
|
font-size: 14px;
|
|
152
156
|
user-select: none;
|
|
153
157
|
}
|
|
154
|
-
.lake-dropdown .lake-dropdown-title {
|
|
155
|
-
|
|
156
|
-
align-items: center;
|
|
157
|
-
justify-content: space-between;
|
|
158
|
-
padding: 0;
|
|
159
|
-
margin-right: 4px;
|
|
158
|
+
.lake-dropdown button.lake-dropdown-title {
|
|
159
|
+
box-sizing: content-box;
|
|
160
160
|
border-radius: 5px;
|
|
161
161
|
border: 0;
|
|
162
|
+
font-family: Arial;
|
|
162
163
|
font-size: 14px;
|
|
164
|
+
color: var(--text-color);
|
|
163
165
|
background-color: #fff;
|
|
166
|
+
padding: 0;
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: space-between;
|
|
170
|
+
margin-right: 4px;
|
|
164
171
|
cursor: pointer;
|
|
165
172
|
}
|
|
166
|
-
.lake-dropdown[disabled] .lake-dropdown-title {
|
|
173
|
+
.lake-dropdown[disabled] button.lake-dropdown-title {
|
|
167
174
|
opacity: 0.25;
|
|
168
175
|
cursor: default;
|
|
169
176
|
}
|
|
170
|
-
.lake-dropdown.lake-list-dropdown .lake-dropdown-title-hovered {
|
|
177
|
+
.lake-dropdown.lake-list-dropdown button.lake-dropdown-title-hovered {
|
|
171
178
|
background-color: var(--background-hover-color);
|
|
172
179
|
}
|
|
173
|
-
.lake-dropdown .lake-dropdown-title.lake-dropdown-title-no-down {
|
|
180
|
+
.lake-dropdown button.lake-dropdown-title.lake-dropdown-title-no-down {
|
|
174
181
|
margin-right: 0;
|
|
175
182
|
}
|
|
176
183
|
.lake-dropdown .lake-dropdown-text {
|
|
177
184
|
height: 16px;
|
|
185
|
+
line-height: normal;
|
|
178
186
|
margin: 6px;
|
|
179
187
|
overflow: hidden;
|
|
180
188
|
white-space: nowrap;
|
|
@@ -199,8 +207,8 @@
|
|
|
199
207
|
left: 0;
|
|
200
208
|
bottom: 0;
|
|
201
209
|
}
|
|
202
|
-
.lake-dropdown .lake-dropdown-title-no-down .lake-dropdown-icon svg,
|
|
203
|
-
.lake-dropdown .lake-dropdown-title-no-down .lake-dropdown-icon img {
|
|
210
|
+
.lake-dropdown button.lake-dropdown-title-no-down .lake-dropdown-icon svg,
|
|
211
|
+
.lake-dropdown button.lake-dropdown-title-no-down .lake-dropdown-icon img {
|
|
204
212
|
margin: 6px;
|
|
205
213
|
}
|
|
206
214
|
.lake-dropdown .lake-dropdown-down-icon {
|
|
@@ -217,6 +225,7 @@
|
|
|
217
225
|
fill: var(--secondary-text-color);
|
|
218
226
|
}
|
|
219
227
|
.lake-dropdown .lake-dropdown-menu {
|
|
228
|
+
box-sizing: content-box;
|
|
220
229
|
position: absolute;
|
|
221
230
|
top: 30px;
|
|
222
231
|
left: 0;
|
|
@@ -235,9 +244,9 @@
|
|
|
235
244
|
display: flex;
|
|
236
245
|
align-items: center;
|
|
237
246
|
cursor: pointer;
|
|
247
|
+
margin: 0;
|
|
238
248
|
}
|
|
239
249
|
.lake-dropdown .lake-list-dropdown-menu li {
|
|
240
|
-
margin: 0;
|
|
241
250
|
padding: 6px 24px 6px 10px;
|
|
242
251
|
}
|
|
243
252
|
.lake-dropdown .lake-list-dropdown-menu li.lake-dropdown-item-hovered {
|
|
@@ -308,6 +317,7 @@
|
|
|
308
317
|
}
|
|
309
318
|
.lake-dropdown .lake-color-dropdown-menu li .lake-dropdown-menu-text {
|
|
310
319
|
font-size: 0;
|
|
320
|
+
box-sizing: content-box;
|
|
311
321
|
border: 1px solid var(--background-hover-color);
|
|
312
322
|
border-radius: 2px;
|
|
313
323
|
width: 16px;
|
|
@@ -330,11 +340,18 @@
|
|
|
330
340
|
height: auto;
|
|
331
341
|
}
|
|
332
342
|
|
|
343
|
+
.lake-popup {
|
|
344
|
+
font-family: var(--font-family);
|
|
345
|
+
font-size: 14px;
|
|
346
|
+
font-weight: normal;
|
|
347
|
+
line-height: normal;
|
|
348
|
+
color: var(--text-color);
|
|
349
|
+
}
|
|
333
350
|
.lake-popup input[type="text"] {
|
|
351
|
+
box-sizing: content-box;
|
|
334
352
|
font-family: var(--font-family);
|
|
335
353
|
font-size: 14px;
|
|
336
354
|
color: var(--text-color);
|
|
337
|
-
width: 200px;
|
|
338
355
|
border-radius: 5px;
|
|
339
356
|
border: 1px solid var(--input-border-color);
|
|
340
357
|
padding: 4px 10px;
|
|
@@ -361,8 +378,9 @@
|
|
|
361
378
|
.lake-container h4,
|
|
362
379
|
.lake-container h5,
|
|
363
380
|
.lake-container h6 {
|
|
364
|
-
color: #000000e0;
|
|
365
381
|
font-weight: bold;
|
|
382
|
+
line-height: normal;
|
|
383
|
+
border: 0;
|
|
366
384
|
margin: 0;
|
|
367
385
|
padding: 0;
|
|
368
386
|
}
|
|
@@ -478,6 +496,7 @@
|
|
|
478
496
|
padding-left: 24px;
|
|
479
497
|
}
|
|
480
498
|
.lake-container ul[type="checklist"] li::before {
|
|
499
|
+
box-sizing: content-box;
|
|
481
500
|
content: '';
|
|
482
501
|
position: absolute;
|
|
483
502
|
top: 3px;
|
|
@@ -495,6 +514,7 @@
|
|
|
495
514
|
background-color: #fff;
|
|
496
515
|
}
|
|
497
516
|
.lake-container ul[type="checklist"] li::after {
|
|
517
|
+
box-sizing: content-box;
|
|
498
518
|
content: '';
|
|
499
519
|
position: absolute;
|
|
500
520
|
top: 3px;
|
|
@@ -516,6 +536,7 @@
|
|
|
516
536
|
}
|
|
517
537
|
|
|
518
538
|
.lake-container blockquote {
|
|
539
|
+
box-sizing: content-box;
|
|
519
540
|
margin: 0;
|
|
520
541
|
margin-bottom: 8px;
|
|
521
542
|
padding: 8px 12px;
|
|
@@ -526,24 +547,27 @@
|
|
|
526
547
|
color: var(--text-color);
|
|
527
548
|
border-radius: 8px;
|
|
528
549
|
}
|
|
550
|
+
.lake-container blockquote[type="info"],
|
|
551
|
+
.lake-container blockquote[type="tip"] {
|
|
552
|
+
background-color: #e6f4ff;
|
|
553
|
+
border: 1px solid #91caff;
|
|
554
|
+
}
|
|
529
555
|
.lake-container blockquote[type="success"] {
|
|
530
556
|
background-color: #f6ffed;
|
|
531
557
|
border: 1px solid #b7eb8f;
|
|
532
558
|
}
|
|
533
|
-
.lake-container blockquote[type="info"] {
|
|
534
|
-
background-color: #e6f4ff;
|
|
535
|
-
border: 1px solid #91caff;
|
|
536
|
-
}
|
|
537
559
|
.lake-container blockquote[type="warning"] {
|
|
538
560
|
background-color: #fffbe6;
|
|
539
561
|
border: 1px solid #ffe58f;
|
|
540
562
|
}
|
|
541
|
-
.lake-container blockquote[type="error"]
|
|
563
|
+
.lake-container blockquote[type="error"],
|
|
564
|
+
.lake-container blockquote[type="danger"] {
|
|
542
565
|
background-color: #fff2f0;
|
|
543
566
|
border: 1px solid #ffccc7;
|
|
544
567
|
}
|
|
545
568
|
|
|
546
569
|
.lake-container table {
|
|
570
|
+
box-sizing: content-box;
|
|
547
571
|
border-collapse: collapse;
|
|
548
572
|
border: 1px solid var(--border-color);
|
|
549
573
|
margin-bottom: 8px;
|
|
@@ -639,11 +663,11 @@ lake-box[name="hr"] .lake-box-focused .lake-hr {
|
|
|
639
663
|
.lake-image {
|
|
640
664
|
position: relative;
|
|
641
665
|
line-height: 0;
|
|
666
|
+
box-sizing: content-box;
|
|
642
667
|
border: 1px solid transparent;
|
|
643
668
|
border-radius: 4px;
|
|
644
669
|
}
|
|
645
670
|
.lake-image .lake-image-img {
|
|
646
|
-
box-sizing: border-box;
|
|
647
671
|
border: 0;
|
|
648
672
|
border-radius: 4px;
|
|
649
673
|
width: 100%;
|
|
@@ -862,6 +886,8 @@ lake-box[name="codeBlock"] .lake-box-activated .lake-code-block .lake-dropdown {
|
|
|
862
886
|
}
|
|
863
887
|
.lake-code-block .lake-dropdown .lake-dropdown-menu {
|
|
864
888
|
top: 24px;
|
|
889
|
+
left: auto;
|
|
890
|
+
right: 0;
|
|
865
891
|
overflow-y: scroll;
|
|
866
892
|
scrollbar-width: thin;
|
|
867
893
|
height: 200px;
|
|
@@ -879,6 +905,7 @@ lake-box[name="codeBlock"] .lake-box-activated .lake-code-block .lake-dropdown {
|
|
|
879
905
|
top: 0;
|
|
880
906
|
left: 0;
|
|
881
907
|
z-index: 1;
|
|
908
|
+
box-sizing: content-box;
|
|
882
909
|
border: 1px solid var(--border-color);
|
|
883
910
|
border-radius: 5px;
|
|
884
911
|
padding: 16px;
|
|
@@ -917,13 +944,17 @@ lake-box[name="codeBlock"] .lake-box-activated .lake-code-block .lake-dropdown {
|
|
|
917
944
|
}
|
|
918
945
|
|
|
919
946
|
.lake-toolbar {
|
|
920
|
-
|
|
947
|
+
font-family: var(--font-family);
|
|
948
|
+
font-size: 14px;
|
|
949
|
+
font-weight: normal;
|
|
950
|
+
line-height: normal;
|
|
921
951
|
padding: 4px;
|
|
922
952
|
display: flex;
|
|
923
953
|
flex-wrap: wrap;
|
|
924
954
|
align-items: center;
|
|
925
955
|
}
|
|
926
956
|
.lake-toolbar .lake-toolbar-divider {
|
|
957
|
+
box-sizing: content-box;
|
|
927
958
|
width: 1px;
|
|
928
959
|
height: 20px;
|
|
929
960
|
margin: 0 4px;
|
package/lib/lake.js
CHANGED
|
@@ -11,11 +11,15 @@ import PhotoSwipe from 'photoswipe';
|
|
|
11
11
|
|
|
12
12
|
class BoxElement extends HTMLElement {
|
|
13
13
|
}
|
|
14
|
-
customElements.
|
|
14
|
+
if (customElements.get('lake-box') !== undefined) {
|
|
15
|
+
customElements.define('lake-box', BoxElement);
|
|
16
|
+
}
|
|
15
17
|
|
|
16
18
|
class BookmarkElement extends HTMLElement {
|
|
17
19
|
}
|
|
18
|
-
customElements.
|
|
20
|
+
if (customElements.get('lake-bookmark') !== undefined) {
|
|
21
|
+
customElements.define('lake-bookmark', BookmarkElement);
|
|
22
|
+
}
|
|
19
23
|
|
|
20
24
|
var plus = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" fill=\"#000000\" viewBox=\"0 0 256 256\"><path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z\"></path></svg>";
|
|
21
25
|
|
|
@@ -2995,7 +2999,7 @@ function getElementRules() {
|
|
|
2995
2999
|
h5: Object.assign({}, blockAttributeRules),
|
|
2996
3000
|
h6: Object.assign({}, blockAttributeRules),
|
|
2997
3001
|
p: Object.assign({}, blockAttributeRules),
|
|
2998
|
-
blockquote: Object.assign(Object.assign({}, blockAttributeRules), { type: ['
|
|
3002
|
+
blockquote: Object.assign(Object.assign({}, blockAttributeRules), { type: ['info', 'tip', 'success', 'warning', 'error', 'danger'] }),
|
|
2999
3003
|
ul: Object.assign(Object.assign({}, blockAttributeRules), { type: 'checklist', indent: /^\d+$/ }),
|
|
3000
3004
|
ol: Object.assign(Object.assign({}, blockAttributeRules), { start: /^\d+$/, indent: /^\d+$/ }),
|
|
3001
3005
|
li: {
|
|
@@ -4295,7 +4299,7 @@ class Dropdown {
|
|
|
4295
4299
|
}
|
|
4296
4300
|
}
|
|
4297
4301
|
|
|
4298
|
-
var version = "0.0
|
|
4302
|
+
var version = "0.1.0";
|
|
4299
4303
|
|
|
4300
4304
|
// Inserts a box into the specified range.
|
|
4301
4305
|
function insertBox(range, boxName, boxValue) {
|
|
@@ -5261,7 +5265,6 @@ class Editor {
|
|
|
5261
5265
|
this.container.append(fragment);
|
|
5262
5266
|
if (!this.readonly) {
|
|
5263
5267
|
this.bindFocusEvents();
|
|
5264
|
-
this.focus();
|
|
5265
5268
|
this.selection.synByBookmark();
|
|
5266
5269
|
this.history.save();
|
|
5267
5270
|
Editor.plugin.loadAll(this);
|
|
@@ -5273,11 +5276,11 @@ class Editor {
|
|
|
5273
5276
|
if (!this.readonly) {
|
|
5274
5277
|
window.addEventListener('beforeunload', this.beforeunloadListener);
|
|
5275
5278
|
document.addEventListener('selectionchange', this.selectionchangeListener);
|
|
5279
|
+
document.addEventListener('click', this.clickListener);
|
|
5280
|
+
window.addEventListener('resize', this.resizeListener);
|
|
5276
5281
|
this.bindInputEvents();
|
|
5277
5282
|
this.bindHistoryEvents();
|
|
5278
5283
|
}
|
|
5279
|
-
document.addEventListener('click', this.clickListener);
|
|
5280
|
-
window.addEventListener('resize', this.resizeListener);
|
|
5281
5284
|
}
|
|
5282
5285
|
// Destroys a rendered editor.
|
|
5283
5286
|
unmount() {
|
|
@@ -5286,9 +5289,9 @@ class Editor {
|
|
|
5286
5289
|
if (!this.readonly) {
|
|
5287
5290
|
window.removeEventListener('beforeunload', this.beforeunloadListener);
|
|
5288
5291
|
document.removeEventListener('selectionchange', this.selectionchangeListener);
|
|
5292
|
+
document.removeEventListener('click', this.clickListener);
|
|
5293
|
+
window.removeEventListener('resize', this.resizeListener);
|
|
5289
5294
|
}
|
|
5290
|
-
document.removeEventListener('click', this.clickListener);
|
|
5291
|
-
window.removeEventListener('resize', this.resizeListener);
|
|
5292
5295
|
}
|
|
5293
5296
|
}
|
|
5294
5297
|
Editor.version = version;
|
|
@@ -6287,7 +6290,6 @@ const defaultItems = [
|
|
|
6287
6290
|
'redo',
|
|
6288
6291
|
'|',
|
|
6289
6292
|
'heading',
|
|
6290
|
-
'fontSize',
|
|
6291
6293
|
'|',
|
|
6292
6294
|
'formatPainter',
|
|
6293
6295
|
'removeFormat',
|
|
@@ -6721,8 +6723,10 @@ function openFullScreen(box) {
|
|
|
6721
6723
|
lightbox.on('openingAnimationEnd', () => {
|
|
6722
6724
|
box.event.emit('openfullscreen');
|
|
6723
6725
|
});
|
|
6724
|
-
lightbox.on('
|
|
6725
|
-
|
|
6726
|
+
lightbox.on('destroy', () => {
|
|
6727
|
+
window.setTimeout(() => {
|
|
6728
|
+
box.event.emit('closefullscreen');
|
|
6729
|
+
}, 0);
|
|
6726
6730
|
});
|
|
6727
6731
|
lightbox.init();
|
|
6728
6732
|
lightbox.loadAndOpen(currentIndex);
|
|
@@ -6954,10 +6958,15 @@ const imageBox = {
|
|
|
6954
6958
|
container.empty();
|
|
6955
6959
|
container.append(imageNode);
|
|
6956
6960
|
imageNode.find('.lake-button-view').on('click', () => openFullScreen(box));
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
+
if (editor.readonly) {
|
|
6962
|
+
imageNode.find('.lake-button-remove').hide();
|
|
6963
|
+
}
|
|
6964
|
+
else {
|
|
6965
|
+
imageNode.find('.lake-button-remove').on('click', event => {
|
|
6966
|
+
event.stopPropagation();
|
|
6967
|
+
removeImageBox(box);
|
|
6968
|
+
});
|
|
6969
|
+
}
|
|
6961
6970
|
box.event.emit('render');
|
|
6962
6971
|
});
|
|
6963
6972
|
imageNode.on('click', () => {
|
|
@@ -7459,11 +7468,24 @@ var heading = (editor) => {
|
|
|
7459
7468
|
});
|
|
7460
7469
|
};
|
|
7461
7470
|
|
|
7471
|
+
const typeList = [
|
|
7472
|
+
'info',
|
|
7473
|
+
'tip',
|
|
7474
|
+
'success',
|
|
7475
|
+
'warning',
|
|
7476
|
+
'error',
|
|
7477
|
+
'danger',
|
|
7478
|
+
];
|
|
7462
7479
|
var blockQuote = (editor) => {
|
|
7463
7480
|
editor.command.add('blockQuote', {
|
|
7464
7481
|
isSelected: appliedItems => !!appliedItems.find(item => item.name === 'blockquote'),
|
|
7465
|
-
execute: () => {
|
|
7466
|
-
|
|
7482
|
+
execute: (type) => {
|
|
7483
|
+
if (type && typeList.indexOf(type) >= 0) {
|
|
7484
|
+
editor.selection.setBlocks(safeTemplate `<blockquote type="${type}" />`);
|
|
7485
|
+
}
|
|
7486
|
+
else {
|
|
7487
|
+
editor.selection.setBlocks('<blockquote />');
|
|
7488
|
+
}
|
|
7467
7489
|
editor.history.save();
|
|
7468
7490
|
},
|
|
7469
7491
|
});
|
|
@@ -7828,9 +7850,9 @@ var removeFormat = (editor) => {
|
|
|
7828
7850
|
});
|
|
7829
7851
|
};
|
|
7830
7852
|
|
|
7831
|
-
let markList = [];
|
|
7832
7853
|
const formatPainterClassName = 'lake-format-painter';
|
|
7833
7854
|
var formatPainter = (editor) => {
|
|
7855
|
+
let markList = [];
|
|
7834
7856
|
editor.command.add('formatPainter', {
|
|
7835
7857
|
execute: () => {
|
|
7836
7858
|
editor.container.addClass(formatPainterClassName);
|
|
@@ -7855,7 +7877,7 @@ var formatPainter = (editor) => {
|
|
|
7855
7877
|
editor.history.save();
|
|
7856
7878
|
});
|
|
7857
7879
|
editor.event.on('click', (tagetNode) => {
|
|
7858
|
-
if (tagetNode.isInside) {
|
|
7880
|
+
if (tagetNode.isInside && tagetNode.closestContainer().get(0) === editor.container.get(0)) {
|
|
7859
7881
|
return;
|
|
7860
7882
|
}
|
|
7861
7883
|
const buttonNode = tagetNode.closest('button[name="formatPainter"]');
|
|
@@ -8125,7 +8147,9 @@ var link = (editor) => {
|
|
|
8125
8147
|
return;
|
|
8126
8148
|
}
|
|
8127
8149
|
if (linkNode.isOutside ||
|
|
8150
|
+
linkNode.closestContainer().get(0) !== editor.container.get(0) ||
|
|
8128
8151
|
linkNode.closest('lake-box').length > 0) {
|
|
8152
|
+
popup.hide();
|
|
8129
8153
|
return;
|
|
8130
8154
|
}
|
|
8131
8155
|
popup.show(linkNode);
|
|
@@ -8303,7 +8327,22 @@ const blockItemListForSpaceKey = [
|
|
|
8303
8327
|
];
|
|
8304
8328
|
const blockItemListForEnterKey = [
|
|
8305
8329
|
{
|
|
8306
|
-
re:
|
|
8330
|
+
re: /^:{3,}([a-z]*)$/i,
|
|
8331
|
+
getParameters: (results) => {
|
|
8332
|
+
if (!results[1]) {
|
|
8333
|
+
return [
|
|
8334
|
+
'blockQuote',
|
|
8335
|
+
'info',
|
|
8336
|
+
];
|
|
8337
|
+
}
|
|
8338
|
+
return [
|
|
8339
|
+
'blockQuote',
|
|
8340
|
+
results[1],
|
|
8341
|
+
];
|
|
8342
|
+
},
|
|
8343
|
+
},
|
|
8344
|
+
{
|
|
8345
|
+
re: /^-{3,}$/,
|
|
8307
8346
|
getParameters: () => [
|
|
8308
8347
|
'hr',
|
|
8309
8348
|
],
|