admin管理员组文章数量:1389975
I write a programming blog, so sometimes I just have to write a word to represent a command
or function
which I like writing between the code tags. (See, what I just did there).
So, just like StackExchange has the "code" button, is there a plugin to add this button to the visual editor? I know I got it on the HTML editor, but I rarely use it.
I was thinking of writing a plugin for this, but just in case I'm asking first in case anyone knows of a plugin doing this already.
I write a programming blog, so sometimes I just have to write a word to represent a command
or function
which I like writing between the code tags. (See, what I just did there).
So, just like StackExchange has the "code" button, is there a plugin to add this button to the visual editor? I know I got it on the HTML editor, but I rarely use it.
I was thinking of writing a plugin for this, but just in case I'm asking first in case anyone knows of a plugin doing this already.
Share Improve this question asked Jan 25, 2011 at 0:52 Fernando BrianoFernando Briano 2,2491 gold badge22 silver badges29 bronze badges3 Answers
Reset to default 3There seem to be a few people scratching this itch over at the TinyMCE sourceforge tracker. http://sourceforge/tracker/?group_id=103281&atid=738747
This looks promising.. "CodeExtras adds <var> and <code>
markup buttons - ID: 2904557"
http://sourceforge/tracker/?func=detail&aid=2904557&group_id=103281&atid=738747
I haven't tested this code, but I think it should work:
add_filter('mce_buttons','rw_mce_buttons');
function rw_mce_buttons($mce_buttons) {
$mce_buttons[] = 'code';
return $mce_buttons;
}
You can press Shift+Alt+X
when you have hovered the text.
All Wordpress Editor keyboard shortcuts: https://danigeorgiev/wordpress-editor-tinymce-keyboard-shortcuts/
本文标签: Is there a plugin to show the code tag button on the visual editor
版权声明:本文标题:Is there a plugin to show the code tag button on the visual editor? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744689301a2619894.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论