Fixed pasting of text only
authorAlexander Ebert <ebert@woltlab.com>
Wed, 28 Sep 2016 08:03:24 +0000 (10:03 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 28 Sep 2016 09:36:09 +0000 (11:36 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js

index 4f86b60c3d73b3ba9fcc8a6e02bc55f8f9f3cfb2..29a0d09905ef6dad013e85672fb6d04e712dd107 100644 (file)
@@ -145,7 +145,7 @@ $.Redactor.prototype.WoltLabPaste = function() {
                                
                                var marker = elBySel('woltlab-selection-marker', this.$editor[0]);
                                if (marker) {
-                                       this.caret.end(marker.previousElementSibling);
+                                       this.caret.end(marker.previousElementSibling || marker.parentNode);
                                        elRemove(marker);
                                }