add cleanup of html string extracted from grapesjs content
This commit is contained in:
parent
6e0a4107c7
commit
cf3bc02ed7
|
@ -25,6 +25,8 @@ class GrapesJsExtension extends AbstractExtension
|
|||
{
|
||||
$html = $this->extractData($value, 'html');
|
||||
|
||||
$html = str_replace($this->getHtmlStringsToRemove(), '', $html);
|
||||
|
||||
return preg_replace('#</?body[^>]*>#', '', $html);
|
||||
}
|
||||
|
||||
|
@ -39,4 +41,11 @@ class GrapesJsExtension extends AbstractExtension
|
|||
|
||||
return $data[$key] ?? '';
|
||||
}
|
||||
|
||||
protected function getHtmlStringsToRemove(): array
|
||||
{
|
||||
return [
|
||||
'draggable="true"',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue