Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lockfileVersion": 1,
"dependencies": {
"vditor": "3.9.9"
"vditor": "3.11.2"
}
}
110 changes: 49 additions & 61 deletions src/main/resources/vditor/dist/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
/*!
* Vditor v3.9.9 - A markdown editor written in TypeScript.
* Vditor v3.11.2 - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2018-present B3log 开源, b3log.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
/*!
* Vditor v3.11.2 - A markdown editor written in TypeScript.
*
* MIT License
*
Expand Down Expand Up @@ -80,14 +106,6 @@
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Jan 25, 2019
*/
@-webkit-keyframes tooltip-appear {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes tooltip-appear {
from {
opacity: 0;
Expand Down Expand Up @@ -145,14 +163,10 @@
.vditor-tooltipped:focus::after {
display: inline-block;
text-decoration: none;
-webkit-animation-name: tooltip-appear;
animation-name: tooltip-appear;
-webkit-animation-duration: 0.15s;
animation-duration: 0.15s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
animation-name: tooltip-appear;
animation-duration: 0.15s;
animation-fill-mode: forwards;
animation-timing-function: ease-in;
}
.vditor-tooltipped__s::after,
.vditor-tooltipped__se::after,
Expand Down Expand Up @@ -244,16 +258,6 @@
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.0.0.0, Jan 22, 2020
*/
@-webkit-keyframes scale-in {
0% {
opacity: 0;
transform: scale(0.5);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes scale-in {
0% {
opacity: 0;
Expand All @@ -275,22 +279,17 @@
display: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
max-width: 320px;
min-width: 80px;
-webkit-animation-duration: 0.15s;
animation-duration: 0.15s;
-webkit-animation-name: scale-in;
animation-name: scale-in;
-webkit-animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
animation-duration: 0.15s;
animation-name: scale-in;
animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
color: var(--toolbar-icon-color);
}
.vditor-panel--none {
padding: 0;
-webkit-animation: none;
animation: none;
animation: none;
min-width: auto;
max-width: none;
white-space: nowrap;
Expand Down Expand Up @@ -358,7 +357,6 @@
line-height: 1;
}
.vditor-toolbar--pin {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 1;
Expand Down Expand Up @@ -503,15 +501,6 @@
color: var(--toolbar-icon-hover-color);
}
}
@-webkit-keyframes slideInDown {
from {
transform: translate3d(0, -100%, 0);
visibility: visible;
}
to {
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInDown {
from {
transform: translate3d(0, -100%, 0);
Expand All @@ -529,9 +518,6 @@
box-sizing: border-box;
font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols";
}
.vditor .vditor-copy {
z-index: auto;
}
.vditor--fullscreen {
position: fixed;
top: 0;
Expand Down Expand Up @@ -616,7 +602,6 @@
font-size: 12px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
float: right;
margin: 8px 3px 0 0;
Expand All @@ -630,7 +615,6 @@
cursor: row-resize;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: absolute;
width: 100%;
Expand Down Expand Up @@ -676,17 +660,14 @@
position: absolute;
font-size: 12px;
top: 10px;
-webkit-animation-duration: 0.15s;
animation-duration: 0.15s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
animation-duration: 0.15s;
animation-fill-mode: both;
left: 50%;
z-index: 5;
}
.vditor-tip--show {
display: block;
-webkit-animation-name: slideInDown;
animation-name: slideInDown;
animation-name: slideInDown;
}
.vditor-tip__content {
text-align: left;
Expand Down Expand Up @@ -746,7 +727,6 @@
margin-left: 24px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: var(--toolbar-icon-color);
}
Expand Down Expand Up @@ -865,6 +845,9 @@
.vditor-reset li + li {
margin-top: 0.25em;
}
.vditor-reset li p {
margin-top: 16px;
}
.vditor-reset audio {
max-width: 100%;
}
Expand Down Expand Up @@ -1024,6 +1007,7 @@
.vditor-reset .language-mindmap,
.vditor-reset .language-plantuml,
.vditor-reset .language-mermaid,
.vditor-reset .language-smiles,
.vditor-reset .language-markmap,
.vditor-reset .language-abc,
.vditor-reset .language-flowchart,
Expand All @@ -1034,6 +1018,11 @@
outline: none;
cursor: context-menu;
}
.vditor-reset .language-math .katex-display > .katex > .katex-html > .tag {
display: inline-block;
font-size: 1.21rem;
right: 2px;
}
.vditor-reset .language-echarts,
.vditor-reset .language-mindmap {
overflow: hidden;
Expand Down Expand Up @@ -1130,13 +1119,12 @@
.vditor-linenumber__rows {
position: absolute;
pointer-events: none;
top: 0.5em;
top: 1em;
left: 0;
width: 3em;
/* works for line-numbers below 1000 lines */
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
counter-reset: linenumber;
}
Expand Down Expand Up @@ -1268,7 +1256,6 @@
margin-bottom: 16px;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
color: #4285f4;
}
Expand Down Expand Up @@ -1321,6 +1308,7 @@
.vditor-outline li > span > svg {
height: 10px;
width: 10px;
flex-shrink: 0;
}
.vditor-outline li > span:hover {
color: var(--toolbar-icon-hover-color);
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/vditor/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ import VditorMethod from "./method";
declare class Vditor extends VditorMethod {
readonly version: string;
vditor: IVditor;
private isDestroyed;
/**
* @param id 要挂载 Vditor 的元素或者元素 ID。
* @param options Vditor 参数
*/
constructor(id: string | HTMLElement, options?: IOptions);
private showErrorTip;
updateToolbarConfig(options: IToolbarConfig): void;
/** 设置主题 */
setTheme(theme: "dark" | "classic", contentTheme?: string, codeTheme?: string, contentThemePath?: string): void;
/** 获取 Markdown 内容 */
Expand Down Expand Up @@ -56,8 +59,12 @@ declare class Vditor extends VditorMethod {
updateValue(value: string): void;
/** 在焦点处插入内容,并默认进行 Markdown 渲染 */
insertValue(value: string, render?: boolean): void;
/** 在焦点处插入 Markdown */
insertMD(md: string): void;
/** 设置编辑器内容 */
setValue(markdown: string, clearStack?: boolean): void;
/** 空块 */
insertEmptyBlock(position: InsertPosition): void;
/** 清空 undo & redo 栈 */
clearStack(): void;
/** 销毁编辑器 */
Expand Down
Loading