🎨 启用代码行号功能
This commit is contained in:
parent
b6767f3b31
commit
567777d965
@ -202,6 +202,11 @@
|
|||||||
_ts.contentEditor.setValue(data.value ? data.value : '');
|
_ts.contentEditor.setValue(data.value ? data.value : '');
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
|
hljs: {
|
||||||
|
enable: true,
|
||||||
|
lineNumber: true,
|
||||||
|
style: 'github'
|
||||||
|
},
|
||||||
markdown: {
|
markdown: {
|
||||||
toc: true,
|
toc: true,
|
||||||
},
|
},
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
// //const outLineElement = document.getElementById("articleToC");
|
// //const outLineElement = document.getElementById("articleToC");
|
||||||
// VditorPreview.setContentTheme('light');
|
// VditorPreview.setContentTheme('light');
|
||||||
Vue.VditorPreview.codeRender(previewElement, 'zh_CN');
|
Vue.VditorPreview.codeRender(previewElement, 'zh_CN');
|
||||||
Vue.VditorPreview.highlightRender({"enable": true, "lineNumber": false, "style": "github"}, previewElement);
|
Vue.VditorPreview.highlightRender({"enable": true, "lineNumber": true, "style": "github"}, previewElement);
|
||||||
Vue.VditorPreview.mathRender(previewElement, {
|
Vue.VditorPreview.mathRender(previewElement, {
|
||||||
math: {"engine": "KaTeX", "inlineDigit": false, "macros": {}},
|
math: {"engine": "KaTeX", "inlineDigit": false, "macros": {}},
|
||||||
});
|
});
|
||||||
|
@ -145,6 +145,11 @@
|
|||||||
_ts.contentEditor.setValue(data.value ? data.value : '');
|
_ts.contentEditor.setValue(data.value ? data.value : '');
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
|
hljs: {
|
||||||
|
enable: true,
|
||||||
|
lineNumber: true,
|
||||||
|
style: 'github'
|
||||||
|
},
|
||||||
markdown: {
|
markdown: {
|
||||||
toc: true,
|
toc: true,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user