From: Alexander Ebert Date: Mon, 6 Jul 2015 17:24:22 +0000 (+0200) Subject: Fixed empty paragraphs when pasting from Microsoft Word X-Git-Tag: 2.1.6~14^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34a864726ad9886e24be914de70fb97ec44a9f79;p=GitHub%2FWoltLab%2FWCF.git Fixed empty paragraphs when pasting from Microsoft Word --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 8fb011b5dc..d92327f8b2 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -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>/g, '
'); + // convert block-level elements html = html.replace(/<(article|header)[^>]+>/g, '
'); html = html.replace(/<\/(article|header)>/g, '
');