Revision 2835:1a32b70ad212,
812 bytes
checked in by Nicolas <nikrou77@…>, 11 years ago
(diff) |
CKEditor : sizes of popups for media, links and links to entry can be choosen
|
Rev | Line | |
---|
[2738] | 1 | (function() { |
---|
| 2 | CKEDITOR.plugins.add('media', { |
---|
| 3 | icons: 'media', |
---|
| 4 | init: function(editor) { |
---|
[2835] | 5 | popup_params = { 'width': 760, 'height': 500}; |
---|
| 6 | |
---|
[2738] | 7 | editor.addCommand('mediaCommand', { |
---|
| 8 | exec: function(editor) { |
---|
[2835] | 9 | $.toolbarPopup('media.php?popup=1&plugin_id=dcCKEditor', popup_params); |
---|
[2738] | 10 | } |
---|
| 11 | }); |
---|
[2743] | 12 | |
---|
[2738] | 13 | editor.ui.addButton('Media', { |
---|
[2743] | 14 | label: dotclear.msg.img_select_title, |
---|
[2738] | 15 | command: 'mediaCommand', |
---|
| 16 | toolbar: 'insert' |
---|
| 17 | }); |
---|
[2743] | 18 | |
---|
[2738] | 19 | editor.on('doubleclick',function(e) { |
---|
| 20 | var element = CKEDITOR.plugins.link.getSelectedLink(editor) || e.data.element; |
---|
| 21 | if (!element.isReadOnly()) { |
---|
| 22 | if (element.is('img') || (element.is('a') && element.hasClass('media-link'))) { |
---|
[2835] | 23 | $.toolbarPopup('media.php?popup=1&plugin_id=dcCKEditor', popup_params); |
---|
[2738] | 24 | return false; |
---|
| 25 | } |
---|
| 26 | } |
---|
| 27 | }); |
---|
| 28 | } |
---|
| 29 | }); |
---|
| 30 | })(); |
---|
Note: See
TracBrowser
for help on using the repository browser.