Thank you very much for this. I’m encountering a problem I can’t get trought: when I load the module, whatever are the changes made in ckeditor.config (inside the module), the editor loaded is this one https://github.com/omeka/omeka-s/blob/e9203959333fdff1fcf6dd9bfa38298ab717a246/application/asset/vendor/ckeditor/config.js
My code is this (this is just the part for the button to appear).
In footnotes-admin.js:
// run once the page DOM is ready and loaded
$(document).ready(function() {
displayFootnotes();
});
$(window).on('load', function() {
displayFootnotes();
});
function displayFootnote() {
// Define a command that opens our dialog tab.
CKEDITOR.addCommand('little_footnotes', {
exec: function (editor) {
new CKEDITOR.dialogCommand('footnotesDialog');
}
});
// Create a toolbar button that executes the above command.
editor.ui.addButton('Little_footnotes', {
// The text part of the button (if available) and tooptip.
label: 'Insert Footnotes',
// The command to execute on click.
command: 'little_footnotes',
//The image of the button.
icon: this.path + '/icon/superscript-solid.png'
});
// Register the "footnote" dialog.
CKEDITOR.dialog.add( 'little_footnotesDialog', this.path + 'dialogs/foot-dialog.js' );
}
and in ckeditor_config.js:
config.toolbar = [
{ "name" : "advanced", "items" :
['Sourcedialog', '-',
'Link', 'Unlink', 'Anchor', '-',
'Format', 'Styles', 'PasteFromWord'
]
},
"/",
{ "items" :
['Bold', 'Italic', 'Underline', 'Strike', '-',
'NumberedList', 'BulletedList', 'Indent', 'Outdent', 'Blockquote', '-',
'Little_footnotes' //the footnote button
]
}
];
Maybe my code isn’t right so it loads the other version of the editor?