@hailin-zheng/editor-core 2.2.2 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/editor.css +96 -12
- package/index-cjs.d.ts +1 -0
- package/index-cjs.js +757 -278
- package/index-cjs.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +752 -278
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +37 -5
- package/med_editor/framework/document-change.d.ts +21 -2
- package/med_editor/framework/document-context.d.ts +5 -0
- package/med_editor/framework/document-input-cursor.d.ts +4 -15
- package/med_editor/framework/element-define.d.ts +7 -0
- package/med_editor/framework/element-event-define.d.ts +2 -5
- package/med_editor/framework/element-type-handler.d.ts +0 -1
- package/med_editor/framework/impl/data-element/data-container-impl.d.ts +25 -0
- package/med_editor/framework/impl/document/doc-body-impl.d.ts +0 -1
- package/med_editor/framework/impl/document/doc-impl.d.ts +1 -0
- package/med_editor/framework/impl/index.d.ts +1 -0
- package/med_editor/framework/impl/table/table-split-cell.d.ts +3 -2
- package/med_editor/framework/infrastructure/event-subject.d.ts +1 -0
- package/med_editor/framework/selection/document-selection.d.ts +1 -6
- package/med_editor/framework/suggestions/input-suggestions.d.ts +29 -0
- package/med_editor/framework/util/common-util.d.ts +1 -1
- package/package.json +1 -1
package/editor.css
CHANGED
@@ -176,6 +176,7 @@
|
|
176
176
|
border: #c9e2f9;
|
177
177
|
background: #c9e2f9;
|
178
178
|
}
|
179
|
+
|
179
180
|
/* 样式化 radio box 的外观 */
|
180
181
|
.editor-list-radiobox {
|
181
182
|
width: 16px;
|
@@ -186,6 +187,7 @@
|
|
186
187
|
display: inline-block;
|
187
188
|
position: relative;
|
188
189
|
}
|
190
|
+
|
189
191
|
/* 选中状态的样式 */
|
190
192
|
.editor-list-radiobox.checked::after {
|
191
193
|
content: "";
|
@@ -198,6 +200,7 @@
|
|
198
200
|
left: 50%;
|
199
201
|
transform: translate(-50%, -50%);
|
200
202
|
}
|
203
|
+
|
201
204
|
/* 样式化 checkbox 的外观 */
|
202
205
|
.editor-list-checkbox {
|
203
206
|
width: 16px;
|
@@ -205,6 +208,7 @@
|
|
205
208
|
border: 1px solid #000;
|
206
209
|
cursor: pointer;
|
207
210
|
}
|
211
|
+
|
208
212
|
/* 选中状态的样式 */
|
209
213
|
.editor-list-checkbox.checked::after {
|
210
214
|
content: "✔";
|
@@ -255,10 +259,11 @@
|
|
255
259
|
color: #c0c0c0;
|
256
260
|
padding-right: 10px;
|
257
261
|
}
|
258
|
-
|
262
|
+
|
263
|
+
.tg-container > .bg {
|
259
264
|
position: absolute;
|
260
265
|
left: 0;
|
261
|
-
top:0;
|
266
|
+
top: 0;
|
262
267
|
width: 4px;
|
263
268
|
height: 100%;
|
264
269
|
}
|
@@ -372,7 +377,8 @@
|
|
372
377
|
.editor-calendar-body-day-item:hover {
|
373
378
|
background-color: #ccc;
|
374
379
|
}
|
375
|
-
|
380
|
+
|
381
|
+
.editor-calendar-footer {
|
376
382
|
display: flex;
|
377
383
|
justify-content: space-between;
|
378
384
|
}
|
@@ -398,7 +404,8 @@
|
|
398
404
|
.editor-calendar-footer-right-btn:active {
|
399
405
|
outline: 1px solid rgb(95, 19, 216);
|
400
406
|
}
|
401
|
-
|
407
|
+
|
408
|
+
.invert {
|
402
409
|
filter: invert(100%);
|
403
410
|
}
|
404
411
|
|
@@ -515,30 +522,51 @@
|
|
515
522
|
text-align: center;
|
516
523
|
}
|
517
524
|
|
518
|
-
.editor-contextmenu{
|
525
|
+
.editor-contextmenu {
|
519
526
|
z-index: 1000;
|
520
527
|
position: absolute;
|
521
528
|
background: white;
|
522
529
|
box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
|
523
530
|
}
|
531
|
+
|
524
532
|
.editor-overlays-menus {
|
525
533
|
font-size: 14px;
|
526
|
-
font-family: "
|
534
|
+
font-family: "宋体", serif;
|
527
535
|
margin: 0;
|
528
536
|
cursor: pointer;
|
529
537
|
padding: 0;
|
530
538
|
list-style: none;
|
531
539
|
user-select: none;
|
532
540
|
}
|
541
|
+
|
533
542
|
.editor-overlays-menus {
|
534
543
|
padding: 3px;
|
535
544
|
}
|
545
|
+
|
536
546
|
.editor-overlays-menus > li {
|
537
|
-
padding:
|
547
|
+
padding: 8px 12px;
|
538
548
|
display: flex;
|
549
|
+
gap: 6px;
|
539
550
|
align-items: center;
|
540
551
|
word-break: keep-all;
|
541
552
|
border-bottom: 1px solid #ccc; /* 在每个列表项的底部添加一条边框线 */
|
553
|
+
position: relative;
|
554
|
+
}
|
555
|
+
.editor-overlays-menus > li >ul{
|
556
|
+
display: none;
|
557
|
+
position: absolute;
|
558
|
+
left: calc(100% + 5px);
|
559
|
+
top: 0;
|
560
|
+
z-index: 1;
|
561
|
+
background: #fff;
|
562
|
+
box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
|
563
|
+
}
|
564
|
+
.editor-overlays-menus .sub:after{
|
565
|
+
content:'▸';
|
566
|
+
margin-left: auto;
|
567
|
+
}
|
568
|
+
.editor-overlays-menus > li:hover >ul{
|
569
|
+
display: block;
|
542
570
|
}
|
543
571
|
|
544
572
|
.editor-overlays-menus > li:hover {
|
@@ -552,7 +580,7 @@
|
|
552
580
|
/*.scale-container > *{*/
|
553
581
|
/* transform-origin: center top;*/
|
554
582
|
/*}*/
|
555
|
-
.doc-rule{
|
583
|
+
.doc-rule {
|
556
584
|
position: absolute;
|
557
585
|
font-size: 0;
|
558
586
|
background: white;
|
@@ -561,10 +589,12 @@
|
|
561
589
|
left: 0;
|
562
590
|
top: 0;
|
563
591
|
}
|
564
|
-
|
592
|
+
|
593
|
+
.editor-calendar-footer-left {
|
565
594
|
display: flex;
|
566
595
|
}
|
567
|
-
|
596
|
+
|
597
|
+
.editor-calendar-footer-left-time {
|
568
598
|
outline: none;
|
569
599
|
width: 110px;
|
570
600
|
text-align: center;
|
@@ -572,7 +602,8 @@
|
|
572
602
|
margin: 0;
|
573
603
|
font-size: 14px;
|
574
604
|
}
|
575
|
-
|
605
|
+
|
606
|
+
.editor-input-cursor {
|
576
607
|
position: absolute;
|
577
608
|
width: 1.6px;
|
578
609
|
padding: 0;
|
@@ -583,6 +614,7 @@
|
|
583
614
|
opacity: 0;
|
584
615
|
animation: editor-cursor-blink 1s infinite steps(1, start);
|
585
616
|
}
|
617
|
+
|
586
618
|
@keyframes editor-cursor-blink {
|
587
619
|
0% {
|
588
620
|
opacity: 1;
|
@@ -594,6 +626,7 @@
|
|
594
626
|
opacity: 1;
|
595
627
|
}
|
596
628
|
}
|
629
|
+
|
597
630
|
.doc-triangle {
|
598
631
|
position: absolute;
|
599
632
|
width: 0;
|
@@ -602,9 +635,60 @@
|
|
602
635
|
border-right: 5px solid transparent;
|
603
636
|
border-bottom: 10px solid red; /* 修改颜色 */
|
604
637
|
}
|
605
|
-
|
638
|
+
|
639
|
+
.doc-triangle-line {
|
606
640
|
position: absolute;
|
607
641
|
height: 1px;
|
608
642
|
background: red;
|
609
643
|
transform-origin: top left
|
610
644
|
}
|
645
|
+
|
646
|
+
.data-list-container {
|
647
|
+
min-width: 100px;
|
648
|
+
background-color: white;
|
649
|
+
z-index: 1000;
|
650
|
+
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
|
651
|
+
user-select: none;
|
652
|
+
}
|
653
|
+
.editor-suggestions-container{
|
654
|
+
z-index: 1000;
|
655
|
+
position: absolute;
|
656
|
+
background: white;
|
657
|
+
box-shadow: rgba(158, 161, 165, 0.4) 0px 2px 12px 0px;
|
658
|
+
max-height: 300px;
|
659
|
+
overflow: auto;
|
660
|
+
}
|
661
|
+
|
662
|
+
.editor-suggestions {
|
663
|
+
font-size: 14px;
|
664
|
+
font-family: "宋体", serif;
|
665
|
+
margin: 0;
|
666
|
+
cursor: pointer;
|
667
|
+
padding: 0;
|
668
|
+
list-style: none;
|
669
|
+
user-select: none;
|
670
|
+
}
|
671
|
+
|
672
|
+
.editor-suggestions {
|
673
|
+
padding: 3px;
|
674
|
+
}
|
675
|
+
|
676
|
+
.editor-suggestions > li {
|
677
|
+
padding: 8px 12px;
|
678
|
+
display: flex;
|
679
|
+
gap: 6px;
|
680
|
+
align-items: center;
|
681
|
+
word-break: keep-all;
|
682
|
+
border-bottom: 1px solid #ccc; /* 在每个列表项的底部添加一条边框线 */
|
683
|
+
position: relative;
|
684
|
+
}
|
685
|
+
|
686
|
+
.editor-suggestions > li:hover {
|
687
|
+
background-color: #eee;
|
688
|
+
}
|
689
|
+
.editor-suggestions > li.hovered{
|
690
|
+
background-color: #ccc;
|
691
|
+
}
|
692
|
+
.editor-suggestions > li:last-child {
|
693
|
+
border-bottom: none; /* 去掉最后一个列表项的底部边框线 */
|
694
|
+
}
|
package/index-cjs.d.ts
CHANGED
@@ -29,3 +29,4 @@ export * from './med_editor/framework/selection/selection-overlays';
|
|
29
29
|
export * from './med_editor/framework/infrastructure/event-subject';
|
30
30
|
export * from './med_editor/framework/element-type-handler';
|
31
31
|
export * from './med_editor/framework/impl';
|
32
|
+
export * from './med_editor/framework/suggestions/input-suggestions';
|