From 648f366209cf540046a4cae993579796f9ad20d1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 27 Jul 2014 17:24:10 +0200 Subject: [PATCH] Fixed align BBCode --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index ce62f6d1d1..7b922ffcca 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -319,7 +319,9 @@ RedactorPlugins.wbbcode = { html = $result; // [align] - html = html.replace(/
([\s\S]*?)<\/div>/gi, "[align=$1]$2[/align]"); + html = html.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi, function(match, tag, alignment, content) { + return '[align=' + alignment + ']' + $.trim(content) + '[/align]'; + }); // [*] html = html.replace(/
  • /gi, '[*]'); -- 2.20.1