Fixed empty paragraphs when pasting from Microsoft Word
authorAlexander Ebert <ebert@woltlab.com>
Mon, 6 Jul 2015 17:24:22 +0000 (19:24 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 6 Jul 2015 17:24:22 +0000 (19:24 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 8fb011b5dc985144469b71e7afb915e64a5f8901..d92327f8b25ea97660fe2ebca9370ddd7973d06a 100644 (file)
@@ -1547,6 +1547,9 @@ RedactorPlugins.wbbcode = function() {
                        });
                        html = html.replace(/<\/h[1-6]>/g, '[/size]');
                        
+                       // fix empty paragraphs when pasting from Microsoft Word
+                       html = html.replace(/<o:p>&nbsp;<\/o:p>/g, '<br>');
+                       
                        // convert block-level elements
                        html = html.replace(/<(article|header)[^>]+>/g, '<div>');
                        html = html.replace(/<\/(article|header)>/g, '</div>');