Ajout du bouton « Plinn Image » avec toute la glue qui va bien. Pour l'instant, le...
authorBenoît Pin <pin@cri.ensmp.fr>
Thu, 18 Aug 2011 09:57:55 +0000 (11:57 +0200)
committerBenoît Pin <pin@cri.ensmp.fr>
Thu, 18 Aug 2011 09:57:55 +0000 (11:57 +0200)
skins/ckeditor/config.js
skins/ckeditor/plugins/plinn_image/dialog/plinn_image.gif [new file with mode: 0644]
skins/ckeditor/plugins/plinn_image/plugin.js

index fdcad7b..2944bb0 100644 (file)
@@ -20,7 +20,7 @@ CKEDITOR.editorConfig = function( config )
                { name: 'basicstyles',  items : [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },\r
                { name: 'paragraph',    items : [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },\r
                { name: 'links',                items : [ 'Link', 'Unlink', 'Anchor' ] },\r
-               { name: 'insert',               items : [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'] },\r
+               { name: 'insert',               items : [ 'PlinnImage', 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'] },\r
        ];\r
        \r
        // context menu\r
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 (file)
index 0000000..9020ace
Binary files /dev/null and b/skins/ckeditor/plugins/plinn_image/dialog/plinn_image.gif differ
index afa30ce..442a2be 100644 (file)
@@ -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);
        }
 });