好不容易把CK and SyntaxHighlighter关于高亮显示和图片实时显示的问题解决了,回到首页一看,哇塞,js代码怎么显示出来了。
分析肯定是注释的原因,查找出应该是wp-content/plugins/ck-and-syntaxhighlighter/ck.class.php出现的问题。修改
1 2 3 4 5 6 7 8 9 10 |
<script type=\"text/javascript\"> SyntaxHighlighter.defaults['class-name'] = '".$this->ckeditor_config['sh_class_name']."'; SyntaxHighlighter.defaults['smart-tabs'] = ".$this->ckeditor_config['sh_smart_tabs']."; SyntaxHighlighter.defaults['tab-size'] = ".$this->ckeditor_config['sh_tab_size']."; SyntaxHighlighter.defaults['gutter'] = ".$this->ckeditor_config['sh_gutter']."; SyntaxHighlighter.defaults['quick-code'] = ".$this->ckeditor_config['sh_quick_code']."; SyntaxHighlighter.defaults['collapse'] = ".$this->ckeditor_config['sh_collapse']."; SyntaxHighlighter.defaults['auto-links'] = ".$this->ckeditor_config['sh_auto_links']."; SyntaxHighlighter.defaults['toolbar'] = true; SyntaxHighlighter.all(); |
如下:
1 2 3 4 5 6 7 8 9 10 11 12 |
<script type=\"text/javascript\"> <!-- SyntaxHighlighter.defaults['class-name'] = '".$this->ckeditor_config['sh_class_name']."'; SyntaxHighlighter.defaults['smart-tabs'] = ".$this->ckeditor_config['sh_smart_tabs']."; SyntaxHighlighter.defaults['tab-size'] = ".$this->ckeditor_config['sh_tab_size']."; SyntaxHighlighter.defaults['gutter'] = ".$this->ckeditor_config['sh_gutter']."; SyntaxHighlighter.defaults['quick-code'] = ".$this->ckeditor_config['sh_quick_code']."; SyntaxHighlighter.defaults['collapse'] = ".$this->ckeditor_config['sh_collapse']."; SyntaxHighlighter.defaults['auto-links'] = ".$this->ckeditor_config['sh_auto_links']."; SyntaxHighlighter.defaults['toolbar'] = true; SyntaxHighlighter.all(); //--> |
搞定
1 条评论
您好!你用的代码高亮插件能否发我一份? 谢谢!david_dba@163.com