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:

  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?

Was it helpful?

Solution

YUI Editor does not natively support this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top