I5TING_TOC转成的HTML,怎样高亮代码
找到安装位置
全局安装一般在默认位置
C:\Users\administrator\AppData\Roaming\npm\node_modules\i5ting_toc
修改marked.js
i5ting_toc\node_modules\marked\lib\marked.js
将第804行修改如下
if (!lang) { return ‘<pre class="prettyprint linenums:0"><code>‘
修改templete.html
i5ting_toc\vendor\template.html
引入google的高亮插件code-prettify
<script type="text/javascript" src="toc/js/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="toc/js/jquery.ztree.all-3.5.min.js"></script> <script type="text/javascript" src="toc/js/ztree_toc.js"></script> <script type="text/javascript" src="toc_conf.js"></script> <script src="https://cdn.jsdelivr.net/gh/google//loader/run_prettify.js"></script> /** 增加这一行 **/ <SCRIPT type="text/javascript" > $(document).ready(function(){ var css_conf = eval(markdown_panel_style); $(‘#readme‘).css(css_conf) var conf = eval(jquery_ztree_toc_opts); $(‘#tree‘).ztree_toc(conf); }); </SCRIPT>
再执行编译html命令
i5ting_toc -f sample.md -o
相关推荐
fenghuoliuxing0 2020-08-01
yhuihon 2020-05-31
苗疆三刀的随手记 2020-05-27
心丨悦 2020-05-08
zhanghaibing00 2020-04-21
Lius 2020-02-14
vshacker 2020-01-28
James0 2019-12-15
rootdream 2019-11-17
zycglboy 2019-11-12
Urchindong 2011-08-01
Mexican 2014-03-19
genglang 2018-08-17
89589432 2019-09-22
本文实例为大家分享了vue elementUI表格关键字筛选高亮的具体代码,供大家参考,具体内容如下。<el-input type="search" v-model="search" style="w
Johnjianyo 2019-05-28
技术相关 2019-04-23
Tomato 2018-10-17