刀片:
<div wire:ignore class="form-row">
<div class="form-group col-md-12">
<label for="detail">Mô tả chi tiết</label>
<textarea wire:model='form.detail' class="form-control" id="detail" placeholder="Nhập thông tin chi tiết"></textarea>
</div>
</div>
脚本:
ClassicEditor
.create(document.querySelector('#detail'))
.then(editor => {
editor.model.document.on('change:data', () => {
@this.set('form.detail', editor.getData());
})
})
.catch(error => {
console.error(error);
});