From 579197d146772a56f62fcdcebe26c5fd7c53d87b Mon Sep 17 00:00:00 2001 From: Minho Date: Thu, 1 Mar 2018 11:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AFMarkdown=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E7=9A=84=E6=95=B0=E5=AD=A6=E5=85=AC=E5=BC=8F=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/kancloud.js | 3 ++- static/js/markdown.js | 5 +++++ views/document/default_read.tpl | 1 - views/document/markdown_edit_template.tpl | 6 ++++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/static/js/kancloud.js b/static/js/kancloud.js index 2c5ed9da..54e7e160 100644 --- a/static/js/kancloud.js +++ b/static/js/kancloud.js @@ -76,6 +76,7 @@ function initHighlighting() { hljs.initLineNumbersOnLoad(); } + var events = $("body"); $(function () { @@ -93,7 +94,6 @@ $(function () { window.isFullScreen = false; initHighlighting(); - window.jsTree = $("#sidebar").jstree({ 'plugins' : ["wholerow", "types"], "types": { @@ -158,6 +158,7 @@ $(function () { } initHighlighting(); + $(".manual-right").scrollTop(0); //使用layer相册功能查看图片 layer.photos({photos: "#page-content"}); diff --git a/static/js/markdown.js b/static/js/markdown.js index a1702668..8a7a3401 100644 --- a/static/js/markdown.js +++ b/static/js/markdown.js @@ -1,4 +1,8 @@ $(function () { + editormd.katexURL = { + js : "/static/katex/katex", + css : "/static/katex/katex" + }; window.addDocumentModalFormHtml = $(this).find("form").html(); window.editor = editormd("docEditor", { width: "100%", @@ -19,6 +23,7 @@ $(function () { sequenceDiagram: true, tocStartLevel: 1, tocm: true, + tex:true, saveHTMLToTextarea: true, onload: function() { diff --git a/views/document/default_read.tpl b/views/document/default_read.tpl index 21f61890..8e3a9f7c 100644 --- a/views/document/default_read.tpl +++ b/views/document/default_read.tpl @@ -277,7 +277,6 @@ - - - + +