1. 首页>>前端>>HTML

Ueditor 代码块设置

<link rel="stylesheet" type="text/css" href="{pboot:sitedomain}/core/extend/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css">
<script type='text/javascript' src='{pboot:sitedomain}/core/extend/ueditor/third-party/SyntaxHighlighter/shCore.js'></script>   

<script type="text/javascript">
    $(document).ready(function () {
        SyntaxHighlighter.all();
});</script>

有时候这样可能会报错,如果这样不行,可以换一个调用方式

报错:Uncaught ReferenceError: $ is not defined

可以直接写成这样:

<script type="text/javascript">
        SyntaxHighlighter.all();
</script>


转载联系作者并注明出处:https://www.focusonseo.cn/hctmsl/114.html