让codecolorer默认语言为php

折腾php的,发文章时自然是发php代码比较多,此举可以让你少敲3个字符。
打开codecolorer/js/quicktags.js
在prompt函数调用处设置第二个参数的默认值为php即可,修改后的insertCodeColorer函数如下:

1
2
3
4
5
6
7
8
9
10
11
function insertCodeColorer() {
      if (!edCheckOpenTags(codeTagIndex)) {
        var URL = prompt(codeColorerL10n.enterLanguage, 'php');
        if (URL) {
          edButtons[codeTagIndex].tagStart = '[cc lang="' + URL + '"]';
          edInsertTag(edCanvas, codeTagIndex);
        }
      } else {
        edInsertTag(edCanvas, codeTagIndex);
      }
    }

插入代码时效果如下:

还有就是让cc标签与代码分开,即标签开始和结束分别换行:
这个简单,加个

1
 \n

就可以了

喜欢这篇文章吗?

请订阅本站 RSS feed填写您的邮件地址,订阅我们的精彩内容:

相关日志

回复 (2)

  1. simaopig  / 回复

    还真是懒的可以。。呼。

发表评论 修改评论取消编辑

允许使用的标签 - 您可以在评论中使用如下的 HTML 标签以及属性。

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 :wink:  :-|  :-x  :twisted:  :)  8-O  :(  :roll:  :-P  :oops:  :-o  :mrgreen:  :lol:  :idea:  :-D  :evil:  :cry:  8)  :arrow:  :-?  :?:  :!:

引用通告 (0)

› 尚无引用通告。

开灯