WordPress后台编辑器里已经内置了一些标签

edButtons[10] = new qt.TagButton(‘strong’,’b’,’‘,’‘,’b’);
edButtons[20] = new qt.TagButton(’em’,’i’,’‘,’‘,’i’),
edButtons[30] = new qt.LinkButton(), // special case
edButtons[40] = new qt.TagButton(‘block’,’b-quote’,’\n\n

‘,’

\n\n’,’q’),
edButtons[50] = new qt.TagButton(‘del’,’del’,’‘,’‘,’d’),
edButtons[60] = new qt.TagButton(‘ins’,’ins’,’‘,’‘,’s’),
edButtons[70] = new qt.ImgButton(), // special case
edButtons[80] = new qt.TagButton(‘ul’,’ul’,’

\n’,’

\n\n’,’u’),
edButtons[90] = new qt.TagButton(‘ol’,’ol’,’

\n’,’

\n\n’,’o’),
edButtons[100] = new qt.TagButton(‘li’,’li’,’\t

  • ‘,’ \n’,’l’),
    edButtons[110] = new qt.TagButton(‘code’,’code’,’','‘,’c’),
    edButtons[120] = new qt.TagButton(‘more’,’more’,’

‘,”,’t’),

edButtons[140] = new qt.CloseButton();

如果想再优化一下,添加自己常用的标签,可以打开 /wp-includes/js/quicktags.min.js
在文件的最后加上自己的tag:

QTags.addButton( ‘js’, ‘js’, ‘‘, ‘‘ );
QTags.addButton( ‘h5’, ‘h5’, ‘

‘, ‘

‘ );
QTags.addButton( ‘h6’, ‘h6’, ‘

‘, ‘

‘ );
QTags.addButton( ‘br’, ‘br’, ‘
‘ );

嗯,仅以此文章警示自己,先看文档再做事。