vditor 4.0.1 → 4.0.2-alpha.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/dist/index.css +14 -2
- package/dist/index.js +5 -3
- 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/assets/less/_ir.less +8 -0
- package/src/assets/less/_wysiwyg.less +9 -0
- package/src/ts/util/processCode.ts +2 -0
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v4.0.
|
|
2
|
+
* Vditor v4.0.2-alpha.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 v4.0.
|
|
28
|
+
* Vditor v4.0.2-alpha.0 - A markdown editor written in TypeScript.
|
|
29
29
|
*
|
|
30
30
|
* MIT License
|
|
31
31
|
*
|
|
@@ -1552,6 +1552,12 @@
|
|
|
1552
1552
|
padding-left: 0 !important;
|
|
1553
1553
|
padding-right: 0 !important;
|
|
1554
1554
|
}
|
|
1555
|
+
.vditor-wysiwyg__block[data-type="code-block"] > pre:not([style*="display:none"]):not([style*="display: none"]) + .vditor-code__preview {
|
|
1556
|
+
height: 0;
|
|
1557
|
+
min-height: 0;
|
|
1558
|
+
overflow: hidden;
|
|
1559
|
+
visibility: hidden;
|
|
1560
|
+
}
|
|
1555
1561
|
.vditor-wysiwyg__block pre:first-child {
|
|
1556
1562
|
margin-bottom: -1em;
|
|
1557
1563
|
}
|
|
@@ -1728,6 +1734,12 @@
|
|
|
1728
1734
|
.vditor-ir__node--hidden .vditor-ir__marker {
|
|
1729
1735
|
visibility: hidden;
|
|
1730
1736
|
}
|
|
1737
|
+
.vditor-ir__node--expand[data-type="code-block"] > .vditor-code__preview {
|
|
1738
|
+
height: 0;
|
|
1739
|
+
min-height: 0;
|
|
1740
|
+
overflow: hidden;
|
|
1741
|
+
visibility: hidden;
|
|
1742
|
+
}
|
|
1731
1743
|
.vditor-ir__node--expand .vditor-ir__marker {
|
|
1732
1744
|
color: var(--second-color);
|
|
1733
1745
|
display: inline;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v4.0.
|
|
2
|
+
* Vditor v4.0.2-alpha.0 - 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.
|
|
2650
|
+
var _VDITOR_VERSION = "4.0.2-alpha.0";
|
|
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.
|
|
2698
|
+
Constants.CDN = "https://unpkg.com/vditor@".concat("4.0.2-alpha.0");
|
|
2699
2699
|
Constants.MARKDOWN_OPTIONS = {
|
|
2700
2700
|
autoSpace: false,
|
|
2701
2701
|
callout: true,
|
|
@@ -5509,6 +5509,7 @@ var processCodeRender = function (previewPanel, vditor) {
|
|
|
5509
5509
|
if (!previewPanel) {
|
|
5510
5510
|
return;
|
|
5511
5511
|
}
|
|
5512
|
+
previewPanel.classList.remove("vditor-code__preview");
|
|
5512
5513
|
if (previewPanel.parentElement.getAttribute("data-type") === "html-block") {
|
|
5513
5514
|
previewPanel.setAttribute("data-render", "1");
|
|
5514
5515
|
return;
|
|
@@ -5555,6 +5556,7 @@ var processCodeRender = function (previewPanel, vditor) {
|
|
|
5555
5556
|
}
|
|
5556
5557
|
});
|
|
5557
5558
|
if (!cRender) {
|
|
5559
|
+
previewPanel.classList.add("vditor-code__preview");
|
|
5558
5560
|
(0,highlightRender/* highlightRender */.s)(Object.assign({}, vditor.options.preview.hljs), previewPanel, vditor.options.cdn);
|
|
5559
5561
|
(0,codeRender/* codeRender */.O)(previewPanel, vditor.options.preview.hljs);
|
|
5560
5562
|
}
|