Button configuration

Changing the default configuration of the buttons is possible by passing configuration attributes to them and it will affect only the button behavior, without affecting their position in the Toolbars. Both configuring the Toolbars and the buttons can be used giving maximum flexibility.

Passing configuration options to the buttons

The buttons are configured via a common buttonCfg property, like this:
var editor = AlloyEditor.editable('editable', {
    buttonCfg: {
        bold: {
            tabIndex: 1
        }
    }
});

The buttonCfg is the property which contains the configurations for the different buttons. In this example, bold is the name of the button, which has to be configured and tabIndex is the property with the new value of 1 (by default 0). Each button has a static property key which value is the button name as should be passed to the configuration.

The list of properties for each button can be retrieved from the API documentation, including the key property, which should be passed as button name in the configuration.

comments powered by Disqus