-
Notifications
You must be signed in to change notification settings - Fork 62
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
Editor cannot be used outside of a Livewire component #802
Comments
Looks like the error when using livewire blade directives outside of a livewire component. For me replacing the |
@mauritskorse at this stage, using Flux components outside of a Livewire component isn't officially supported (although most components will work). @calebporzio I wonder whether we could have something users can add to a service provider (or a config option - although I prefer adding to a service provider) to disable including the assets in Something like class AppServiceProvider
{
public function boot()
{
FluxPro::injectEditorAssets(false);
}
} |
Ah, yes, that sounds fair :) |
@andyunleashed and @mauritskorse I've submitted a Livewire PR livewire/livewire#9135 which allows That will mean that the editor component can render properly outside of a Livewire component successfully. So if that PR gets merged, then this issue will be closed. BUT it won't necessarily allow the editor component to work properly outside of Livewire yet. We have another open issue #341 though to keep track of allowing Flux's custom input elements (including the editor) to work outside of Livewire, which you can follow there. |
The Livewire PR has been merged, but it won't be available until a Livewire release has been tagged. |
This release will be super helpful for me since we're just at the wireframing stage in a current project. Thanks @joshhanley for the feature! |
@SimonHFrost this was released last week in Livewire v3.5.19 🙂 |
Using the boilerplate component, customized with a model or not - e.g
<flux:editor wire:model="content" label="…" description="…" />
throws this error:Using $this when not in object context
I tried publishing the component and then looking at the code inside and if I comment out the assets method - e.g:
It does load without an issue:

The text was updated successfully, but these errors were encountered: