获取 TinyMCE 4 Font Sizes 下拉列表以设置 px 而不是 pt 的字体大小 [英] Getting the TinyMCE 4 Font Sizes drop down to set the font size in px instead of pt

查看:132
本文介绍了获取 TinyMCE 4 Font Sizes 下拉列表以设置 px 而不是 pt 的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人看到一种方法可以让 TinyMCE 4 Font Sizes 下拉提供 px 而不是 pt 的字体大小?

Does anyone see a way to make the TinyMCE 4 Font Sizes drop down offer font sizes in px instead of pt?

谢谢

推荐答案

您需要使用 fontsize_formats 选项,您还可以在其中更改字体大小下拉列表的值的单位:

You need to use the fontsize_formats option where you can also change the unit of the values of the font sizes dropdown:

tinymce.init({
    selector: 'textarea',
    toolbar: 'fontsizeselect',
    fontsize_formats: "8px 10px 12px 14px 18px 24px 36px"
});

演示 JSFiddle.

这篇关于获取 TinyMCE 4 Font Sizes 下拉列表以设置 px 而不是 pt 的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆