vditor 3.10.7 → 3.10.9

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 CHANGED
@@ -547,6 +547,7 @@ if (xhr.status === 200) {
547
547
  | unHlCommentIds(ids: string[]) | 取消评论高亮 |
548
548
  | removeCommentIds(removeIds: string[]) | 删除评论 |
549
549
  | updateToolbarConfig(config: {hide?: boolean, pin?: boolean}) | 更新工具栏配置 |
550
+ | insertEmptyBlock(position: InsertPosition) | 插入空快 |
550
551
 
551
552
  #### static methods
552
553
 
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vditor v3.10.7 - A markdown editor written in TypeScript.
2
+ * Vditor v3.10.9 - A markdown editor written in TypeScript.
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -25,7 +25,7 @@
25
25
  *
26
26
  */
27
27
  /*!
28
- * Vditor v3.10.7 - A markdown editor written in TypeScript.
28
+ * Vditor v3.10.9 - A markdown editor written in TypeScript.
29
29
  *
30
30
  * MIT License
31
31
  *
@@ -106,14 +106,6 @@
106
106
  * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
107
107
  * @version 0.1.0.0, Jan 25, 2019
108
108
  */
109
- @-webkit-keyframes tooltip-appear {
110
- from {
111
- opacity: 0;
112
- }
113
- to {
114
- opacity: 1;
115
- }
116
- }
117
109
  @keyframes tooltip-appear {
118
110
  from {
119
111
  opacity: 0;
@@ -171,14 +163,10 @@
171
163
  .vditor-tooltipped:focus::after {
172
164
  display: inline-block;
173
165
  text-decoration: none;
174
- -webkit-animation-name: tooltip-appear;
175
- animation-name: tooltip-appear;
176
- -webkit-animation-duration: 0.15s;
177
- animation-duration: 0.15s;
178
- -webkit-animation-fill-mode: forwards;
179
- animation-fill-mode: forwards;
180
- -webkit-animation-timing-function: ease-in;
181
- animation-timing-function: ease-in;
166
+ animation-name: tooltip-appear;
167
+ animation-duration: 0.15s;
168
+ animation-fill-mode: forwards;
169
+ animation-timing-function: ease-in;
182
170
  }
183
171
  .vditor-tooltipped__s::after,
184
172
  .vditor-tooltipped__se::after,
@@ -270,16 +258,6 @@
270
258
  * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
271
259
  * @version 1.0.0.0, Jan 22, 2020
272
260
  */
273
- @-webkit-keyframes scale-in {
274
- 0% {
275
- opacity: 0;
276
- transform: scale(0.5);
277
- }
278
- 100% {
279
- opacity: 1;
280
- transform: scale(1);
281
- }
282
- }
283
261
  @keyframes scale-in {
284
262
  0% {
285
263
  opacity: 0;
@@ -299,24 +277,18 @@
299
277
  z-index: 3;
300
278
  font-size: 14px;
301
279
  display: none;
302
- -webkit-user-select: none;
303
- -moz-user-select: none;
304
- -ms-user-select: none;
305
- user-select: none;
280
+ -moz-user-select: none;
281
+ user-select: none;
306
282
  max-width: 320px;
307
283
  min-width: 80px;
308
- -webkit-animation-duration: 0.15s;
309
- animation-duration: 0.15s;
310
- -webkit-animation-name: scale-in;
311
- animation-name: scale-in;
312
- -webkit-animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
313
- animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
284
+ animation-duration: 0.15s;
285
+ animation-name: scale-in;
286
+ animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
314
287
  color: var(--toolbar-icon-color);
315
288
  }
316
289
  .vditor-panel--none {
317
290
  padding: 0;
318
- -webkit-animation: none;
319
- animation: none;
291
+ animation: none;
320
292
  min-width: auto;
321
293
  max-width: none;
322
294
  white-space: nowrap;
@@ -384,7 +356,6 @@
384
356
  line-height: 1;
385
357
  }
386
358
  .vditor-toolbar--pin {
387
- position: -webkit-sticky;
388
359
  position: sticky;
389
360
  top: 0;
390
361
  z-index: 1;
@@ -529,15 +500,6 @@
529
500
  color: var(--toolbar-icon-hover-color);
530
501
  }
531
502
  }
532
- @-webkit-keyframes slideInDown {
533
- from {
534
- transform: translate3d(0, -100%, 0);
535
- visibility: visible;
536
- }
537
- to {
538
- transform: translate3d(0, 0, 0);
539
- }
540
- }
541
503
  @keyframes slideInDown {
542
504
  from {
543
505
  transform: translate3d(0, -100%, 0);
@@ -637,10 +599,8 @@
637
599
  background-color: var(--count-background-color);
638
600
  border-radius: 3px;
639
601
  font-size: 12px;
640
- -webkit-user-select: none;
641
- -moz-user-select: none;
642
- -ms-user-select: none;
643
- user-select: none;
602
+ -moz-user-select: none;
603
+ user-select: none;
644
604
  float: right;
645
605
  margin: 8px 3px 0 0;
646
606
  }
@@ -651,10 +611,8 @@
651
611
  .vditor-resize {
652
612
  padding: 3px 0;
653
613
  cursor: row-resize;
654
- -webkit-user-select: none;
655
- -moz-user-select: none;
656
- -ms-user-select: none;
657
- user-select: none;
614
+ -moz-user-select: none;
615
+ user-select: none;
658
616
  position: absolute;
659
617
  width: 100%;
660
618
  }
@@ -699,17 +657,14 @@
699
657
  position: absolute;
700
658
  font-size: 12px;
701
659
  top: 10px;
702
- -webkit-animation-duration: 0.15s;
703
- animation-duration: 0.15s;
704
- -webkit-animation-fill-mode: both;
705
- animation-fill-mode: both;
660
+ animation-duration: 0.15s;
661
+ animation-fill-mode: both;
706
662
  left: 50%;
707
663
  z-index: 5;
708
664
  }
709
665
  .vditor-tip--show {
710
666
  display: block;
711
- -webkit-animation-name: slideInDown;
712
- animation-name: slideInDown;
667
+ animation-name: slideInDown;
713
668
  }
714
669
  .vditor-tip__content {
715
670
  text-align: left;
@@ -767,10 +722,8 @@
767
722
  align-items: center;
768
723
  cursor: pointer;
769
724
  margin-left: 24px;
770
- -webkit-user-select: none;
771
- -moz-user-select: none;
772
- -ms-user-select: none;
773
- user-select: none;
725
+ -moz-user-select: none;
726
+ user-select: none;
774
727
  color: var(--toolbar-icon-color);
775
728
  }
776
729
  .vditor-img__btn:hover {
@@ -1061,6 +1014,11 @@
1061
1014
  outline: none;
1062
1015
  cursor: context-menu;
1063
1016
  }
1017
+ .vditor-reset .language-math .katex-display > .katex > .katex-html > .tag {
1018
+ display: inline-block;
1019
+ font-size: 1.21rem;
1020
+ right: 2px;
1021
+ }
1064
1022
  .vditor-reset .language-echarts,
1065
1023
  .vditor-reset .language-mindmap {
1066
1024
  overflow: hidden;
@@ -1161,10 +1119,8 @@
1161
1119
  left: 0;
1162
1120
  width: 3em;
1163
1121
  /* works for line-numbers below 1000 lines */
1164
- -webkit-user-select: none;
1165
- -moz-user-select: none;
1166
- -ms-user-select: none;
1167
- user-select: none;
1122
+ -moz-user-select: none;
1123
+ user-select: none;
1168
1124
  counter-reset: linenumber;
1169
1125
  }
1170
1126
  .vditor-linenumber__rows > span {
@@ -1293,10 +1249,8 @@
1293
1249
  }
1294
1250
  .vditor-toc {
1295
1251
  margin-bottom: 16px;
1296
- -webkit-user-select: text;
1297
- -moz-user-select: text;
1298
- -ms-user-select: text;
1299
- user-select: text;
1252
+ -moz-user-select: text;
1253
+ user-select: text;
1300
1254
  color: #4285f4;
1301
1255
  }
1302
1256
  .vditor-toc .vditor-outline__action {
package/dist/index.d.ts CHANGED
@@ -62,6 +62,8 @@ declare class Vditor extends VditorMethod {
62
62
  insertMD(md: string): void;
63
63
  /** 设置编辑器内容 */
64
64
  setValue(markdown: string, clearStack?: boolean): void;
65
+ /** 空块 */
66
+ insertEmptyBlock(position: InsertPosition): void;
65
67
  /** 清空 undo & redo 栈 */
66
68
  clearStack(): void;
67
69
  /** 销毁编辑器 */