equal
deleted
inserted
replaced
|
1 tinymce.PluginManager.add('internal_links', function(editor, url) { |
|
2 |
|
3 editor.addButton('internal_links', { |
|
4 icon: 'cloud-check', |
|
5 tooltip: "Insert internal link", |
|
6 image: '/--static--/pyams_content/img/external.png', |
|
7 onclick: function() { |
|
8 editor.windowManager.open({ |
|
9 title: "Insert internal link", |
|
10 body: [ |
|
11 {type: 'textbox', name: 'title', label: 'Link title', value: editor.selection.getContent()}, |
|
12 {type: 'textbox', name: 'oid', label:'Internal number'} |
|
13 ], |
|
14 onsubmit: function(e) { |
|
15 editor.insertContent('<a href="oid://' + e.data.oid + '">' + e.data.title + '</a>'); |
|
16 } |
|
17 }); |
|
18 } |
|
19 }) |
|
20 }); |