Revision 2751:a96ec5640056,
734 bytes
checked in by Nicolas <nikrou77@…>, 11 years ago
(diff) |
Each editor (ckeditor, legacy ones) loads its own context when it is active.
Add plugin_id parameter to transmit that context
Remove call of ckeditorExtraPlugins behavior until a good solution is found.
Closes #1983
|
Rev | Line | |
---|
[2738] | 1 | (function() { |
---|
| 2 | CKEDITOR.plugins.add('media', { |
---|
| 3 | icons: 'media', |
---|
| 4 | init: function(editor) { |
---|
| 5 | editor.addCommand('mediaCommand', { |
---|
| 6 | exec: function(editor) { |
---|
[2751] | 7 | $.toolbarPopup('media.php?popup=1&plugin_id=dcCKEditor'); |
---|
[2738] | 8 | } |
---|
| 9 | }); |
---|
[2743] | 10 | |
---|
[2738] | 11 | editor.ui.addButton('Media', { |
---|
[2743] | 12 | label: dotclear.msg.img_select_title, |
---|
[2738] | 13 | command: 'mediaCommand', |
---|
| 14 | toolbar: 'insert' |
---|
| 15 | }); |
---|
[2743] | 16 | |
---|
[2738] | 17 | editor.on('doubleclick',function(e) { |
---|
| 18 | var element = CKEDITOR.plugins.link.getSelectedLink(editor) || e.data.element; |
---|
| 19 | if (!element.isReadOnly()) { |
---|
| 20 | if (element.is('img') || (element.is('a') && element.hasClass('media-link'))) { |
---|
[2751] | 21 | $.toolbarPopup('media.php?popup=1&plugin_id=dcCKEditor'); |
---|
[2738] | 22 | return false; |
---|
| 23 | } |
---|
| 24 | } |
---|
| 25 | }); |
---|
| 26 | } |
---|
| 27 | }); |
---|
| 28 | })(); |
---|
| 29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.