Improved pasting of multi-line content
authorAlexander Ebert <ebert@woltlab.com>
Mon, 23 Feb 2015 13:47:59 +0000 (14:47 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 23 Feb 2015 13:47:59 +0000 (14:47 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 144ecb840a37ce2004ef881c443cb09f398f3fb3..33ee10cd1381dca46238c18549d8ef5c4beabcb5 100644 (file)
@@ -1388,7 +1388,7 @@ RedactorPlugins.wbbcode = function() {
                 * @return      string
                 */
                _pasteCallback: function(html) {
-                       var $uuid = WCF.getUUID();
+                       /*var $uuid = WCF.getUUID();
                        
                        // replace <p>...</p> with <p>...</p><p><br></p> unless there is already a newline
                        html = html.replace(/<p>([\s\S]*?)<\/p>/gi, function(match, content) {
@@ -1398,14 +1398,13 @@ RedactorPlugins.wbbcode = function() {
                                
                                return match + '@@@' + $uuid + '@@@';
                        });
-                       
                        html = html.replace(new RegExp('@@@' + $uuid + '@@@(<p><br(?: /)?></p>)?', 'g'), function(match, next) {
                                if (next) {
                                        return next;
                                }
                                
                                return '<p><br></p>';
-                       });
+                       });*/
                        
                        // restore font size
                        html = html.replace(/\[size=(\d+)\]/g, '<p><span style="font-size: $1pt">');