Using custom image edit template
authorAlexander Ebert <ebert@woltlab.com>
Mon, 6 Jun 2016 15:21:50 +0000 (17:21 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 6 Jun 2016 15:21:57 +0000 (17:21 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js [new file with mode: 0644]

diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js
new file mode 100644 (file)
index 0000000..bf11993
--- /dev/null
@@ -0,0 +1,24 @@
+$.Redactor.prototype.WoltLabImage = function() {
+       "use strict";
+       
+       return {
+               init: function() {
+                       // overwrite modal templates
+                       this.opts.modal['image-edit'] = '<div class="section">'
+                                       + '<dl>'
+                                               + '<dt><label>' + this.lang.get('title') + '</label></dt>'
+                                               + '<dd><input type="text" id="redactor-image-title" class="long"></dd>'
+                                       + '</dl>'
+                                       + '<dl>'
+                                               + '<dt><label>' + this.lang.get('link') + '</label></dt>'
+                                               + '<dd><input type="text" id="redactor-image-link" class="long" aria-label="' + this.lang.get('link') + '"></dd>'
+                                       + '</dl>'
+                                       + '<div class="formSubmit">'
+                                               + '<button id="redactor-modal-button-action" class="buttonPrimary">Insert</button>'
+                                               + '<button id="redactor-modal-button-delete" class="redactor-modal-button-offset">Delete</button>'
+                                       + '</div>'
+                               + '</div>';
+                       
+               }
+       };
+};
\ No newline at end of file