给WordPress编辑器添加首行缩进标签

找到wp-includes/js/quicktags.js

edButtons[edButtons.length] =
new edButton(‘ed_more’
,’more’
,'<!–more–>’
,”
,’t’
,-1
);

在下方添加:

edButtons[edButtons.length] =
new edButton(‘ed_para2em’
,’para2em’
,'<p style=”text-indent:2em”>’
,'</p>’
,’pa’
);

刷新后就可以看到para2em首行缩进的标签了。

评论

《 “给WordPress编辑器添加首行缩进标签” 》 有 4 条评论

  1. 这是什么,看不懂

  2. 博主能截个后台的图不。
    偶没有成功。

    1. 不好意思,因为wordpress更新频繁,我已经没加这个代码了。

  3. 一直想实现这个功能,目前我还没有做到

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理