Comment puis-je appeler test() à l'intérieur de cette méthode? C'est possible?Comment puis-je appeler cette fonction à l'intérieur de ce javascript anonyme? (Exemple TinyMce)
(function() {
tinymce.create('tinymce.plugins.WrImagerPlugin', {
init : function(editor, url) {
editor.addCommand('mceWrImagerLink', function() {
//--> how can i refer to test() here?
});
},
test: function() {alert('test');}
}
});
tinymce.PluginManager.add('wr_imager', tinymce.plugins.WrImagerPlugin);
})();
+1 j'aime votre réponse, de très bonnes alternatives! La solution d'Alsciende est un peu plus proche de mes besoins, alors obtenez la note acceptée (pour moi) – apelliciari