为wordpress添加coolcode插件的quicktag
修改 wp-includes/js/quicktags.js 文件
1. 找到
edButtons[edButtons.length] =
new edButton('ed_code'
,'code'
,'<code>'
,'</code>'
,'c'
);
在后面添加
edButtons[edButtons.length] =
new edButton('ed_coolcode'
,'coolcode'
,"
,'</coolcode>'
,'x'
);
2. 找到
else if (button.id == 'ed_link') {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertLink(edCanvas, ' + i + ');" value="' + button.display + '" />');
}
在后面添加
else if (button.id == 'ed_coolcode') {
document.write('<input type="button" id="' [...]
