Last active
August 29, 2015 14:19
-
-
Save nisanthchunduru/a662860a3c5d46214172 to your computer and use it in GitHub Desktop.
Control position of toolbar buttons added by Redactor plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RedactorPlugins.fontcolor = function () { | |
init: function() { | |
// code | |
// Would be nice to have something like | |
this.registerButton(buttonKey, buttonTitle, buttonCallback, buttonDropDown) | |
// instead of | |
// this.buttonAdd(buttonKey, buttonTitle, buttonCallback, buttonDropDown) | |
// which just adds the button to the end of the toolbar | |
// code | |
} | |
} | |
$('#redactor').redactor({ | |
plugins: ['fontcolor'], | |
buttons: [ | |
'formatting', | |
'|', | |
'bold', 'italic', | |
'|', | |
'fontcolor', // And then control position of plugin buttons | |
'|', | |
'alignment' | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment