source: trunk/library/ckeditor/plugins/expresso/plugin.js @ 5081

Revision 5081, 1.7 KB checked in by airton, 13 years ago (diff)

Ticket #2086 - Troca do atual editor de emails do expresso - Adicionando a biblioteca ckeditor

  • Property svn:executable set to *
Line 
1
2
3CKEDITOR.plugins.add('expresso',
4{
5   
6    init: function (editor) {
7        var pluginName = 'expresso';
8        editor.ui.addButton('expAddImage',
9            {
10                label: 'Adicionar Imagem',
11                command: 'expAddImageCMD',
12                icon: CKEDITOR.plugins.getPath('expresso') + 'img/Image.gif'
13            });
14                       
15        editor.ui.addRichCombo('expSignature',
16        {
17                    label: 'Assinaturas',
18                    voiceLabel : "Assinaturas",
19                    title: 'Assinaturas',
20                    className : 'cke_format',
21                    panel :
22                    {
23                           css : [ CKEDITOR.config.contentsCss, CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ],
24                           voiceLabel : 'xala'
25                    },
26
27                    init : function()
28                    {
29                         var options = RichTextEditor.getSignaturesOptions();
30                         for( var key in options )
31                             this.add(  options[key],key,key);   
32                                             
33                    },
34                   
35                    onClick : function( value )
36                    {         
37                       editor.focus();
38                       editor.fire( 'saveSnapshot' );
39                       editor.insertHtml(unescape(value));
40                       editor.fire( 'saveSnapshot' );
41                    }
42
43        });
44       
45         
46        var cmd = editor.addCommand('expAddImageCMD',  { exec: showexpIncImageDialog });
47    }
48});
49function showexpIncImageDialog(e) {
50   RichTextEditor.createImage();
51}
Note: See TracBrowser for help on using the repository browser.