代码解释
//添加按钮行为添加所需的按钮。
//删除按钮行120是必需的参数。具体参数请参考当前wordpress版本的/wp-includes/js/quicktags.js。
以下是5.2.4版本中的具体参数,大家可以根据自己的需要删除。
edButtons=newqt.TagButton('strong','b','<strong>','</strong>','','','',{ariaLabel:quicktagsL10n.strong,ariaLabelClose:quicktagsL10n.strongClose}); edButtons=newqt.TagButton('em','i','<em>','</em>','','','',{ariaLabel:quicktagsL10n.em,ariaLabelClose:quicktagsL10n.emClose}); edButtons[30]=newqt.LinkButton();//specialcase edButtons[40]=newqt.TagButton('block','b-quote','\n\n<blockquote>','</blockquote>\n\n','','','',{ariaLabel:quicktagsL10n.blockquote,ariaLabelClose:quicktagsL10n.blockquoteClose}); edButtons[50]=newqt.TagButton('del','del','<deldatetime="'+_datetime+'">','</del>','','','',{ariaLabel:quicktagsL10n.del,ariaLabelClose:quicktagsL10n.delClose}); edButtons[60]=newqt.TagButton('ins','ins','<insdatetime="'+_datetime+'">','</ins>','','','',{ariaLabel:quicktagsL10n.ins,ariaLabelClose:quicktagsL10n.insClose}); edButtons[70]=newqt.ImgButton();//specialcase edButtons[80]=newqt.TagButton('ul','ul','<ul>\n','</ul>\n\n','','','',{ariaLabel:quicktagsL10n.ul,ariaLabelClose:quicktagsL10n.ulClose}); edButtons[90]=newqt.TagButton('ol','ol','<ol>\n','</ol>\n\n','','','',{ariaLabel:quicktagsL10n.ol,ariaLabelClose:quicktagsL10n.olClose}); edButtons[100]=newqt.TagButton('li','li','\t<li>','</li>\n','','','',{ariaLabel:quicktagsL10n.li,ariaLabelClose:quicktagsL10n.liClose}); edButtons[110]=newqt.TagButton('code','code','<code>','</code>','','','',{ariaLabel:quicktagsL10n.code,ariaLabelClose:quicktagsL10n.codeClose}); edButtons[120]=newqt.TagButton('more','more','<!--more-->\n\n','','','','',{ariaLabel:quicktagsL10n.more}); edButtons[140]=newqt.CloseButton();效果显示:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)