Dotclear

source: plugins/dcCKEditor/js/popup_posts.js @ 2751:a96ec5640056

Revision 2751:a96ec5640056, 636 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

Line 
1$(function() {
2     $('#link-insert-cancel').click(function() {
3          window.close();
4     });
5
6     $('#form-entries tr>td.maximal>a').click(function(e) {
7          e.preventDefault();
8          var editor_name = window.opener.$.getEditorName(),
9          editor = window.opener.CKEDITOR.instances[editor_name],
10          link = '',
11          selected_text = editor.getSelection().getNative().toString();
12
13          if (editor.mode=='wysiwyg') {
14               link = '<a class="post" href="'+window.opener.$.stripBaseURL($(this).attr('title'))+'">'+selected_text+'</a>';
15               var element = window.opener.CKEDITOR.dom.element.createFromHtml(link);
16               editor.insertElement(element);
17          }
18          window.close();
19     });
20});
Note: See TracBrowser for help on using the repository browser.

Sites map