</script>
<?php endif;?>
<?php else:?>
<!--不開啓markdown時使用ueditor-->
<!-- 配置文件 -->
<script type="text/javascript" src="./ueditor/ueditor.config.js"></script>
<!-- 編輯器源碼文件 -->
<script type="text/javascript" src="./ueditor/ueditor.all.min.js"></script>
<!-- 語言包文件(建議手動加在語言,避免在ie下有時由於加載語言失敗致使編輯器加載失敗) -->
<script type="text/javascript" src="./ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
var editor = UE.getEditor('text')
</script>
$text = Typecho_Common::lockHTML($text);
4. 打開模版文件夾的footer.php 這裏我使用的是默認模版 因此路徑是\usr\themes\default 在javascript
<?php $this->footer(); ?>
<script type="text/javascript" src="<?php $this->options->siteUrl(); ?>admin/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>
<link rel="stylesheet" href="<?php $this->options->siteUrl(); ?>admin/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css" type="text/css" />
<script>
SyntaxHighlighter.all() //執行代碼高亮
</script>
textarea.appendChild(document.createTextNode(code));
textarea.style.height = "100%";