Dotclear

source: plugins/dcCKEditor/js/popup_posts.js @ 2901:dbcee3dd5b0c

Revision 2901:dbcee3dd5b0c, 640 bytes checked in by franck <carnet.franck.paul@…>, 11 years ago (diff)

Rollback revision [2898], and fixes #2043 by using another class

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="ref-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