From 5bcef9123e7a220c9f618ae0e09d7c03808e5500 Mon Sep 17 00:00:00 2001 From: Andrius Pratusis Date: Sun, 25 Feb 2018 13:47:56 +0200 Subject: [PATCH] Add files via upload Paypal plugin for TinyMCE --- .../tinymce/plugins/paypal/plugin.min.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bl-plugins/tinymce/tinymce/plugins/paypal/plugin.min.js diff --git a/bl-plugins/tinymce/tinymce/plugins/paypal/plugin.min.js b/bl-plugins/tinymce/tinymce/plugins/paypal/plugin.min.js new file mode 100644 index 00000000..393c784e --- /dev/null +++ b/bl-plugins/tinymce/tinymce/plugins/paypal/plugin.min.js @@ -0,0 +1,28 @@ +tinymce.PluginManager.add('paypal', function(editor, url) { + // Add a button that opens a window + editor.addButton('paypal', { + text: 'Paypal', + icon: false, + onclick: function() { + // Open window + editor.windowManager.open({ + title: 'Paypal Bludit plugin', + body: [ + {type: 'textbox', name: 'email', label: 'Your Paypal email'}, + {type: 'textbox', name: 'title', label: 'Title'}, + {type: 'textbox', name: 'price', label: 'Price'}, + {type: 'textbox', name: 'currency', label: 'Currency'}, + {type: 'textbox', name: 'url', label: 'Redirect to url after payment'} + ], + onsubmit: function(e) { + // Insert content when the window form is submitted + + var button="
"; + editor.insertContent(button); + } + }); + } + }); + + }); + \ No newline at end of file