Skip to content
Permalink
Browse files

https://github.com/b3log/vditor/issues/130

  • Loading branch information...
Vanessa219 committed Sep 8, 2019
1 parent 5200834 commit 30c7e74931a448af3d94a9dfec5c96bb74d571a6

Large diffs are not rendered by default.

@@ -36,6 +36,6 @@
"gulp-uglify": "^3.0.2"
},
"dependencies": {
"vditor": "^1.7.25"
"vditor": "^1.8.5"
}
}
@@ -165,7 +165,7 @@
</div>
</div>
<script src="${staticServePath}/js/lib/compress/admin-lib.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vditor@1.7.25/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vditor@1.8.5/dist/index.min.js"></script>
<script src="${staticServePath}/js/common${miniPostfix}.js"></script>
<#if "" == miniPostfix>
<script src="${staticServePath}/js/admin/admin.js"></script>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

@@ -44,9 +44,6 @@ $.extend(SoloEditor.prototype, {
this.editor = new Vditor(this.conf.id, {
cache: true,
tab: '\t',
hint: {
emojiPath: Label.staticServePath + '/images/emoji'
},
preview: {
delay: 500,
mode: this.conf.previewMode,
@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.8.1.0, Aug 27, 2019
* @version 1.9.1.0, Sep 9, 2019
*/

/**
@@ -150,31 +150,10 @@ var Util = {
if ($('.vditor-reset pre > code').length === 0) {
return
}
Util.addStyle('https://cdn.jsdelivr.net/npm/vditor/dist/js/highlight.js/styles/' +
Label.hljsStyle + '.css', 'vditorHljsStyle')

var initHljs = function () {
hljs.initHighlighting.called = false
hljs.initHighlighting()
}

if (!Label.markedAvailable) {
if (typeof hljs === 'undefined') {
$.ajax({
url: 'https://cdn.jsdelivr.net/npm/vditor/dist/js/highlight.js/highlight.pack.js',
dataType: 'script',
cache: true,
success: function () {
initHljs()
},
})
} else {
initHljs()
}
}
Vditor.highlightRender(Label.hljsStyle, !Label.markedAvailable, document)
},
/**
* 按需加载数学公式、代码复制、图标
* 按需加载数学公式、流程图、代码复制、五线谱、多媒体、图表
* @returns {undefined}
*/
parseMarkdown: function () {
@@ -185,14 +164,15 @@ var Util = {
return
}

Util.addScript('https://cdn.jsdelivr.net/npm/vditor@1.7.25/dist/index.min.js',
'vditorScript')
Util.addScript('https://cdn.jsdelivr.net/npm/vditor@1.8.5/dist/method.min.js',
'vditorPreviewScript')

Vditor.mermaidRender(document.body)
Vditor.chartRender()
Vditor.abcRender()
Vditor.mathRender(document.body, Label.langLabel)
Vditor.codeRender(document.body, Label.langLabel)
Vditor.mathRender(document.body, Label.langLabel)
Vditor.abcRender()
Vditor.chartRender()
Vditor.mediaRender(document.body)
Vditor.mermaidRender(document.body)
},
/**
* @description IE6/7,跳转到 kill-browser 页面

Some generated files are not rendered by default. Learn more.

@@ -103,7 +103,7 @@ $.extend(Page.prototype, {
if (!$('#soloEditorComment').hasClass('vditor')) {
var that = this
Util.addScript(
'https://cdn.jsdelivr.net/npm/vditor@1.7.25/dist/index.min.js',
'https://cdn.jsdelivr.net/npm/vditor@1.8.5/dist/index.min.js',
'vditorScript')
var toolbar = [
'emoji',
@@ -130,6 +130,7 @@ $.extend(Page.prototype, {
'|',
'both',
'preview',
'format',
'fullscreen',
'info',
'help',
@@ -144,6 +145,7 @@ $.extend(Page.prototype, {
'check',
'link',
'preview',
'format',
'info',
'help',
]
@@ -154,9 +156,6 @@ $.extend(Page.prototype, {
placeholder: that.tips.commentContentCannotEmptyLabel,
height: 180,
tab: '\t',
hint: {
emojiPath: Label.staticServePath + '/images/emoji',
},
esc: function () {
$('#soloEditorCancel').click()
},

0 comments on commit 30c7e74

Please sign in to comment.
You can’t perform that action at this time.