1. Go to this page and download the library: Download joelwmale/livewire-quill library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
joelwmale / livewire-quill example snippets
return [
/*
* The base folder to store the images in
*/'storage_folder' => env('LIVEWIRE_QUILL_STORAGE_FOLDER', 'images'),
/*
* Should the images be stored publically or not
*/'store_publically' => env('LIVEWIRE_QUILL_STORE_PUBLICALLY', true),
/*
* Should the images be deleted from the server once deleted in the editor
* or retained for future use (note: the package will never re-use the same image)
*/'clean_up_deleted_images' => env('LIVEWIRE_QUILL_CLEAN_UP_DELETED_IMAGES', true),
/*
* The base classes to use for all instances of the editor
*/'editor_classes' => env('LIVEWIRE_QUILL_EDITOR_CLASSES', 'bg-white'),
/**
* The toolbar options to use for all instances of the editor
*/'editor_toolbar' => env('LIVEWIRE_QUILL_EDITOR_TOOLBAR', [
[
[
'header' => [1, 2, 3, 4, 5, 6, false],
],
],
['bold', 'italic', 'underline'],
[
[
'list' => 'ordered',
],
[
'list' => 'bullet',
],
],
['link'],
['image'],
]),
];
@livewire('livewire-quill', [
'quillId' => 'customQuillId',
'data' => $content,
'placeholder' => 'Type something...',
'classes' => 'bg-white text-primary', // optional classes that can be added to the editor, that are added for this instance only'toolbar' => [
[
[
'header' => [1, 2, 3, 4, 5, 6, false],
],
],
['bold', 'italic', 'underline'],
[
[
'list' => 'ordered',
],
[
'list' => 'bullet',
],
],
['link'],
['image'],
],
'mergeToolbar' => true, // optional, if you want to merge the toolbar with the default toolbar configuration
])
useJoelwmale\LivewireQuill\Traits\HasQuillEditor;
classSomeLivewireComponentextendsComponent{
useHasQuillEditor;
publicfunctioncontentChanged($editorId, $content){
// $editorId is the id use when you initiated the livewire component// $content is the raw text editor content// save to the local variable...$this->content = $content;
}
}