Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save parmonov98/939069a64a411392e05fc9ca0bf2831b to your computer and use it in GitHub Desktop.
Save parmonov98/939069a64a411392e05fc9ca0bf2831b to your computer and use it in GitHub Desktop.
Setting Summernote for Laravel Livewire
// HTML
<div class="col-md-12">
<div class="form-group" wire:ignore>
<label for="desciption">Deskripsi</label>
<textarea type="text" input="description" id="summernote" class="form-control summernote">{{ $description }}</textarea>
</div>
</div>
// JAVASCRIPT
$('.summernote').summernote({
tabsize: 2,
height: 200,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video']],
['view', ['fullscreen', 'codeview', 'help']]
],
callbacks: {
onChange: function(contents, $editable) {
@this.set('description', contents);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment