Skip to content

Commit

Permalink
支持生成TOC目录、科学公式、流程图和序列图
Browse files Browse the repository at this point in the history
  • Loading branch information
star7th committed Oct 19, 2016
1 parent 35189f4 commit 92e6da1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Application/Home/Controller/PageController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public function index(){
return;
}
$Parsedown = new \Parsedown();
$page['page_content'] = $Parsedown->text(htmlspecialchars_decode($page['page_content']));
$page['page_md_content'] = $page['page_content'];
//$page['page_html_content'] = $Parsedown->text(htmlspecialchars_decode($page['page_content']));
$this->assign("page" , $page);
$this->display();
}
Expand Down
33 changes: 24 additions & 9 deletions Application/Home/View/Page/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
<include file="Common/header" />
<link href="__PUBLIC__/highlight/default.min.css" rel="stylesheet">
<link href="__PUBLIC__/css/page/index.css" rel="stylesheet">
<link href="__PUBLIC__/css/page/index.css" rel="stylesheet">

<h3 style="text-align: center;">{$page.page_title}</h3>
<!-- 这里开始是内容 -->
<div class="" style="padding-top:10px;">

{$page.page_content}

</div>


<div id="page_md_content" style="padding-top:10px;" ><textarea style="display:none;">
{$page.page_md_content}</textarea></div>

<div id="page_html_content" style="display:none;">{$page.page_html_content}</div>

<include file="Common/footer" />
<script src="__PUBLIC__/highlight/highlight.min.js"></script>
<script src="__PUBLIC__/js/page/index.js"></script>
<script src="__PUBLIC__/highlight/highlight.min.js"></script>
<script src="__PUBLIC__/editor.md/lib/marked.min.js"></script>
<script src="__PUBLIC__/editor.md/lib/prettify.min.js"></script>
<script src="__PUBLIC__/editor.md/lib/flowchart.min.js"></script>
<script src="__PUBLIC__/editor.md/lib/raphael.min.js"></script>
<script src="__PUBLIC__/editor.md/lib/underscore.min.js"></script>
<script src="__PUBLIC__/editor.md/lib/sequence-diagram.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__/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>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "ShowDoc is a tool greatly applicable for an IT team to share documents online",
"keywords": ["showdoc","documents","Api"],
"homepage": "https://github.com/star7th/showdoc",
"version":"v1.0.5",
"version":"v1.1.0",
"license": "Apache-2.0",
"authors": [
{
Expand Down

0 comments on commit 92e6da1

Please sign in to comment.