RichEditor: Dynamic mergeTags based on other fields value
I am building simple email templating, and want mergeTags to be dynamic based on other fields value.
When I select entities field, the mergeTags should have now have value based on the entity selected.
but mergeTags, still the same with initial value even after form update.
5 Replies
I don't think the editor will rerender once initialised. Maybe you can try a partial rerender, but I don't think that it will work:
->partiallaRenderComponentsAfterStateUpdated(['body'])Hi @Dennis Koch , thanks for the reply, but sadly it does not work. Is there a way to force editor to re render when change happen to the other field? Or it is really design in the way
I don't think so. The editor is
wire:ignored so any changes in Livewire won't affect it, because it would break its state. And the merge tags are rendered via Blade, so you can't control it via JS. Your only option is a full page reload.Thanks for this input π
and if you disable and enable it after changing the values?