--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/skin/resources/js/tinymce/onflinks/plugin.js Thu Oct 08 13:37:29 2015 +0200
@@ -0,0 +1,20 @@
+tinymce.PluginManager.add('onflinks', function(editor, url) {
+
+ editor.addButton('onflinks', {
+ icon: 'cloud-check',
+ tooltip: "Insert internal link",
+ image: '/--static--/pyams_content/img/external.png',
+ onclick: function() {
+ editor.windowManager.open({
+ title: "Insert internal link",
+ body: [
+ {type: 'textbox', name: 'title', label: 'Link title', value: editor.selection.getContent()},
+ {type: 'textbox', name: 'oid', label:'Internal number'}
+ ],
+ onsubmit: function(e) {
+ editor.insertContent('<a href="oid://' + e.data.oid + '">' + e.data.title + '</a>');
+ }
+ });
+ }
+ })
+});