以前用coolcode,结果发现跟OpenID插件和AJAXed Wordpress插件有冲突。
现在改成了wp-wp-syntax插件。还没检查与AJAXed Wordpress冲不冲突,与OpenID已经不冲突了。
公布修改方法,并提供修改过的文件下载。
打开wp-includes/js/quicktags.js
找到

edButtons[edButtons.length] =
new edButton('ed_code'
,'code'
,'<code>'
,'</code>'
,'c'
);

在其下方添加(我们保留了code按钮) Read the rest of this entry »

Tags: , ,

coolcode是一个不错的代码高亮插件。但默认后台是没有按钮的。还要输入语言,是否显示行号,麻烦,一次性解决一下吧。在后台加上一个按钮,并提示输入语言类型,由于我不喜欢显示行号,并且显示行号的时候,一复制,行号照样能复制上,所以就直接把行号给干掉。
以前记在论坛里,可惜数据现在都没了。
重新整理了一下。
修改wp-include/js/quicktags.js
找到

edButtons[edButtons.length] =
new edButton('ed_code'
,'code'
,'<code>'
,'</code>'
,'c'
);

Read the rest of this entry »

Tags: , ,

对于程序员来说,coolcode等用来展示代码的插件已经离不开我们了。但每次输入还得去手工敲上去是有点麻烦。
本来想把coolcode全都改成code标签来着。后来觉得挺麻烦。即然好用就一直用它吧。但编辑器里的code就成了鸡胁。于是乎,改了它。
修改wp-include/js/quicktags.js
找到

edButtons[edButtons.length] =
new edButton('ed_code'
,'code'
,'<code>'
,'</code>'
,'c'
);

Read the rest of this entry »

Tags: , ,

© 2008 Snow silent