Add rendering improvements for Outlook
[MAILPOET-5705]
This commit is contained in:
committed by
Rostislav Wolný
parent
9122737523
commit
7792331999
@@ -157,7 +157,19 @@ class SettingsController {
|
||||
return trim($cssString); // Remove trailing space and return the formatted string
|
||||
}
|
||||
|
||||
private function parseNumberFromStringWithPixels(string $string): float {
|
||||
public function parseStylesToArray(string $styles): array {
|
||||
$styles = explode(';', $styles);
|
||||
$parsedStyles = [];
|
||||
foreach ($styles as $style) {
|
||||
$style = explode(':', $style);
|
||||
if (count($style) === 2) {
|
||||
$parsedStyles[trim($style[0])] = trim($style[1]);
|
||||
}
|
||||
}
|
||||
return $parsedStyles;
|
||||
}
|
||||
|
||||
public function parseNumberFromStringWithPixels(string $string): float {
|
||||
return (float)str_replace('px', '', $string);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user