문제

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?

도움이 되었습니까?

해결책

YUI Editor does not natively support this.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top