Is there a possibility to ad a 'superscript' button to redactor?
Edit: I found an explanation here: How can I use <small> <sub> <sub> within a redactor/rich-text field?
But I can't get it to work.
I copy this snippet form: http://imperavi.com/redactor/examples/buttons-sup-and-sub/ to craft/app/resources/lib/redactor/plugins/subsup.js
if (!RedactorPlugins) var RedactorPlugins = {};
RedactorPlugins.scriptbuttons = function()
{
return {
init: function()
{
var sup = this.button.add('superscript', 'Superscript');
var sub = this.button.add('subscript', 'Subscript');
// make your added buttons as Font Awesome's icon
this.button.setAwesome('superscript', 'fa-superscript');
this.button.setAwesome('subscript', 'fa-subscript');
this.button.addCallback(sup, this.scriptbuttons.formatSup);
this.button.addCallback(sub, this.scriptbuttons.formatSub);
},
formatSup: function()
{
this.inline.format('sup');
},
formatSub: function()
{
this.inline.format('sub');
}
};
};
Then I call the plugin in a custom.json file like this:
{
buttons: ['link','bold', 'italic','unorderedlist','orderedlist','image','html'],
plugins: ['fullscreen', 'subsup'],
toolbarFixedBox: true
}
But that results in nothing. What do I miss?