extractData($value, 'html'); $html = str_replace($this->getHtmlStringsToRemove(), '', $html); return preg_replace('#]*>#', '', $html); } public function getCss(?string $value): ?string { return $this->extractData($value, 'css'); } protected function extractData(?string $value, string $key): ?string { $data = json_decode($value, true); return $data[$key] ?? ''; } protected function getHtmlStringsToRemove(): array { return [ 'draggable="true"', ]; } }