简体   繁体   English

如何将YUI编辑器的fontsize按钮从微调器更改为选择?

[英]How do I change YUI Editor's fontsize button from a spinner to a select?

I'm implementing YUI Editor (2.8.2rc1), and need the font size to be a dropdown menu, much like the font name. 我正在实现YUI编辑器(2.8.2rc1),并且需要将字体大小作为下拉菜单,就像字体名称一样。 It's a bonus if we can control the font sizes listed (12, 14, 16, 18, 24, 36). 如果我们可以控制列出的字体大小(12、14、16、18、24、36),这是一个好处。

Based on examples, I have the following, which does not work for two reasons: 根据示例,我有以下原因,由于两个原因,该方法不起作用:

  1. It doesn't work - the button no longer changes the font size 它不起作用-该按钮不再更改字体大小
  2. It erases all other buttons 删除所有其他按钮

     var myConfig = { height: '300px', width: '600px', dompath: true, focusAtStart: true, toolbar: { buttons: [ { type: 'select', label: '13', value: 'fontsize', disabled: true, menu: [ { text: '12' }, { text: '14', checked: true }, { text: '16' }, { text: '18' }, { text: '24' }, { text: '36' } ] } ] } }; var myEditor = new YAHOO.widget.Editor('editor', myConfig); 

So... how do I change this button from a spinner to a dropdown without affecting the other buttons? 那么...如何在不影响其他按钮的情况下将该按钮从微调按钮更改为下拉菜单?

YUI编辑器本身不支持此功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM