-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rich text editor is empty when page refreshed #738
Comments
@lloydowen Can you provide full code that can be copy/pasted to reproduce the issue? Volt components are great, when possible. |
sure, <?php
use Livewire\Volt\Component;
new class extends Component {
public $content = '<h1>Hello World</h1>';
}; ?>
<div>
<flux:editor wire:model="content" />
</div> but adding <?php
use Livewire\Volt\Component;
new class extends Component {
public $content = '<h1>Hello World</h1>';
}; ?>
<div>
<flux:editor wire:model.live="content" />
</div> |
@lloydowen I tried your first example, and can't recreate the issue. Have you run |
Yes, i've tried that. Even if i output the content it's definitely there: <?php
use Livewire\Volt\Component;
new class extends Component {
public string $content = '<h1>Hello World</h1>';
}; ?>
<div>
<flux:editor wire:model="content"/>
<div class="prose dark:prose-invert">
{!! $content !!}
</div>
</div> It only works with |
@lloydowen Very strange. Have you inspected the Good luck with the deeper dive. I'm curious to hear what might be causing it. |
@lloydowen PS Plus make sure you are using Flux v1.0.27 as v1.0.26 had a dependency error. |
Same problem here - in combination with a Livewire Form. When I browse to the edit form using wire:navigate, the editor shows the desired content. If I refresh the page or browse to the page without wire:navigate, the editor is empty. There is no error in the dev console and there is no content in the editor (checked using dev console). As an addition, the editor is within a |
Ignore that, confirmed still an issue in |
When using a element like this:
However, if i refresh the page, or navigate via a traditional link the editor is initialised with no content.
When I navigate to a page with an editor using
wire:navigate
, the content displays as expected.I am filling the page on the mount method i.e.:
At this point,
$content
is filled with valid HTML (previously saved with the editor).Which is filling the
$content
property on the livewire component:There are no errors in the console to report.
The text was updated successfully, but these errors were encountered: