Skip to content

Instantly share code, notes, and snippets.

@nisanthchunduru
Last active August 29, 2015 14:19
Show Gist options
  • Save nisanthchunduru/a662860a3c5d46214172 to your computer and use it in GitHub Desktop.
Save nisanthchunduru/a662860a3c5d46214172 to your computer and use it in GitHub Desktop.
Control position of toolbar buttons added by Redactor plugins
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