下載一個SyntaxHighlighter插件放在模板里,在詳情模板引入SyntaxHighlighter高亮插件JS和CSS路徑。
<!-- SyntaxHighlighter高亮 begin-->
{eyou:static file="xxx/SyntaxHighlighter/shCoreDefault.css" /}
{eyou:static file="xxx/SyntaxHighlighter/shCore.js" /}
<script type="text/javascript">
SyntaxHighlighter.all();
</script>
<!-- SyntaxHighlighter高亮 end-->