Commit 0d770611 authored by Van's avatar Van

vditor

parent bb279be7
This diff is collapsed.
...@@ -36,6 +36,6 @@ ...@@ -36,6 +36,6 @@
"gulp-uglify": "^3.0.2" "gulp-uglify": "^3.0.2"
}, },
"dependencies": { "dependencies": {
"vditor": "^1.8.15" "vditor": "^1.9.1"
} }
} }
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
</div> </div>
</div> </div>
<script src="${staticServePath}/js/lib/compress/admin-lib.min.js"></script> <script src="${staticServePath}/js/lib/compress/admin-lib.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vditor@1.8.13/dist/index.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/vditor@1.9.1/dist/index.min.js"></script>
<script src="${staticServePath}/js/common${miniPostfix}.js"></script> <script src="${staticServePath}/js/common${miniPostfix}.js"></script>
<#if "" == miniPostfix> <#if "" == miniPostfix>
<script src="${staticServePath}/js/admin/admin.js"></script> <script src="${staticServePath}/js/admin/admin.js"></script>
......
This diff is collapsed.
...@@ -419,6 +419,7 @@ admin.article = { ...@@ -419,6 +419,7 @@ admin.article = {
fun: fun, fun: fun,
previewMode: 'both', previewMode: 'both',
resize: false, resize: false,
typewriterMode: true
}) })
admin.editors.abstractEditor = new SoloEditor({ admin.editors.abstractEditor = new SoloEditor({
...@@ -426,6 +427,7 @@ admin.article = { ...@@ -426,6 +427,7 @@ admin.article = {
height: 200, height: 200,
previewMode: 'editor', previewMode: 'editor',
resize: true, resize: true,
typewriterMode: false,
}) })
// thumbnail // thumbnail
......
...@@ -42,6 +42,7 @@ $.extend(SoloEditor.prototype, { ...@@ -42,6 +42,7 @@ $.extend(SoloEditor.prototype, {
*/ */
init: function () { init: function () {
this.editor = new Vditor(this.conf.id, { this.editor = new Vditor(this.conf.id, {
typewriterMode: this.conf.typewriterMode,
cache: true, cache: true,
tab: '\t', tab: '\t',
preview: { preview: {
......
...@@ -155,7 +155,10 @@ var Util = { ...@@ -155,7 +155,10 @@ var Util = {
* @description 解析语法高亮 * @description 解析语法高亮
*/ */
parseLanguage: function () { parseLanguage: function () {
Vditor.highlightRender(Label.hljsStyle, !Label.luteAvailable, document) Vditor.highlightRender({
style: Label.hljsStyle,
enable: !Label.luteAvailable,
}, document)
}, },
/** /**
* 按需加载数学公式、流程图、代码复制、五线谱、多媒体、图表 * 按需加载数学公式、流程图、代码复制、五线谱、多媒体、图表
...@@ -165,7 +168,7 @@ var Util = { ...@@ -165,7 +168,7 @@ var Util = {
if (typeof Vditor === 'undefined') { if (typeof Vditor === 'undefined') {
Util.addScript( Util.addScript(
'https://cdn.jsdelivr.net/npm/vditor@1.8.13/dist/method.min.js', 'https://cdn.jsdelivr.net/npm/vditor@1.9.1/dist/method.min.js',
'vditorPreviewScript') 'vditorPreviewScript')
} }
......
This diff is collapsed.
...@@ -103,7 +103,7 @@ $.extend(Page.prototype, { ...@@ -103,7 +103,7 @@ $.extend(Page.prototype, {
if (!$('#soloEditorComment').hasClass('vditor')) { if (!$('#soloEditorComment').hasClass('vditor')) {
var that = this var that = this
Util.addScript( Util.addScript(
'https://cdn.jsdelivr.net/npm/vditor@1.8.13/dist/index.min.js', 'https://cdn.jsdelivr.net/npm/vditor@1.9.1/dist/index.min.js',
'vditorScript') 'vditorScript')
var toolbar = [ var toolbar = [
'emoji', 'emoji',
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -227,7 +227,7 @@ input[type=text]:focus { ...@@ -227,7 +227,7 @@ input[type=text]:focus {
.github__check { .github__check {
font-size: 12px; font-size: 12px;
display: inline-block; display: inline-flex;
margin: 10px auto 0; margin: 10px auto 0;
align-items: center; align-items: center;
line-height: 20px; line-height: 20px;
...@@ -403,4 +403,4 @@ input[type=text]:focus { ...@@ -403,4 +403,4 @@ input[type=text]:focus {
} }
} }
/* end responsive */ /* end responsive */
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment