@yltrcc/vditor 0.0.6 → 0.0.8
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/dist/index.css +2 -2
- package/dist/index.js +14 -7
- package/dist/index.min.js +1 -1
- package/dist/method.js +3 -3
- package/dist/method.min.js +1 -1
- package/dist/ts/wysiwyg/index.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +79 -79
- package/src/ts/constants.ts +90 -90
- package/src/ts/markdown/docLink.ts +202 -202
- package/src/ts/markdown/getMarkdown.ts +60 -60
- package/src/ts/toolbar/Info.ts +43 -43
- package/src/ts/undo/index.ts +270 -270
- package/src/ts/util/Options.ts +455 -454
- package/src/ts/wysiwyg/afterRenderEvent.ts +54 -47
- package/src/ts/wysiwyg/highlightToolbarWYSIWYG.ts +1156 -1156
- package/src/ts/wysiwyg/index.ts +2 -1
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v0.0.
|
|
2
|
+
* Vditor v0.0.8 - 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 v0.0.
|
|
28
|
+
* Vditor v0.0.8 - A markdown editor written in TypeScript.
|
|
29
29
|
*
|
|
30
30
|
* MIT License
|
|
31
31
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v0.0.
|
|
2
|
+
* Vditor v0.0.8 - A markdown editor written in TypeScript.
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -1267,7 +1267,7 @@ var looseJsonParse = function (text) {
|
|
|
1267
1267
|
/* harmony export */ Y: () => (/* binding */ Constants),
|
|
1268
1268
|
/* harmony export */ g: () => (/* binding */ _VDITOR_VERSION)
|
|
1269
1269
|
/* harmony export */ });
|
|
1270
|
-
var _VDITOR_VERSION = "0.0.
|
|
1270
|
+
var _VDITOR_VERSION = "0.0.8";
|
|
1271
1271
|
|
|
1272
1272
|
var Constants = /** @class */ (function () {
|
|
1273
1273
|
function Constants() {
|
|
@@ -1315,7 +1315,7 @@ var Constants = /** @class */ (function () {
|
|
|
1315
1315
|
// 别名
|
|
1316
1316
|
"js", "ts", "html", "toml", "c#", "bat"
|
|
1317
1317
|
];
|
|
1318
|
-
Constants.CDN = "https://unpkg.com/@yltrcc/vditor@".concat("0.0.
|
|
1318
|
+
Constants.CDN = "https://unpkg.com/@yltrcc/vditor@".concat("0.0.8");
|
|
1319
1319
|
Constants.MARKDOWN_OPTIONS = {
|
|
1320
1320
|
autoSpace: false,
|
|
1321
1321
|
gfmAutoLink: true,
|
|
@@ -6788,6 +6788,16 @@ var afterRenderEvent = function (vditor, options) {
|
|
|
6788
6788
|
if (options.enableHint) {
|
|
6789
6789
|
vditor.hint.render(vditor);
|
|
6790
6790
|
}
|
|
6791
|
+
// 处理文档链接渲染 - 独立执行,使用单独的延迟时间
|
|
6792
|
+
if (vditor.wysiwyg.element) {
|
|
6793
|
+
clearTimeout(vditor.wysiwyg.docLinkRenderTimeoutId);
|
|
6794
|
+
vditor.wysiwyg.docLinkRenderTimeoutId = window.setTimeout(function () {
|
|
6795
|
+
if (!vditor.wysiwyg.composingLock) {
|
|
6796
|
+
(0,docLink/* processDocLinkInWYSIWYG */.qo)(vditor.wysiwyg.element, vditor);
|
|
6797
|
+
}
|
|
6798
|
+
}, vditor.options.docLinkDelay || 50);
|
|
6799
|
+
}
|
|
6800
|
+
// 处理其他操作 - 使用主延迟时间
|
|
6791
6801
|
clearTimeout(vditor.wysiwyg.afterRenderTimeoutId);
|
|
6792
6802
|
vditor.wysiwyg.afterRenderTimeoutId = window.setTimeout(function () {
|
|
6793
6803
|
if (vditor.wysiwyg.composingLock) {
|
|
@@ -6812,10 +6822,6 @@ var afterRenderEvent = function (vditor, options) {
|
|
|
6812
6822
|
if (options.enableAddUndoStack) {
|
|
6813
6823
|
vditor.undo.addToUndoStack(vditor);
|
|
6814
6824
|
}
|
|
6815
|
-
// 处理文档链接渲染
|
|
6816
|
-
if (vditor.wysiwyg.element) {
|
|
6817
|
-
(0,docLink/* processDocLinkInWYSIWYG */.qo)(vditor.wysiwyg.element, vditor);
|
|
6818
|
-
}
|
|
6819
6825
|
}, vditor.options.undoDelay);
|
|
6820
6826
|
};
|
|
6821
6827
|
|
|
@@ -14872,6 +14878,7 @@ var Options = /** @class */ (function () {
|
|
|
14872
14878
|
},
|
|
14873
14879
|
typewriterMode: false,
|
|
14874
14880
|
undoDelay: 800,
|
|
14881
|
+
docLinkDelay: 50,
|
|
14875
14882
|
upload: {
|
|
14876
14883
|
extraData: {},
|
|
14877
14884
|
fieldName: "file[]",
|