Merge branch '3.0'
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / js / 3rdParty / redactor2 / plugins / WoltLabButton.js
index a0b62f4f0539ae4e4c56f77e80092d81e1daae5f..e83f9500734f07a8a6c3fcd81226781596ee10e7 100644 (file)
@@ -166,7 +166,9 @@ $.Redactor.prototype.WoltLabButton = function() {
                        if (data.cancel !== true) {
                                this.buffer.set();
                                
-                               var html = '[' + bbcode + ']' + this.selection.html() + (this.selection.is() ? '' : this.marker.html()) + '[/' + bbcode + ']';
+                               var marker = this.marker.get();
+                               marker.classList.add('woltlab-bbcode-marker');
+                               var html = '[' + bbcode + ']' + this.selection.html() + marker.outerHTML + '[/' + bbcode + ']';
                                this.insert.html(html);
                                this.selection.restore();
                        }