feat:增加editor.md库的CDN

pull/358/head
lifei6671 2018-08-07 18:29:15 +08:00
parent 327d6fb8d8
commit 19bf5a7389
4 changed files with 10 additions and 6 deletions

View File

@ -1,12 +1,12 @@
$(function () {
editormd.katexURL = {
js : window.baseUrl + "/static/katex/katex",
css : window.baseUrl + "/static/katex/katex"
js : window.katex.js,
css : window.katex.css
};
window.editor = editormd("docEditor", {
width: "100%",
height: "100%",
path: window.baseUrl + "/static/editor.md/lib/",
path: window.editormdLib,
toolbar: true,
placeholder: "本编辑器支持 Markdown 编辑,左边编写,右边预览。",
imageUpload: true,

View File

@ -1,13 +1,13 @@
$(function () {
editormd.katexURL = {
js : window.baseUrl + "/static/katex/katex",
css : window.baseUrl + "/static/katex/katex"
js : window.katex.js,
css : window.katex.css
};
window.addDocumentModalFormHtml = $(this).find("form").html();
window.editor = editormd("docEditor", {
width: "100%",
height: "100%",
path: window.baseUrl + "/static/editor.md/lib/",
path: window.editormdLib,
toolbar: true,
placeholder: "本编辑器支持 Markdown 编辑,左边编写,右边预览。",
imageUpload: true,

View File

@ -8,6 +8,8 @@
<title>编辑文章 - Powered by MinDoc</title>
<script type="text/javascript">
window.baseUrl = "{{.BaseUrl}}";
window.katex = { js: "{{cdnjs "/static/katex/katex"}}",css: "{{cdncss "/static/katex/katex"}}"};
window.editormdLib = "{{cdnjs "/static/editor.md/lib/"}}";
window.editor = null;
window.editURL = "{{urlfor "BlogController.ManageEdit" "blogId" .Model.BlogId}}";
window.imageUploadURL = "{{urlfor "BlogController.Upload" "blogId" .Model.BlogId}}";

View File

@ -8,6 +8,8 @@
<title>编辑文档 - Powered by MinDoc</title>
<script type="text/javascript">
window.baseUrl = "{{.BaseUrl}}";
window.katex = { js: "{{cdnjs "/static/katex/katex"}}",css: "{{cdncss "/static/katex/katex"}}"};
window.editormdLib = "{{cdnjs "/static/editor.md/lib/"}}";
window.editor = null;
window.imageUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";
window.fileUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";