dasundev/livewire-quill-text-editor
wire:model, wire:ignore).parchment, eventemitter3). Assess bundle size impact on performance-critical apps.LongText fields, JSON columns).Purifier or HTML Purifier).wire:init or wire:loaded.ckeditor, trix) and map features to Quill’s capabilities.mount(), hydrate()).@vite, @stack, or Livewire’s wire:styles).// Before (Trix)
$field = new TextInput('content');
// After (Livewire Quill)
use Dasun\LivewireQuillTextEditor\LivewireQuillTextEditor;
$field = LivewireQuillTextEditor::make('content')
->toolbar(['bold', 'italic', 'image']) // Customize toolbar
->sanitizeOutput(); // Add Purifier
text to json/longtext.composer.json).@quilljs/quill version).content field as json or text).Schema::table('posts', function (Blueprint $table) {
$table->longText('content')->nullable()->change();
});
composer require dasundev/livewire-quill-text-editor
npm install @quilljs/quill
use Dasun\LivewireQuillTextEditor\LivewireQuillTextEditor;
public function mount() {
$this->content = old('content', $this->post->content ?? '');
}
public function render() {
return view('livewire.post-editor', [
'editor' => LivewireQuillTextEditor::make('content')
->toolbar(['bold', 'italic', 'image'])
->theme('snow') // or 'bubble'
]);
}
Purifier):
use Purifier;
$this->content = Purifier::clean($this->content);
How can I help you explore Laravel packages today?