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 @@ - - - + +