Allow undoing of inserted attachments
authorAlexander Ebert <ebert@woltlab.com>
Mon, 6 Jun 2016 12:24:21 +0000 (14:24 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 6 Jun 2016 15:21:57 +0000 (17:21 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabAttachment.js

index cbadfd294a14b4f0489151c5d6f4dba58e6be5b6..79fd1e700f862af5ca21d3bf8c045650bd9a6015 100644 (file)
@@ -12,6 +12,8 @@ $.Redactor.prototype.WoltLabAttachment = function() {
                _insert: function(data) {
                        var attachmentId = data.attachmentId;
                        
+                       this.buffer.set();
+                       
                        if (data.url) {
                                this.insert.html('<img src="' + data.url + '" class="woltlabAttachment" data-attachment-id="' + attachmentId + '">');
                        }