使用百度编辑器,后台编辑信息添加代码正常高亮,但是网站前台却不高亮。
这是因为前台没有引用相关CSS文件的原因。
帝国CMS只需在内容模板引用以下文件即可:
1 2 3 4 5 | <link href= "/e/data/ecmseditor/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css" rel= "stylesheet" type= "text/css" /> <script type= "text/javascript" src= "/e/data/ecmseditor/ueditor/third-party/SyntaxHighlighter/shCore.js" ></script> <script type= "text/javascript" > SyntaxHighlighter.all(); </script> |
新闻热点
疑难解答