From 3c90f59d7233d6e527606079f4d83a6181baa119 Mon Sep 17 00:00:00 2001 From: Thomas Weinert Date: Tue, 5 Jun 2018 12:20:33 +0200 Subject: [PATCH] Do not overwrite existing style parts for center images --- src/system/papaya_parser.php | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/system/papaya_parser.php b/src/system/papaya_parser.php index 55da3fd25..6bca401b7 100644 --- a/src/system/papaya_parser.php +++ b/src/system/papaya_parser.php @@ -1,21 +1,17 @@ 0) { $style .= ' margin-top: '.(int)$borderData['top'].'px;'; @@ -910,7 +906,7 @@ function createImageTag($params, $data) { $style .= ' float: right;'; break; case 'center': - $style = ' display: block; text-align: center;'. + $style .= ' display: block; text-align: center;'. ' margin-left: auto; margin-right: auto;'; if (isset($style['top']) && $style['top'] > 0) { $style .= ' margin-top: '.(int)$borderData['top'].'px;';