加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > wordpress > 正文

WordPress后台编辑器快速标签

发布时间:2020-12-14 14:31:58 所属栏目:wordpress 来源:网络整理
导读:由站长 通过网络收集整理的代码片段。编程之家小编现在分享给大家,也给大家做个参考。 wordpress 后台编辑器里已经内置了一些标签(/wp-includes/js/quicktags.min.js) edButtons[10] = new qt.TagButton('strong','b','strong','/strong','

以下代码由PHP站长网 52php.cn收集自互联网现在PHP站长网小编把它分享给大家,仅供参考

wordpress 后台编辑器里已经内置了一些标签(/wp-includes/js/quicktags.min.js)

edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>','b');

edButtons[20] = new qt.TagButton('em','i','<em>','</em>','i'),

edButtons[30] = new qt.LinkButton(),// special case

edButtons[40] = new qt.TagButton('block','b-quote','nn<blockquote>','</blockquote>nn','q'),

edButtons[50] = new qt.TagButton('del','del','<del datetime="' + _datetime + '">','</del>','d'),

edButtons[60] = new qt.TagButton('ins','ins','<ins datetime="' + _datetime + '">','</ins>','s'),

edButtons[70] = new qt.ImgButton(),// special case

edButtons[80] = new qt.TagButton('ul','ul','<ul>n','</ul>nn','u'),

edButtons[90] = new qt.TagButton('ol','ol','<ol>n','</ol>nn','o'),

edButtons[100] = new qt.TagButton('li','li','t<li>','</li>n','l'),

edButtons[110] = new qt.TagButton('code','code','<code>','</code>','c'),

edButtons[120] = new qt.TagButton('more','more','<span id="more-16803"></span>','','t'),

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

如果想再优化一下,添加自己常用的标签,可以打开 /wp-includes/js/quicktags.min.js


在文件的最后加上自己的 tag:

QTags.addButton( 'js','js','<coolcode lang="javascript">','</coolcode>' );

QTags.addButton( 'h5','h5','<h5>','</h5>' );

QTags.addButton( 'h6','h6','<h6>','</h6>' );

QTags.addButton( 'br','br','<br />' );

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

以上内容由PHP站长网【52php.cn】收集整理供大家参考研究如果以上内容对您有帮助,欢迎收藏、点赞、推荐、分享。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读