How do I change YUI Editor's fontsize button from a spinner to a select?
-
27-09-2019 - |
Question
I'm implementing YUI Editor (2.8.2rc1), and need the font size to be a dropdown menu, much like the font name. It's a bonus if we can control the font sizes listed (12, 14, 16, 18, 24, 36).
Based on examples, I have the following, which does not work for two reasons:
- It doesn't work - the button no longer changes the font size
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?
Solution
YUI Editor does not natively support this.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow