UEditor 代码的高亮显示
twocode

    编辑时,启用代码语言:   

1479892381657277.png


    输入对应的代码,保存上传。

    在前台展示的时候,页面的head头加载代码:

<script type="text/javascript" src="/community/Public/Resourceblog/min?f=/community/Public/Resourceadming/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<link rel="stylesheet" href="/community/Public/Resourceblog/min?f=/community/Public/Resourceadming/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css">
<script type="text/javascript">SyntaxHighlighter.all();</script>

    路径对应即可生效,自己试试吧!

网友评论已关闭