Browse Source

支持生成TOC目录、科学公式、流程图和序列图

star7th 9 years ago
parent
commit
f0ae1015f2
4 changed files with 14 additions and 11 deletions
  1. 0 10
      Application/Home/View/Page/index.html
  2. 4 0
      Public/js/page/edit.js
  3. 9 0
      Public/js/page/index.js
  4. 1 1
      composer.json

+ 0 - 10
Application/Home/View/Page/index.html

@@ -21,13 +21,3 @@
  <script src="__PUBLIC__/editor.md/lib/jquery.flowchart.min.js"></script>
  <script src="__PUBLIC__/editor.md/lib/jquery.flowchart.min.js"></script>
  <script src="__PUBLIC__/editor.md/editormd.min.js"></script>
  <script src="__PUBLIC__/editor.md/editormd.min.js"></script>
 <script src="__PUBLIC__/js/page/index.js"></script>
 <script src="__PUBLIC__/js/page/index.js"></script>
-<script type="text/javascript">
-	var EditormdView = editormd.markdownToHTML("page_md_content", {
-		htmlDecode      : "style,script,iframe",  // you can filter tags decode
-		emoji           : true,
-		taskList        : true,
-		tex             : true,  // 默认不解析
-		flowChart       : true,  // 默认不解析
-		sequenceDiagram : true,  // 默认不解析
-	});
-</script>

+ 4 - 0
Public/js/page/edit.js

@@ -110,6 +110,10 @@ $(function() {
     syncScrolling: "single",
     syncScrolling: "single",
     path: DocConfig.pubile + "/editor.md/lib/",
     path: DocConfig.pubile + "/editor.md/lib/",
     placeholder: lang["editormd_placeholder"] ,
     placeholder: lang["editormd_placeholder"] ,
+    taskList        : true,
+    tex             : true,  // 默认不解析
+    flowChart       : true,  // 默认不解析
+    sequenceDiagram : true,  // 默认不解析
     imageUpload: true,
     imageUpload: true,
     imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
     imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
     imageUploadURL: "?s=home/page/uploadImg",
     imageUploadURL: "?s=home/page/uploadImg",

+ 9 - 0
Public/js/page/index.js

@@ -1,6 +1,15 @@
 
 
 $(function(){
 $(function(){
     hljs.initHighlightingOnLoad();
     hljs.initHighlightingOnLoad();
+    
+    var EditormdView = editormd.markdownToHTML("page_md_content", {
+      htmlDecode      : "style,script,iframe",  // you can filter tags decode
+      emoji           : true,
+      taskList        : true,
+      tex             : true,  // 默认不解析
+      flowChart       : true,  // 默认不解析
+      sequenceDiagram : true,  // 默认不解析
+    });
 
 
     //为所有table标签添加bootstap支持的表格类
     //为所有table标签添加bootstap支持的表格类
     $("table").addClass("table table-bordered table-hover");
     $("table").addClass("table table-bordered table-hover");

+ 1 - 1
composer.json

@@ -5,7 +5,7 @@
     "description": "ShowDoc is a tool greatly applicable for an IT team to share documents online",
     "description": "ShowDoc is a tool greatly applicable for an IT team to share documents online",
     "keywords": ["showdoc","documents","Api"],
     "keywords": ["showdoc","documents","Api"],
     "homepage": "https://github.com/star7th/showdoc",
     "homepage": "https://github.com/star7th/showdoc",
-    "version":"v1.1.0",
+    "version":"v1.1.1",
     "license": "Apache-2.0",
     "license": "Apache-2.0",
     "authors": [
     "authors": [
         {
         {