1+ {% extends "base.html" %}
2+
3+ {% block css %}
4+ < link href ="/static/plugins/editor.md/css/editormd.preview.min.css " rel ="stylesheet "/>
5+ {% endblock %}
6+
7+ {% block content %}
8+ < div class ="row ">
9+ < div class ="col-md-12 ">
10+ < div id ="editormd-view ">
11+ < textarea > # 站点介绍
12+ - site:**运维咖啡吧**
13+ - url:[https://ops-coffee.cn](https://ops-coffee.cn)
14+ - slogen: **追求技术的道路上,我从不曾停下脚步**
15+
16+ # 代码示例
17+ ```python
18+ def hello():
19+ print('欢迎关注微信公众号【运维咖啡吧】')
20+ ```
21+
22+ # 图片示例
23+ </ textarea >
24+ </ div >
25+ </ div >
26+ </ div >
27+ {% endblock %}
28+
29+ {% block js %}
30+ < script type ="text/javascript " src ="/static/plugins/editor.md/lib/marked.min.js "> </ script >
31+ < script type ="text/javascript " src ="/static/plugins/editor.md/lib/prettify.min.js "> </ script >
32+ < script type ="text/javascript " src ="/static/plugins/editor.md/lib/raphael.min.js "> </ script >
33+ < script type ="text/javascript " src ="/static/plugins/editor.md/lib/underscore.min.js "> </ script >
34+ < script type ="text/javascript " src ="/static/plugins/editor.md/lib/sequence-diagram.min.js "> </ script >
35+ < script type ="text/javascript " src ="/static/plugins/editor.md/lib/flowchart.min.js "> </ script >
36+ < script type ="text/javascript " src ="/static/plugins/editor.md/lib/jquery.flowchart.min.js "> </ script >
37+ < script type ="text/javascript " src ="/static/plugins/editor.md/js/editormd.min.js "> </ script >
38+ < script >
39+ $ ( '#page_header' ) . text ( 'Markdown' ) ;
40+ $ ( '#page_header_descript' ) . text ( 'markdown preview' ) ;
41+
42+ $ ( function ( ) {
43+ var EditormdView = editormd . markdownToHTML ( "editormd-view" , {
44+ htmlDecode : "style,script,iframe" ,
45+ emoji : true ,
46+ taskList : true ,
47+ tex : true , // 默认不解析
48+ flowChart : true , // 默认不解析
49+ sequenceDiagram : true // 默认不解析
50+ } ) ;
51+ } ) ;
52+
53+ </ script >
54+ {% endblock %}
0 commit comments