vditor 4.0.2-alpha.4 → 4.0.2-alpha.5
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 +11 -4
- package/dist/index.min.js +1 -1
- package/dist/method.js +3 -3
- package/dist/method.min.js +1 -1
- package/package.json +1 -1
- package/src/ts/undo/index.ts +8 -1
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v4.0.2-alpha.
|
|
2
|
+
* Vditor v4.0.2-alpha.5 - 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 v4.0.2-alpha.
|
|
28
|
+
* Vditor v4.0.2-alpha.5 - 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 v4.0.2-alpha.
|
|
2
|
+
* Vditor v4.0.2-alpha.5 - A markdown editor written in TypeScript.
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -2647,7 +2647,7 @@ var Vditor = /** @class */ (function () {
|
|
|
2647
2647
|
/* harmony export */ "H": () => (/* binding */ _VDITOR_VERSION),
|
|
2648
2648
|
/* harmony export */ "g": () => (/* binding */ Constants)
|
|
2649
2649
|
/* harmony export */ });
|
|
2650
|
-
var _VDITOR_VERSION = "4.0.2-alpha.
|
|
2650
|
+
var _VDITOR_VERSION = "4.0.2-alpha.5";
|
|
2651
2651
|
|
|
2652
2652
|
var Constants = /** @class */ (function () {
|
|
2653
2653
|
function Constants() {
|
|
@@ -2695,7 +2695,7 @@ var Constants = /** @class */ (function () {
|
|
|
2695
2695
|
// 别名
|
|
2696
2696
|
"js", "ts", "html", "toml", "c#", "bat"
|
|
2697
2697
|
];
|
|
2698
|
-
Constants.CDN = "https://unpkg.com/vditor@".concat("4.0.2-alpha.
|
|
2698
|
+
Constants.CDN = "https://unpkg.com/vditor@".concat("4.0.2-alpha.5");
|
|
2699
2699
|
Constants.MARKDOWN_OPTIONS = {
|
|
2700
2700
|
autoSpace: false,
|
|
2701
2701
|
callout: true,
|
|
@@ -14733,6 +14733,7 @@ var codeDOM = __webpack_require__(787);
|
|
|
14733
14733
|
|
|
14734
14734
|
|
|
14735
14735
|
|
|
14736
|
+
|
|
14736
14737
|
var undo_Undo = /** @class */ (function () {
|
|
14737
14738
|
function Undo() {
|
|
14738
14739
|
this.stackSize = 50;
|
|
@@ -14914,7 +14915,13 @@ var undo_Undo = /** @class */ (function () {
|
|
|
14914
14915
|
processCodeRender(item, vditor);
|
|
14915
14916
|
});
|
|
14916
14917
|
vditor[vditor.currentMode].element.querySelectorAll(".vditor-code__preview")
|
|
14917
|
-
.forEach(function (item) {
|
|
14918
|
+
.forEach(function (item) {
|
|
14919
|
+
highlightEditableCode(item, vditor);
|
|
14920
|
+
// 快照可能早于异步高亮完成,普通预览需补齐其渲染结果。
|
|
14921
|
+
if (!item.querySelector("code.hljs")) {
|
|
14922
|
+
(0,highlightRender/* highlightRender */.s)(vditor.options.preview.hljs, item, vditor.options.cdn);
|
|
14923
|
+
}
|
|
14924
|
+
});
|
|
14918
14925
|
if (this[vditor.currentMode].undoStack.length > 1) {
|
|
14919
14926
|
enableToolbar(vditor.toolbar.elements, ["undo"]);
|
|
14920
14927
|
}
|