Commit bbaa696b authored by Liang Ding's avatar Liang Ding

Merge remote-tracking branch 'origin/dev' into dev

parents fb4f68d7 11b45721
......@@ -8690,9 +8690,9 @@
}
},
"vditor": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/vditor/-/vditor-3.2.4.tgz",
"integrity": "sha512-XH5nOJ+F4fjCLKSATO436JidiN+eEipV3irWaKDQnU3xPdaFVQij+81YOnOfya5n8vzwbFk+OwYTPq0FWkiWQA==",
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/vditor/-/vditor-3.2.6.tgz",
"integrity": "sha512-PJjPe+DzCj8ZCZL7TAtXRsyNWg1Jkbvfsh9ZhAL0Yef25Uh1vUE9RJkcTUtClUfwtpOpgrfIVO61cdFPS1fSHA==",
"requires": {
"diff-match-patch": "^1.0.4"
}
......
......@@ -55,6 +55,6 @@
"nprogress": "^0.2.0",
"uvstat": "^1.0.7",
"vcmt": "^1.2.1",
"vditor": "^3.2.4"
"vditor": "^3.2.6"
}
}
This diff is collapsed.
......@@ -416,6 +416,7 @@ admin.article = {
// editor
admin.editors.articleEditor = new SoloEditor({
outline: true,
id: 'articleContent',
height: 500,
fun: fun,
......
......@@ -57,6 +57,7 @@ $.extend(SoloEditor.prototype, {
})
const options = {
outline: this.conf.outline || false,
mode: Label.editorMode,
typewriterMode: this.conf.typewriterMode,
cache: {
......@@ -105,6 +106,51 @@ $.extend(SoloEditor.prototype, {
toolbarConfig: {
pin: true,
},
toolbar:[
"emoji",
"headings",
"bold",
"link",
"|",
"list",
"ordered-list",
"check",
"outdent",
"indent",
"|",
"quote",
"code",
"insert-before",
"insert-after",
"|",
"upload",
"record",
"table",
"|",
"undo",
"redo",
"|",
"fullscreen",
"edit-mode",
{
name: "more",
toolbar: [
"italic",
"strike",
"line",
"inline-code",
"both",
"code-theme",
"content-theme",
"export",
"outline",
"preview",
"format",
"devtools",
"info",
"help",
],
}],
after: () => {
if (typeof this.conf.fun === 'function') {
this.conf.fun()
......
......@@ -108,6 +108,7 @@ admin.themeList = {
cache: false,
data: JSON.stringify(requestJSONObject),
success: function (result, textStatus) {
sessionStorage.removeItem('skin')
$('#tipMsg').text(result.msg)
if (!result.sc) {
$('#loadMsg').text('')
......
......@@ -23,7 +23,7 @@ window.Vcomment = Vcomment
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.2.1.0, Apr 30, 2020
* @version 2.3.1.0, May 15, 2020
*/
/**
......@@ -306,7 +306,7 @@ window.Util = {
loadVditor: function (cb) {
$.ajax({
method: 'GET',
url: 'https://cdn.jsdelivr.net/npm/vditor@3.2.4/dist/index.min.js',
url: 'https://cdn.jsdelivr.net/npm/vditor@3.2.6/dist/index.min.js',
dataType: 'script',
cache: true,
success: () => {
......@@ -317,9 +317,35 @@ window.Util = {
},
})
},
skinPreview: () => {
if (location.pathname === '/admin-index.do') {
return
}
const skinParam = location.search.split('skin=')
let skin = ''
let urlHasSkin = false
if (skinParam.length === 2) {
skin = skinParam[1].split('=')[0]
urlHasSkin = true
}
if (skin) {
sessionStorage.setItem('skin', skin)
} else {
skin = sessionStorage.getItem('skin')
}
if (!skin) {
return
}
if (!urlHasSkin) {
location.search = location.search
? location.search + '&skin=' + skin
: '?skin=' + skin
}
},
};
(() => {
Util.skinPreview()
if (typeof Vditor === 'undefined') {
Util.loadVditor()
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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