mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-21 03:44:17 +08:00
feat:增加editor.md库的CDN
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
editormd.katexURL = {
|
editormd.katexURL = {
|
||||||
js : window.baseUrl + "/static/katex/katex",
|
js : window.katex.js,
|
||||||
css : window.baseUrl + "/static/katex/katex"
|
css : window.katex.css
|
||||||
};
|
};
|
||||||
window.editor = editormd("docEditor", {
|
window.editor = editormd("docEditor", {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
path: window.baseUrl + "/static/editor.md/lib/",
|
path: window.editormdLib,
|
||||||
toolbar: true,
|
toolbar: true,
|
||||||
placeholder: "本编辑器支持 Markdown 编辑,左边编写,右边预览。",
|
placeholder: "本编辑器支持 Markdown 编辑,左边编写,右边预览。",
|
||||||
imageUpload: true,
|
imageUpload: true,
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
editormd.katexURL = {
|
editormd.katexURL = {
|
||||||
js : window.baseUrl + "/static/katex/katex",
|
js : window.katex.js,
|
||||||
css : window.baseUrl + "/static/katex/katex"
|
css : window.katex.css
|
||||||
};
|
};
|
||||||
window.addDocumentModalFormHtml = $(this).find("form").html();
|
window.addDocumentModalFormHtml = $(this).find("form").html();
|
||||||
window.editor = editormd("docEditor", {
|
window.editor = editormd("docEditor", {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
path: window.baseUrl + "/static/editor.md/lib/",
|
path: window.editormdLib,
|
||||||
toolbar: true,
|
toolbar: true,
|
||||||
placeholder: "本编辑器支持 Markdown 编辑,左边编写,右边预览。",
|
placeholder: "本编辑器支持 Markdown 编辑,左边编写,右边预览。",
|
||||||
imageUpload: true,
|
imageUpload: true,
|
||||||
|
@@ -8,6 +8,8 @@
|
|||||||
<title>编辑文章 - Powered by MinDoc</title>
|
<title>编辑文章 - Powered by MinDoc</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.baseUrl = "{{.BaseUrl}}";
|
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.editor = null;
|
||||||
window.editURL = "{{urlfor "BlogController.ManageEdit" "blogId" .Model.BlogId}}";
|
window.editURL = "{{urlfor "BlogController.ManageEdit" "blogId" .Model.BlogId}}";
|
||||||
window.imageUploadURL = "{{urlfor "BlogController.Upload" "blogId" .Model.BlogId}}";
|
window.imageUploadURL = "{{urlfor "BlogController.Upload" "blogId" .Model.BlogId}}";
|
||||||
|
@@ -8,6 +8,8 @@
|
|||||||
<title>编辑文档 - Powered by MinDoc</title>
|
<title>编辑文档 - Powered by MinDoc</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.baseUrl = "{{.BaseUrl}}";
|
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.editor = null;
|
||||||
window.imageUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";
|
window.imageUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";
|
||||||
window.fileUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";
|
window.fileUploadURL = "{{urlfor "DocumentController.Upload" "identify" .Model.Identify}}";
|
||||||
|
Reference in New Issue
Block a user