Skip to content
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

Flux Editor - streaming content #1021

Closed
3 tasks done
ddebowczyk opened this issue Jan 23, 2025 · 1 comment
Closed
3 tasks done

Flux Editor - streaming content #1021

ddebowczyk opened this issue Jan 23, 2025 · 1 comment

Comments

@ddebowczyk
Copy link

Flux version

1.1.3

Livewire version

3.5.18

What is the problem?

Is there a way to stream content to flux:editor content?

When streaming content to flux:editor component, the streamed content shows up unstyled (most likely replacing underlying editor elements).

Also, it requires page refresh to get the editor styling back.

Possibly the component is not designed to work with streaming content, but any guidance in the docs on how to handle this would be useful.

Code snippets

<flux:editor wire:model.live.debounce.2000ms="content" class="font-mono">
        <flux:editor.content wire:stream="contentStream"/>
</flux:editor>
$this->stream(
         to: 'contentStream',
         content: $partialResponse->content(),
         replace: true
);

How do you expect it to work?

I'd expect the component to:

  • just update the content without replacing underlying HTML
  • support appending (currently I'm sending accumulated content with every update)

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.
@ddebowczyk
Copy link
Author

Another problem I've found is that formatting (new line characters, Markdown) from the content streamed into Flux Editor is ignored - the content just shows up as a single line wrapped within editor window boundaries.

I sense like I am misusing or misunderstanding how this component is intended to work.

@ddebowczyk ddebowczyk closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant