From: Benoît Pin Date: Thu, 18 Aug 2011 09:57:55 +0000 (+0200) Subject: Ajout du bouton « Plinn Image » avec toute la glue qui va bien. Pour l'instant, le... X-Git-Tag: 3.6.1~12 X-Git-Url: https://scm.cri.ensmp.fr/git/ckeditor.git/commitdiff_plain/4bd080d5604dd3d2f4b172f061903f50df295234?hp=f4ee7f0b516759f9c90055bd9e51450ef058790f Ajout du bouton « Plinn Image » avec toute la glue qui va bien. Pour l'instant, le bouton de « Plinn Image » coexiste avec le bouton « Image » de ckeditor. --- diff --git a/skins/ckeditor/config.js b/skins/ckeditor/config.js index fdcad7b..2944bb0 100644 --- a/skins/ckeditor/config.js +++ b/skins/ckeditor/config.js @@ -20,7 +20,7 @@ CKEDITOR.editorConfig = function( config ) { name: 'basicstyles', items : [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] }, { name: 'links', items : [ 'Link', 'Unlink', 'Anchor' ] }, - { name: 'insert', items : [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'] }, + { name: 'insert', items : [ 'PlinnImage', 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'] }, ]; // context menu diff --git a/skins/ckeditor/plugins/plinn_image/dialog/plinn_image.gif b/skins/ckeditor/plugins/plinn_image/dialog/plinn_image.gif new file mode 100644 index 0000000..9020ace Binary files /dev/null and b/skins/ckeditor/plugins/plinn_image/dialog/plinn_image.gif differ diff --git a/skins/ckeditor/plugins/plinn_image/plugin.js b/skins/ckeditor/plugins/plinn_image/plugin.js index afa30ce..442a2be 100644 --- a/skins/ckeditor/plugins/plinn_image/plugin.js +++ b/skins/ckeditor/plugins/plinn_image/plugin.js @@ -42,6 +42,21 @@ CKEDITOR.plugins.add( 'plinn_image', } ); }); + + var command = editor.addCommand('plinn_image', + { + exec : function(editor) { + alert('Bonjour la France !'); + } + }); + + editor.ui.addButton('PlinnImage', + { + label : editor.lang.common.image, + icon : this.path + 'dialog/plinn_image.gif', + command : 'plinn_image' + }); + console.log(this.path); } });