robsontenorio / mary

Laravel Blade UI Components for Livewire 3
https://mary-ui.com
Other
804 stars 88 forks source link

Update of property associated with rich text editor #464

Closed bestmomo closed 1 month ago

bestmomo commented 1 month ago

maryUI version

1.32.0

daisyUI version

4.11.1

Livewire version

3.5.0

What browsers are affected?

Firefox

What happened?

hello,

I use the rich text editor with TinyMCE SDK. All works well, but there is a weird issue. The property associated to the editor is updated when I add or remove text but not immediately when I change style (for example set H1 or bold on text), or when I change justification or add an image. The property is only updated when text is added or removed (works also when an image is removed).

It's easy to see this using this simple code:

new class extends Component {
    public string $text = '';
}; ?>

<div>
    <x-editor wire:model="text" label="Description" />
    <br>
    <textarea wire:model="text" rows="10"></textarea>
</div>

So we see when the property is updated in textarea.

Then you should always take the precaution of performing an insert action before saving, at the risk of missing the latest events if they are not taken into account.

robsontenorio commented 1 month ago

Related to #463

bestmomo commented 1 month ago

Related to #463

Didn't see it before, maybe close this one so.

robsontenorio commented 1 month ago

Fixed on 1.32.1

bestmomo commented 1 month ago

Thank you