disallowList = explode(',', $value); } public function render(): string { $this->mergeClass('w-full flex flex-col bg-elevated border-3 border-contrast rounded-lg overflow-hidden focus-within:ring-accent'); $wrapperClass = $this->attributes['class']; $this->attributes['class'] = 'bg-elevated border-none focus:border-none focus:outline-none focus:ring-0 w-full h-full'; $this->attributes['rows'] = 6; $textarea = form_textarea( $this->attributes, old($this->name, $this->value) ); $markdownIcon = icon('markdown-fill', [ 'class' => 'mr-1 text-lg opacity-40', ]); $translations = [ 'write' => lang('Common.forms.editor.write'), 'preview' => lang('Common.forms.editor.preview'), 'help' => lang('Common.forms.editor.help'), ]; $toolbarGroups = [ [ [ 'name' => 'header', 'tag' => 'md-header', 'icon' => icon('heading'), ], [ 'name' => 'bold', 'tag' => 'md-bold', 'icon' => icon('bold'), ], [ 'name' => 'italic', 'tag' => 'md-italic', 'icon' => icon('italic'), ], ], [ [ 'name' => 'unordered-list', 'tag' => 'md-unordered-list', 'icon' => icon('list-unordered'), ], [ 'name' => 'ordered-list', 'tag' => 'md-ordered-list ', 'icon' => icon('list-ordered-2'), ], ], [ [ 'name' => 'link', 'tag' => 'md-link', 'icon' => icon('link'), ], [ 'name' => 'image', 'tag' => 'md-image', 'icon' => icon('image-add-fill'), ], ], ]; $toolbarContent = ''; foreach ($toolbarGroups as $buttonsGroup) { $toolbarContent .= '