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

How to set initial value and how to get Html text? #1

Closed
LaTrita97 opened this issue Dec 31, 2020 · 11 comments
Closed

How to set initial value and how to get Html text? #1

LaTrita97 opened this issue Dec 31, 2020 · 11 comments

Comments

@LaTrita97
Copy link

Hi, I've installed this plugin and I want to know two things:

  • How I set an initial value to QuillController?
  • How to get Html code from QuillController?

Best regards, thank you.

@singerdmx
Copy link
Owner

How I set an initial value to QuillController?

Check out https://github.com/singerdmx/flutter-quill/blob/master/app/lib/pages/home_page.dart#L33

@singerdmx
Copy link
Owner

singerdmx commented Dec 31, 2020

How to get Html code from QuillController?

Why do you need that?
HTML is only used by web. For web development, ReactQuill https://github.com/zenoamaro/react-quill is recommended to use for compatibility.
If you use our app https://bulletjournal.us/home/index.html, the way we solve it is to only use delta for data between mobile and web. HTML is actually not needed for mobile side. At web side, we use ReactQuill https://github.com/zenoamaro/react-quill to generate html.
Bullet Journal app https://bulletjournal.us/home/index.html is open sourced at https://github.com/singerdmx/BulletJournal

@LaTrita97
Copy link
Author

LaTrita97 commented Dec 31, 2020

Thanks for your help, but I need a plugin can I use with the Html code string

@nikolabrdaroski
Copy link

Hi, I've installed this plugin and I want to know two things:

* How I set an initial value to QuillController?

* How to get Html code from QuillController?

Best regards, thank you.

@LaTrita97 have you found some solution about this?

@singerdmx
Copy link
Owner

@nikolabrdaroski This issue is resolved already. What is missing that you still need help with?
What questions do you have?

@singerdmx
Copy link
Owner

@nikolabrdaroski @LaTrita97 I recommend you just use pub https://pub.dev/packages/flutter_quill for this.

@nikolabrdaroski
Copy link

@singerdmx

Yes, I already tried that.

But I have html as input to be shown in the editor, and then I need to get html as output to send further.

That is why I asked if there is possibility for html input/output.

@singerdmx
Copy link
Owner

Oh, now I understand your question.
No, our contact for this library is delta. HTML is not considered here by any mean.
You may want to check out if there is any library does the conversion between HTML and delta.

@singerdmx
Copy link
Owner

@dsyrstad
Copy link
Contributor

@LaTrita97 To get HTML, https://pub.dev/packages/vsc_quill_delta_to_html provides a robust delta to HTML conversion.

@mariam992001
Copy link

How I set an initial value to QuillController?

Check out https://github.com/singerdmx/flutter-quill/blob/master/app/lib/pages/home_page.dart#L33

Hi, what is the solve of this problem ?
I try to show the Html code in the QuillEditor as initial value , as Html Runner

Abdelkarimn added a commit to Abdelkarimn/flutter-quill that referenced this issue Sep 26, 2023
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

5 participants