|
|
|
@ -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"', |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|