diff --git a/mailpoet/lib/EmailEditor/Engine/Renderer/styles.css b/mailpoet/lib/EmailEditor/Engine/Renderer/styles.css index 2707965452..ad258f9efc 100644 --- a/mailpoet/lib/EmailEditor/Engine/Renderer/styles.css +++ b/mailpoet/lib/EmailEditor/Engine/Renderer/styles.css @@ -124,21 +124,6 @@ p { margin: 0; } -/* Resetting default browser margins to ensuring the same look in browser, email client and email editor */ -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0; -} - -ul, -ol, -li { - margin: 0; -} /* Wa want ensure the same design for all email clients */ ul, ol { diff --git a/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Heading.php b/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Heading.php index b02a834f22..da8a566554 100644 --- a/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Heading.php +++ b/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Heading.php @@ -8,13 +8,13 @@ use MailPoet\EmailEditor\Engine\SettingsController; class Heading implements BlockRenderer { public function render($blockContent, array $parsedBlock, SettingsController $settingsController): string { $contentStyles = $settingsController->getEmailContentStyles(); - return str_replace('{heading_content}', $blockContent, $this->prepareColumnTemplate($parsedBlock, $contentStyles)); + return str_replace('{heading_content}', $blockContent, $this->getBlockWrapper($parsedBlock, $contentStyles)); } /** * Based on MJML */ - private function prepareColumnTemplate(array $parsedBlock, array $contentStyles): string { + private function getBlockWrapper(array $parsedBlock, array $contentStyles): string { $styles = []; foreach ($parsedBlock['email_attrs'] ?? [] as $property => $value) { $styles[$property] = $value; @@ -28,9 +28,19 @@ class Heading implements BlockRenderer { } return ' -
- {heading_content} -
+ + + + +
+ {heading_content} +
'; }