@8btc/mditor 0.0.7 → 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 +6 -2
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2787 -2687
- package/dist/index.min.js +1 -1
- package/dist/method.d.ts +14 -10
- package/dist/method.js +527 -3
- package/dist/method.min.js +1 -1
- package/package.json +1 -1
- package/src/assets/less/_line-number.less +6 -1
- package/src/index.ts +50 -0
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vditor v0.0.
|
|
2
|
+
* Vditor v0.0.7 - 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.7 - A markdown editor written in TypeScript.
|
|
29
29
|
*
|
|
30
30
|
* MIT License
|
|
31
31
|
*
|
|
@@ -1840,6 +1840,10 @@
|
|
|
1840
1840
|
pointer-events: none;
|
|
1841
1841
|
display: block;
|
|
1842
1842
|
}
|
|
1843
|
+
.vditor--linenumber .vditor-reset .vditor-line-highlight {
|
|
1844
|
+
background-color: #fff3cd !important;
|
|
1845
|
+
transition: background-color 0.2s ease-in-out;
|
|
1846
|
+
}
|
|
1843
1847
|
/* 数学右键菜单全局样式(参考 ECharts 菜单风格) */
|
|
1844
1848
|
.vditor-math-menu {
|
|
1845
1849
|
position: fixed;
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,13 @@ declare class Vditor extends VditorMethod {
|
|
|
23
23
|
* @param immediate 为 true 时立即更新;默认为节流更新以避免频繁调用
|
|
24
24
|
*/
|
|
25
25
|
updateLineNumbers(immediate?: boolean): void;
|
|
26
|
+
/**
|
|
27
|
+
* 高亮指定行号对应的块元素
|
|
28
|
+
* - 仅匹配拥有 `data-linenumber`/`data-lineNumber` 且值等于指定行号的元素
|
|
29
|
+
* - 应用高亮样式并在约 500ms 后自动恢复
|
|
30
|
+
* @param numbers 要高亮的行号数组
|
|
31
|
+
*/
|
|
32
|
+
setLinehightNumbers(numbers: number[]): void;
|
|
26
33
|
/** 获取编辑器当前编辑模式 */
|
|
27
34
|
getCurrentMode(): "sv" | "wysiwyg" | "ir";
|
|
28
35
|
/** 聚焦到编辑器 */
|