vditor 3.11.2 → 4.0.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 +12 -1
- package/dist/css/content-theme/ant-design.css +10 -0
- package/dist/css/content-theme/dark.css +10 -0
- package/dist/css/content-theme/light.css +13 -0
- package/dist/css/content-theme/wechat.css +10 -0
- package/dist/index.css +163 -81
- package/dist/index.js +3035 -2715
- package/dist/index.min.js +1 -1
- package/dist/js/i18n/ja_JP.js +2 -2
- package/dist/js/i18n/zh_TW.js +8 -8
- package/dist/js/lute/lute.min.js +75 -60
- package/dist/js/mermaid/mermaid.min.js +2027 -1047
- package/dist/js/wavedrom/LICENSE.WaveDrom +21 -0
- package/dist/js/wavedrom/wavedrom.min.js +9 -0
- package/dist/method.d.ts +2 -0
- package/dist/method.js +323 -9
- package/dist/method.min.js +1 -1
- package/dist/ts/constants.d.ts +4 -0
- package/dist/ts/markdown/adapterRender.d.ts +4 -0
- package/dist/ts/markdown/imageCaptionRender.d.ts +2 -0
- package/dist/ts/markdown/wavedromRender.d.ts +1 -0
- package/dist/ts/sv/index.d.ts +1 -5
- package/dist/ts/sv/process.d.ts +1 -3
- package/dist/ts/upload/getElement.d.ts +1 -1
- package/dist/ts/upload/index.d.ts +2 -0
- package/dist/ts/util/editorCommonEvent.d.ts +1 -1
- package/dist/ts/util/fixBrowserBehavior.d.ts +1 -0
- package/dist/types/index.d.ts +22 -5
- package/package.json +7 -4
- package/src/assets/less/_reset.less +103 -2
- package/src/assets/less/_sv.less +2 -98
- package/src/assets/less/_wysiwyg.less +30 -0
- package/src/assets/less/index.less +20 -0
- package/src/index.ts +48 -14
- package/src/method.ts +3 -0
- package/src/ts/constants.ts +5 -1
- package/src/ts/export/index.ts +2 -0
- package/src/ts/hint/index.ts +9 -4
- package/src/ts/ir/highlightToolbarIR.ts +4 -4
- package/src/ts/ir/index.ts +26 -0
- package/src/ts/ir/process.ts +24 -1
- package/src/ts/markdown/adapterRender.ts +4 -0
- package/src/ts/markdown/getHTML.ts +6 -3
- package/src/ts/markdown/getMarkdown.ts +3 -3
- package/src/ts/markdown/imageCaptionRender.ts +175 -0
- package/src/ts/markdown/mermaidRender.ts +1 -1
- package/src/ts/markdown/previewRender.ts +7 -1
- package/src/ts/markdown/setLute.ts +3 -0
- package/src/ts/markdown/wavedromRender.ts +54 -0
- package/src/ts/preview/index.ts +5 -0
- package/src/ts/sv/index.ts +37 -76
- package/src/ts/sv/process.ts +48 -164
- package/src/ts/sv/processKeydown.ts +19 -186
- package/src/ts/toolbar/EditMode.ts +3 -10
- package/src/ts/toolbar/Emoji.ts +8 -1
- package/src/ts/toolbar/Record.ts +10 -2
- package/src/ts/toolbar/index.ts +3 -0
- package/src/ts/ui/initUI.ts +7 -3
- package/src/ts/undo/index.ts +32 -17
- package/src/ts/upload/index.ts +42 -10
- package/src/ts/util/Options.ts +1 -1
- package/src/ts/util/editorCommonEvent.ts +18 -9
- package/src/ts/util/fixBrowserBehavior.ts +197 -51
- package/src/ts/util/processCode.ts +3 -0
- package/src/ts/util/selection.ts +11 -3
- package/src/ts/wysiwyg/afterRenderEvent.ts +2 -0
- package/src/ts/wysiwyg/highlightToolbarWYSIWYG.ts +58 -2
- package/src/ts/wysiwyg/input.ts +5 -0
- package/src/ts/wysiwyg/processKeydown.ts +47 -0
- package/src/ts/wysiwyg/setHeading.ts +110 -6
- package/dist/ts/sv/combineFootnote.d.ts +0 -6
- package/dist/ts/sv/inputEvent.d.ts +0 -1
- package/src/ts/sv/combineFootnote.ts +0 -27
- package/src/ts/sv/inputEvent.ts +0 -188
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
<a href="https://github.com/Vanessa219/vditor/blob/master/README_en_US.md">English</a> | <a href="https://b3log.org/vditor/demo/index.html">Demo</a>
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
|
+
<p align="center">
|
|
24
|
+
🔥 欢迎观摩我们的另一个开源项目 <a href="https://github.com/siyuan-note/siyuan">思源笔记</a>
|
|
25
|
+
<p>
|
|
26
|
+
|
|
23
27
|
## 💡 简介
|
|
24
28
|
|
|
25
29
|
[Vditor](https://b3log.org/vditor) 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。它使用 TypeScript 实现,支持原生 JavaScript 以及 Vue、React、Angular 和 Svelte 等框架。
|
|
@@ -53,7 +57,7 @@ Vditor 在这些方面做了努力,希望能为现代化的通用 Markdown 编
|
|
|
53
57
|
## ✨ 特性
|
|
54
58
|
|
|
55
59
|
* 支持三种编辑模式:所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)
|
|
56
|
-
*
|
|
60
|
+
* 支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、数字波形图、五线谱、[多媒体](https://ld246.com/article/1589813914768)、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染、[plantuml](https://plantuml.com)UML图
|
|
57
61
|
* 导出、图片懒加载、任务列表、多平台预览、多主题切换、复制到微信公众号/知乎功能
|
|
58
62
|
* 实现 CommonMark 和 GFM 规范,可对 Markdown 进行格式化和语法树查看,并支持[10+项](https://ld246.com/article/1549638745630#options-preview-markdown)配置
|
|
59
63
|
* 工具栏包含 36+ 项操作,除支持扩展外还可对每一项中的[快捷键](https://ld246.com/article/1582778815353)、提示、提示位置、图标、点击事件、类名、子工具栏进行自定义
|
|
@@ -99,6 +103,7 @@ Vditor 在这些方面做了努力,希望能为现代化的通用 Markdown 编
|
|
|
99
103
|
* 图表语法
|
|
100
104
|
* 流程图、时序图、甘特图,通过 Mermaid 支持
|
|
101
105
|
* Graphviz
|
|
106
|
+
* 数字波形图,通过 WaveDrom 支持
|
|
102
107
|
* 折线图、饼图、脑图等,通过 ECharts 支持
|
|
103
108
|
* 五线谱:通过 abc.js 支持
|
|
104
109
|
* 数学公式:数学公式块、行级数学公式,通过 MathJax 和 KaTeX 支持
|
|
@@ -220,6 +225,7 @@ Markdown 输出的 HTML 所展现的外观。内置 ant-design, light,dark,w
|
|
|
220
225
|
| icon | 图标风格:ant, material | 'ant' |
|
|
221
226
|
| customRenders: {language: string, render: (element: HTMLElement, vditor: IVditor) => void}[] | 自定义渲染器 | [] |
|
|
222
227
|
| customWysiwygToolbar(type: TWYSISYGToolbar, element: HTMLElement): void | 对 wysiwyg 模式下的工具栏进行自定义 | - |
|
|
228
|
+
| customWysiwygMobileToolbar(type: TWYSISYGToolbar, element: HTMLElement): void | 对移动端 wysiwyg 模式下的工具栏进行自定义,未添加菜单项时不显示入口 | - |
|
|
223
229
|
|
|
224
230
|
#### options.toolbar
|
|
225
231
|
|
|
@@ -318,6 +324,7 @@ new Vditor('vditor', {
|
|
|
318
324
|
| | 说明 | 默认值 |
|
|
319
325
|
| - | - | - |
|
|
320
326
|
| autoSpace | 自动空格 | false |
|
|
327
|
+
| callout | Callout 块 | true |
|
|
321
328
|
| gfmAutoLink | 自动链接 | true |
|
|
322
329
|
| fixTermTypo | 自动矫正术语 | false |
|
|
323
330
|
| toc | 插入目录 | false |
|
|
@@ -330,6 +337,8 @@ new Vditor('vditor', {
|
|
|
330
337
|
| linkBase | 链接相对路径前缀 | '' |
|
|
331
338
|
| linkPrefix | 链接强制前缀 | '' |
|
|
332
339
|
| mark | 启用 mark 标记 | false |
|
|
340
|
+
| sup | 上标 | false |
|
|
341
|
+
| sub | 下标 | false |
|
|
333
342
|
|
|
334
343
|
#### options.preview.theme
|
|
335
344
|
|
|
@@ -614,6 +623,7 @@ options?: IPreviewOptions {
|
|
|
614
623
|
| mathRender(element: HTMLElement, options?: {cdn?: string, math?: IMath}) | 对数学公式进行渲染 |
|
|
615
624
|
| speechRender(element: HTMLElement, lang?: (keyof II18nLang)) | 对选中的文字进行阅读 |
|
|
616
625
|
| graphvizRender(element: HTMLElement, cdn?: string) | 对 graphviz 进行渲染 |
|
|
626
|
+
| wavedromRender(element: (HTMLElement \| Document) = document, cdn = options.cdn) | 对数字波形图进行渲染 |
|
|
617
627
|
| outlineRender(contentElement: HTMLElement, targetElement: Element) | 对大纲进行渲染 |
|
|
618
628
|
| lazyLoadImageRender(element: (HTMLElement \| Document) = document) | 对启用懒加载的图片进行渲染 |
|
|
619
629
|
| setCodeTheme(codeTheme: string, cdn = options.cdn) | 设置代码主题,codeTheme 参见 options.preview.hljs.style |
|
|
@@ -671,6 +681,7 @@ Vditor 使用 [MIT](https://opensource.org/licenses/MIT) 开源协议。
|
|
|
671
681
|
* [Lute](https://github.com/88250/lute):🎼 一款结构化的 Markdown 引擎,支持 Go 和 JavaScript
|
|
672
682
|
* [highlight.js](https://github.com/highlightjs/highlight.js):JavaScript syntax highlighter
|
|
673
683
|
* [mermaid](https://github.com/knsv/mermaid):Generation of diagram and flowchart from text in a similar manner as Markdown
|
|
684
|
+
* [WaveDrom](https://github.com/wavedrom/wavedrom):Digital timing diagram rendering engine
|
|
674
685
|
* [incubator-echarts](https://github.com/apache/incubator-echarts):A powerful, interactive charting and visualization library for browser
|
|
675
686
|
* [abcjs](https://github.com/paulrosen/abcjs):JavaScript library for rendering standard music notation in a browser
|
|
676
687
|
|
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
color: rgba(0, 0, 0, .85);
|
|
30
30
|
font-size: 14px;
|
|
31
31
|
line-height: 2;
|
|
32
|
+
--callout-note-color: #0969da;
|
|
33
|
+
--callout-note-background-color: rgba(9, 105, 218, 0.08);
|
|
34
|
+
--callout-tip-color: #1a7f37;
|
|
35
|
+
--callout-tip-background-color: rgba(26, 127, 55, 0.08);
|
|
36
|
+
--callout-important-color: #8250df;
|
|
37
|
+
--callout-important-background-color: rgba(130, 80, 223, 0.08);
|
|
38
|
+
--callout-warning-color: #9a6700;
|
|
39
|
+
--callout-warning-background-color: rgba(154, 103, 0, 0.08);
|
|
40
|
+
--callout-caution-color: #cf222e;
|
|
41
|
+
--callout-caution-background-color: rgba(207, 34, 46, 0.08);
|
|
32
42
|
}
|
|
33
43
|
|
|
34
44
|
.vditor-reset img {
|
|
@@ -26,6 +26,16 @@
|
|
|
26
26
|
*/
|
|
27
27
|
.vditor-reset {
|
|
28
28
|
color: #d1d5da;
|
|
29
|
+
--callout-note-color: #58a6ff;
|
|
30
|
+
--callout-note-background-color: rgba(56, 139, 253, 0.15);
|
|
31
|
+
--callout-tip-color: #3fb950;
|
|
32
|
+
--callout-tip-background-color: rgba(46, 160, 67, 0.15);
|
|
33
|
+
--callout-important-color: #a371f7;
|
|
34
|
+
--callout-important-background-color: rgba(163, 113, 247, 0.15);
|
|
35
|
+
--callout-warning-color: #d29922;
|
|
36
|
+
--callout-warning-background-color: rgba(187, 128, 9, 0.15);
|
|
37
|
+
--callout-caution-color: #f85149;
|
|
38
|
+
--callout-caution-background-color: rgba(248, 81, 73, 0.15);
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
.vditor-reset a, .vditor-ir__link {
|
|
@@ -24,6 +24,19 @@
|
|
|
24
24
|
* SOFTWARE.
|
|
25
25
|
*
|
|
26
26
|
*/
|
|
27
|
+
.vditor-reset {
|
|
28
|
+
--callout-note-color: #0969da;
|
|
29
|
+
--callout-note-background-color: rgba(9, 105, 218, 0.08);
|
|
30
|
+
--callout-tip-color: #1a7f37;
|
|
31
|
+
--callout-tip-background-color: rgba(26, 127, 55, 0.08);
|
|
32
|
+
--callout-important-color: #8250df;
|
|
33
|
+
--callout-important-background-color: rgba(130, 80, 223, 0.08);
|
|
34
|
+
--callout-warning-color: #9a6700;
|
|
35
|
+
--callout-warning-background-color: rgba(154, 103, 0, 0.08);
|
|
36
|
+
--callout-caution-color: #cf222e;
|
|
37
|
+
--callout-caution-background-color: rgba(207, 34, 46, 0.08);
|
|
38
|
+
}
|
|
39
|
+
|
|
27
40
|
.vditor-reset h1, .vditor-reset h2 {
|
|
28
41
|
padding-bottom: 0.3em;
|
|
29
42
|
border-bottom: 1px solid #eaecef;
|
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
.vditor-reset {
|
|
28
28
|
font-family: "mp-quote", -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols";
|
|
29
29
|
color: rgb(62, 62, 62);
|
|
30
|
+
--callout-note-color: #0969da;
|
|
31
|
+
--callout-note-background-color: rgba(9, 105, 218, 0.08);
|
|
32
|
+
--callout-tip-color: #1a7f37;
|
|
33
|
+
--callout-tip-background-color: rgba(26, 127, 55, 0.08);
|
|
34
|
+
--callout-important-color: #8250df;
|
|
35
|
+
--callout-important-background-color: rgba(130, 80, 223, 0.08);
|
|
36
|
+
--callout-warning-color: #9a6700;
|
|
37
|
+
--callout-warning-background-color: rgba(154, 103, 0, 0.08);
|
|
38
|
+
--callout-caution-color: #cf222e;
|
|
39
|
+
--callout-caution-background-color: rgba(207, 34, 46, 0.08);
|
|
30
40
|
}
|
|
31
41
|
|
|
32
42
|
.vditor-reset a, .vditor-ir__link {
|
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor
|
|
2
|
+
* Vditor v4.0.0 - 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
|
|
28
|
+
* Vditor v4.0.0 - A markdown editor written in TypeScript.
|
|
29
29
|
*
|
|
30
30
|
* MIT License
|
|
31
31
|
*
|
|
@@ -69,6 +69,16 @@
|
|
|
69
69
|
--count-background-color: rgba(27, 31, 35, 0.05);
|
|
70
70
|
--heading-border-color: #eaecef;
|
|
71
71
|
--blockquote-color: #6a737d;
|
|
72
|
+
--callout-note-color: #0969da;
|
|
73
|
+
--callout-note-background-color: rgba(9, 105, 218, 0.08);
|
|
74
|
+
--callout-tip-color: #1a7f37;
|
|
75
|
+
--callout-tip-background-color: rgba(26, 127, 55, 0.08);
|
|
76
|
+
--callout-important-color: #8250df;
|
|
77
|
+
--callout-important-background-color: rgba(130, 80, 223, 0.08);
|
|
78
|
+
--callout-warning-color: #9a6700;
|
|
79
|
+
--callout-warning-background-color: rgba(154, 103, 0, 0.08);
|
|
80
|
+
--callout-caution-color: #cf222e;
|
|
81
|
+
--callout-caution-background-color: rgba(207, 34, 46, 0.08);
|
|
72
82
|
--ir-heading-color: #660e7a;
|
|
73
83
|
--ir-title-color: #808080;
|
|
74
84
|
--ir-bi-color: #0033b3;
|
|
@@ -93,6 +103,16 @@
|
|
|
93
103
|
--count-background-color: rgba(66, 133, 244, 0.36);
|
|
94
104
|
--heading-border-color: var(--textarea-text-color);
|
|
95
105
|
--blockquote-color: var(--toolbar-icon-color);
|
|
106
|
+
--callout-note-color: #58a6ff;
|
|
107
|
+
--callout-note-background-color: rgba(56, 139, 253, 0.15);
|
|
108
|
+
--callout-tip-color: #3fb950;
|
|
109
|
+
--callout-tip-background-color: rgba(46, 160, 67, 0.15);
|
|
110
|
+
--callout-important-color: #a371f7;
|
|
111
|
+
--callout-important-background-color: rgba(163, 113, 247, 0.15);
|
|
112
|
+
--callout-warning-color: #d29922;
|
|
113
|
+
--callout-warning-background-color: rgba(187, 128, 9, 0.15);
|
|
114
|
+
--callout-caution-color: #f85149;
|
|
115
|
+
--callout-caution-background-color: rgba(248, 81, 73, 0.15);
|
|
96
116
|
--ir-heading-color: #9876aa;
|
|
97
117
|
--ir-title-color: #808080;
|
|
98
118
|
--ir-bi-color: #cc7832;
|
|
@@ -866,6 +886,31 @@
|
|
|
866
886
|
max-width: 20px;
|
|
867
887
|
vertical-align: sub;
|
|
868
888
|
}
|
|
889
|
+
.vditor-reset figure.vditor-image {
|
|
890
|
+
margin: 0 0 16px;
|
|
891
|
+
text-align: center;
|
|
892
|
+
}
|
|
893
|
+
.vditor-reset figure.vditor-image figcaption {
|
|
894
|
+
font-size: 0.875em;
|
|
895
|
+
margin-top: 4px;
|
|
896
|
+
opacity: 0.65;
|
|
897
|
+
white-space: pre-wrap;
|
|
898
|
+
}
|
|
899
|
+
.vditor-reset span.vditor-image[data-image-caption] {
|
|
900
|
+
display: inline-block;
|
|
901
|
+
max-width: 100%;
|
|
902
|
+
text-align: center;
|
|
903
|
+
vertical-align: top;
|
|
904
|
+
}
|
|
905
|
+
.vditor-reset span.vditor-image[data-image-caption]::after {
|
|
906
|
+
content: attr(data-image-caption);
|
|
907
|
+
display: block;
|
|
908
|
+
font-size: 0.875em;
|
|
909
|
+
line-height: 1.5;
|
|
910
|
+
margin-top: 4px;
|
|
911
|
+
opacity: 0.65;
|
|
912
|
+
white-space: pre-wrap;
|
|
913
|
+
}
|
|
869
914
|
.vditor-reset h1,
|
|
870
915
|
.vditor-reset h2,
|
|
871
916
|
.vditor-reset h3,
|
|
@@ -1011,7 +1056,8 @@
|
|
|
1011
1056
|
.vditor-reset .language-markmap,
|
|
1012
1057
|
.vditor-reset .language-abc,
|
|
1013
1058
|
.vditor-reset .language-flowchart,
|
|
1014
|
-
.vditor-reset .language-graphviz
|
|
1059
|
+
.vditor-reset .language-graphviz,
|
|
1060
|
+
.vditor-reset .language-wavedrom {
|
|
1015
1061
|
margin-bottom: 16px;
|
|
1016
1062
|
}
|
|
1017
1063
|
.vditor-reset .language-math mjx-container:focus {
|
|
@@ -1031,7 +1077,8 @@
|
|
|
1031
1077
|
.vditor-reset .language-mermaid,
|
|
1032
1078
|
.vditor-reset .language-markmap,
|
|
1033
1079
|
.vditor-reset .language-flowchart,
|
|
1034
|
-
.vditor-reset .language-graphviz
|
|
1080
|
+
.vditor-reset .language-graphviz,
|
|
1081
|
+
.vditor-reset .language-wavedrom {
|
|
1035
1082
|
text-align: center;
|
|
1036
1083
|
}
|
|
1037
1084
|
.vditor-reset .language-graphviz parsererror {
|
|
@@ -1333,6 +1380,88 @@
|
|
|
1333
1380
|
.vditor-outline__action--close {
|
|
1334
1381
|
transform: rotate(-90deg);
|
|
1335
1382
|
}
|
|
1383
|
+
.vditor-reset .callout,
|
|
1384
|
+
.vditor-wysiwyg blockquote.callout,
|
|
1385
|
+
.vditor-ir blockquote.callout {
|
|
1386
|
+
--callout-color: var(--callout-note-color, #0969da);
|
|
1387
|
+
--callout-background-color: var(--callout-note-background-color, rgba(9, 105, 218, 0.08));
|
|
1388
|
+
position: relative;
|
|
1389
|
+
margin: 0 0 16px;
|
|
1390
|
+
padding: 0.75em 1em;
|
|
1391
|
+
color: inherit;
|
|
1392
|
+
background-color: var(--callout-background-color);
|
|
1393
|
+
border: 0;
|
|
1394
|
+
border-left: 0.25em solid var(--callout-color);
|
|
1395
|
+
}
|
|
1396
|
+
.vditor-reset .callout[data-subtype="TIP"],
|
|
1397
|
+
.vditor-wysiwyg blockquote.callout[data-subtype="TIP"],
|
|
1398
|
+
.vditor-ir blockquote.callout[data-subtype="TIP"] {
|
|
1399
|
+
--callout-color: var(--callout-tip-color, #1a7f37);
|
|
1400
|
+
--callout-background-color: var(--callout-tip-background-color, rgba(26, 127, 55, 0.08));
|
|
1401
|
+
}
|
|
1402
|
+
.vditor-reset .callout[data-subtype="IMPORTANT"],
|
|
1403
|
+
.vditor-wysiwyg blockquote.callout[data-subtype="IMPORTANT"],
|
|
1404
|
+
.vditor-ir blockquote.callout[data-subtype="IMPORTANT"] {
|
|
1405
|
+
--callout-color: var(--callout-important-color, #8250df);
|
|
1406
|
+
--callout-background-color: var(--callout-important-background-color, rgba(130, 80, 223, 0.08));
|
|
1407
|
+
}
|
|
1408
|
+
.vditor-reset .callout[data-subtype="WARNING"],
|
|
1409
|
+
.vditor-wysiwyg blockquote.callout[data-subtype="WARNING"],
|
|
1410
|
+
.vditor-ir blockquote.callout[data-subtype="WARNING"] {
|
|
1411
|
+
--callout-color: var(--callout-warning-color, #9a6700);
|
|
1412
|
+
--callout-background-color: var(--callout-warning-background-color, rgba(154, 103, 0, 0.08));
|
|
1413
|
+
}
|
|
1414
|
+
.vditor-reset .callout[data-subtype="CAUTION"],
|
|
1415
|
+
.vditor-wysiwyg blockquote.callout[data-subtype="CAUTION"],
|
|
1416
|
+
.vditor-ir blockquote.callout[data-subtype="CAUTION"] {
|
|
1417
|
+
--callout-color: var(--callout-caution-color, #cf222e);
|
|
1418
|
+
--callout-background-color: var(--callout-caution-background-color, rgba(207, 34, 46, 0.08));
|
|
1419
|
+
}
|
|
1420
|
+
.vditor-reset .callout > .callout-info,
|
|
1421
|
+
.vditor-wysiwyg blockquote.callout > .callout-info,
|
|
1422
|
+
.vditor-ir blockquote.callout > .callout-info {
|
|
1423
|
+
display: flex;
|
|
1424
|
+
align-items: center;
|
|
1425
|
+
min-height: 1.5em;
|
|
1426
|
+
margin: 0 0 0.5em;
|
|
1427
|
+
color: var(--callout-color);
|
|
1428
|
+
font-weight: 600;
|
|
1429
|
+
}
|
|
1430
|
+
.vditor-reset .callout > .callout-info .callout-icon,
|
|
1431
|
+
.vditor-wysiwyg blockquote.callout > .callout-info .callout-icon,
|
|
1432
|
+
.vditor-ir blockquote.callout > .callout-info .callout-icon {
|
|
1433
|
+
display: inline-flex;
|
|
1434
|
+
align-items: center;
|
|
1435
|
+
margin-right: 0.35em;
|
|
1436
|
+
}
|
|
1437
|
+
.vditor-reset .callout > .callout-info .callout-title,
|
|
1438
|
+
.vditor-wysiwyg blockquote.callout > .callout-info .callout-title,
|
|
1439
|
+
.vditor-ir blockquote.callout > .callout-info .callout-title {
|
|
1440
|
+
min-width: 1px;
|
|
1441
|
+
}
|
|
1442
|
+
.vditor-reset .callout > .callout-info .callout-img,
|
|
1443
|
+
.vditor-wysiwyg blockquote.callout > .callout-info .callout-img,
|
|
1444
|
+
.vditor-ir blockquote.callout > .callout-info .callout-img,
|
|
1445
|
+
.vditor-reset .callout > .callout-info > .callout-img,
|
|
1446
|
+
.vditor-wysiwyg blockquote.callout > .callout-info > .callout-img,
|
|
1447
|
+
.vditor-ir blockquote.callout > .callout-info > .callout-img {
|
|
1448
|
+
width: 1.2em;
|
|
1449
|
+
height: 1.2em;
|
|
1450
|
+
margin-right: 0.35em;
|
|
1451
|
+
-o-object-fit: contain;
|
|
1452
|
+
object-fit: contain;
|
|
1453
|
+
}
|
|
1454
|
+
.vditor-reset .callout > .callout-content > :last-child,
|
|
1455
|
+
.vditor-wysiwyg blockquote.callout > .callout-content > :last-child,
|
|
1456
|
+
.vditor-ir blockquote.callout > .callout-content > :last-child,
|
|
1457
|
+
.vditor-reset .callout > :last-child,
|
|
1458
|
+
.vditor-wysiwyg blockquote.callout > :last-child,
|
|
1459
|
+
.vditor-ir blockquote.callout > :last-child {
|
|
1460
|
+
margin-bottom: 0;
|
|
1461
|
+
}
|
|
1462
|
+
.vditor-wysiwyg__callout-marker {
|
|
1463
|
+
display: none;
|
|
1464
|
+
}
|
|
1336
1465
|
.vditor-wysiwyg {
|
|
1337
1466
|
box-sizing: border-box;
|
|
1338
1467
|
flex: 1;
|
|
@@ -1477,7 +1606,32 @@
|
|
|
1477
1606
|
.vditor-wysiwyg div[data-type="link-ref-defs-block"] {
|
|
1478
1607
|
color: var(--blockquote-color);
|
|
1479
1608
|
}
|
|
1609
|
+
.vditor-wysiwyg__mobile-toolbar {
|
|
1610
|
+
display: none;
|
|
1611
|
+
}
|
|
1480
1612
|
@media screen and (max-width: 520px) {
|
|
1613
|
+
.vditor-wysiwyg__mobile-toolbar {
|
|
1614
|
+
display: block;
|
|
1615
|
+
float: left;
|
|
1616
|
+
height: 21px;
|
|
1617
|
+
position: relative;
|
|
1618
|
+
width: 23px;
|
|
1619
|
+
}
|
|
1620
|
+
.vditor-wysiwyg__mobile-actions {
|
|
1621
|
+
box-sizing: border-box;
|
|
1622
|
+
flex-wrap: wrap;
|
|
1623
|
+
left: 0;
|
|
1624
|
+
padding: 5px;
|
|
1625
|
+
top: 26px;
|
|
1626
|
+
white-space: normal;
|
|
1627
|
+
}
|
|
1628
|
+
.vditor-wysiwyg__mobile-actions.vditor-panel--left {
|
|
1629
|
+
left: auto;
|
|
1630
|
+
right: 0;
|
|
1631
|
+
}
|
|
1632
|
+
.vditor-wysiwyg__mobile-actions--open {
|
|
1633
|
+
display: flex;
|
|
1634
|
+
}
|
|
1481
1635
|
.vditor-wysiwyg h1:before,
|
|
1482
1636
|
.vditor-wysiwyg h2:before,
|
|
1483
1637
|
.vditor-wysiwyg h3:before,
|
|
@@ -1735,89 +1889,17 @@
|
|
|
1735
1889
|
word-break: break-word;
|
|
1736
1890
|
word-wrap: break-word;
|
|
1737
1891
|
}
|
|
1738
|
-
.vditor-sv
|
|
1892
|
+
.vditor-sv:disabled {
|
|
1739
1893
|
opacity: 0.3;
|
|
1740
1894
|
cursor: not-allowed;
|
|
1741
1895
|
}
|
|
1742
|
-
.vditor-sv
|
|
1743
|
-
content: attr(placeholder);
|
|
1896
|
+
.vditor-sv::-moz-placeholder {
|
|
1744
1897
|
color: var(--second-color);
|
|
1745
1898
|
}
|
|
1746
|
-
.vditor-sv
|
|
1747
|
-
background-color: var(--textarea-background-color);
|
|
1748
|
-
}
|
|
1749
|
-
.vditor-sv:after {
|
|
1750
|
-
content: "";
|
|
1751
|
-
height: var(--editor-bottom);
|
|
1752
|
-
display: block;
|
|
1753
|
-
}
|
|
1754
|
-
.vditor-sv span[data-type="newline"] + span[data-type="text"]:empty {
|
|
1755
|
-
display: inherit;
|
|
1756
|
-
}
|
|
1757
|
-
.vditor-sv .sup {
|
|
1758
|
-
vertical-align: super;
|
|
1759
|
-
font-size: smaller;
|
|
1760
|
-
}
|
|
1761
|
-
.vditor-sv .strong {
|
|
1762
|
-
font-weight: bold;
|
|
1763
|
-
}
|
|
1764
|
-
.vditor-sv .em {
|
|
1765
|
-
font-style: italic;
|
|
1766
|
-
}
|
|
1767
|
-
.vditor-sv .s {
|
|
1768
|
-
text-decoration: line-through;
|
|
1769
|
-
}
|
|
1770
|
-
.vditor-sv .mark:not(.vditor-sv__marker) {
|
|
1771
|
-
background-color: yellow;
|
|
1772
|
-
color: black;
|
|
1773
|
-
}
|
|
1774
|
-
.vditor-sv .h1 {
|
|
1775
|
-
font-size: 1.75em;
|
|
1776
|
-
line-height: 44px;
|
|
1777
|
-
}
|
|
1778
|
-
.vditor-sv .h2 {
|
|
1779
|
-
font-size: 1.55em;
|
|
1780
|
-
line-height: 38px;
|
|
1781
|
-
}
|
|
1782
|
-
.vditor-sv .h3 {
|
|
1783
|
-
font-size: 1.38em;
|
|
1784
|
-
line-height: 27px;
|
|
1785
|
-
}
|
|
1786
|
-
.vditor-sv .h4 {
|
|
1787
|
-
font-size: 1.25em;
|
|
1788
|
-
line-height: 25px;
|
|
1789
|
-
}
|
|
1790
|
-
.vditor-sv .h5 {
|
|
1791
|
-
font-size: 1.13em;
|
|
1792
|
-
}
|
|
1793
|
-
.vditor-sv .h6 {
|
|
1794
|
-
font-size: 1em;
|
|
1795
|
-
}
|
|
1796
|
-
.vditor-sv__marker {
|
|
1899
|
+
.vditor-sv::placeholder {
|
|
1797
1900
|
color: var(--second-color);
|
|
1798
1901
|
}
|
|
1799
|
-
.vditor-
|
|
1800
|
-
color: var(--
|
|
1801
|
-
}
|
|
1802
|
-
.vditor-sv__marker--bi {
|
|
1803
|
-
color: var(--ir-bi-color);
|
|
1804
|
-
}
|
|
1805
|
-
.vditor-sv__marker--link {
|
|
1806
|
-
color: var(--ir-link-color);
|
|
1807
|
-
}
|
|
1808
|
-
.vditor-sv__marker--title {
|
|
1809
|
-
color: var(--ir-title-color);
|
|
1810
|
-
}
|
|
1811
|
-
.vditor-sv__marker--bracket {
|
|
1812
|
-
color: var(--ir-bracket-color);
|
|
1813
|
-
}
|
|
1814
|
-
.vditor-sv__marker--paren {
|
|
1815
|
-
color: var(--ir-paren-color);
|
|
1816
|
-
}
|
|
1817
|
-
.vditor-sv__marker--info {
|
|
1818
|
-
color: var(--ir-heading-color);
|
|
1819
|
-
}
|
|
1820
|
-
.vditor-sv__marker--strong {
|
|
1821
|
-
font-weight: bold;
|
|
1902
|
+
.vditor-sv:focus {
|
|
1903
|
+
background-color: var(--textarea-background-color);
|
|
1822
1904
|
}
|
|
1823
1905
|
|