The forum operates in read-only mode. Please head to StackOverflow for support.
Hello,
I'd like to define a button on every CKEditor instance, but I have to do it instance by instance
editorInstance.addCommand(...
editorInstance.ui.addButton(...
Is there a way to apply it on every CKEditor instance ?
I finaly found something interesting
$(function () { // Adding m2 bouton on all instances for(var instanceName in CKEDITOR.instances) { CKEDITOR.instances[instanceName].addCommand("m2Commande", { exec: function(edt) { edt.insertHtml('m²'); } }); CKEDITOR.instances[instanceName].ui.addButton('m2Bouton', { label: "m2", command: 'm2Commande', toolbar: 'insert', icon: '/path/to/my/images/metrecarre.png' }); } });
I finaly found something
I finaly found something interesting