remove the tag <body> from grapesjs html output (in twig filter)
This commit is contained in:
parent
3399b255b1
commit
c7f9fc94b0
|
@ -23,7 +23,9 @@ class GrapesJsExtension extends AbstractExtension
|
||||||
|
|
||||||
public function getHtml(?string $value): ?string
|
public function getHtml(?string $value): ?string
|
||||||
{
|
{
|
||||||
return $this->extractData($value, 'html');
|
$html = $this->extractData($value, 'html');
|
||||||
|
|
||||||
|
return preg_replace('#</?body[^>]*>#', '', $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCss(?string $value): ?string
|
public function getCss(?string $value): ?string
|
||||||
|
|
Loading…
Reference in a new issue