-
Notifications
You must be signed in to change notification settings - Fork 835
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
chore: drop support for HTML, PDF, and Markdown converting functions #1997
Conversation
…nd will be only used internally
ec174de
to
cc22e00
Compare
f972dcf
to
f50f172
Compare
Maybe we should move the changes to The We could also consider moving Unrelated bug in `flutter_quill_delta_from_html`It seems that the package
The previous approach supports nested lists while causing some other issues, the new |
Can you provide me with the text you used as an example (I mean if you used I saw the README, that has the nested list with |
Copying the following from README in the Table of contents section: - [Flutter Quill](#flutter-quill)
- [📚 Table of contents](#-table-of-contents)
- [📸 Screenshots](#-screenshots)
- [📦 Installation](#-installation)
- [🛠 Platform Specific Configurations](#-platform-specific-configurations)
- [🚀 Usage](#-usage)
- [🔄 Migration](#-migration)
- [🔤 Input / Output](#-input--output)
- [🔗 Links](#-links)
- [⚙️ Configurations](#️-configurations)
- [🔗 Links](#-links-1)
- [🖋 Font Family](#-font-family)
- [📦 Embed Blocks](#-embed-blocks)
- [🛠️ Using the embed blocks from `flutter_quill_extensions`](#️-using-the-embed-blocks-from-flutter_quill_extensions)
- [🔗 Links](#-links-2)
- [🔄 Conversion to HTML](#-conversion-to-html)
- [🌐 Translation](#-translation)
- [🧪 Testing](#-testing)
- [👥 Contributors](#-contributors)
Which is in Markdown, and rendered in GitHub which uses HTML, calling platform-specific code <body><ul dir="auto" style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: var(--base-size-16); color: rgb(230, 237, 243); font-family: -apple-system, "system-ui", "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="box-sizing: border-box;"><a href="https://github.com/singerdmx/flutter-quill#flutter-quill" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">Flutter Quill</a><ul dir="auto" style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://github.com/singerdmx/flutter-quill#-table-of-contents" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">📚 Table of contents</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-screenshots" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">📸 Screenshots</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-installation" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">📦 Installation</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-platform-specific-configurations" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🛠 Platform Specific Configurations</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-usage" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🚀 Usage</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-migration" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🔄 Migration</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-input--output" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🔤 Input / Output</a><ul dir="auto" style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://github.com/singerdmx/flutter-quill#-links" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🔗 Links</a></li></ul></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#%EF%B8%8F-configurations" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">⚙️ Configurations</a><ul dir="auto" style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://github.com/singerdmx/flutter-quill#-links-1" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🔗 Links</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-font-family" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🖋 Font Family</a></li></ul></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-embed-blocks" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">📦 Embed Blocks</a><ul dir="auto" style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 0px;"><li style="box-sizing: border-box;"><a href="https://github.com/singerdmx/flutter-quill#%EF%B8%8F-using-the-embed-blocks-from-flutter_quill_extensions" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🛠️ Using the embed blocks from<span> </span><code style="box-sizing: border-box; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 13.6px; padding: 0.2em 0.4em; margin: 0px; white-space: break-spaces; background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted)); border-radius: 6px;">flutter_quill_extensions</code></a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-links-2" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🔗 Links</a></li></ul></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-conversion-to-html" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🔄 Conversion to HTML</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-translation" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🌐 Translation</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-testing" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">🧪 Testing</a></li><li style="box-sizing: border-box; margin-top: 0.25em;"><a href="https://github.com/singerdmx/flutter-quill#-contributors" style="box-sizing: border-box; background-color: transparent; color: var(--fgColor-accent, var(--color-accent-fg)); text-decoration: underline; text-underline-offset: 0.2rem;">👥 Contributors</a></li></ul></li></ul></body> The HTML will be different depending on the platform, it can return |
This in itself is not a problem, Anyway, I'm trying a solution for this right now, because it seemed simple, but it's not so simple in practice.
Thanks for the example, I will take it into account while I resolve the issue of nested lists. |
This already was fixed at the flutter_quill_delta_from_html version 1.3.0 |
Not sure why it is closed |
It has been referenced on the PR that has been merged:
We have discussed an issue in a comment on another issue that's not directly related. |
Description
Drop support for the converters to convert to HTML/PDF.
Reasons
Take a look at Conversion to HTML README section, PR #1990, some discussions at related issues, PRs, discussions, and Slack. We discussed more details there.
Here is the key list of reasons:
flutter_quill
, there are some reasons where you might want to convert Delta to HTML for sending it as an email or publish it somewhere else, or for migration from the existing system, there are already existing solutions like vsc_quill_delta_to_html or flutter_quill_delta_from_html, see Conversion to HTML section for more details, it's not recommended to store the Document as HTML or other data formats in the database, it causes other issues regarding performance other than bugs and doesn't support all features.While we're grateful to the library authors, we prefer to minimize the dependencies, when a new release of Flutter comes out, this will make it harder to update the package with the new release of Flutter, requiring more around, sometimes forking the package and edit them manually, reverting the changes to use the original and maintained package, most developers will update Flutter to use them with most projects, they might have some projects that use
flutter_quill
, which will cause build failure and require either temporary workarounds or downloading different versions of Flutter, See Comment #2114954661 as an example.Why breaking change?
The
quill_pdf_converter
andquill_html_converter
are experimental packages.Even though the version is not experimental (to allow automated publishing and centralize the version) We have marked them as experimental in the package
README.md
for the two packages in GitHub and Pub.dev,README.md
of the repository, inCHANGELOG.md
, the docs of the code of allflutter_quill
,quill_html_converter
andquill_pdf_converter
for all functions and classes, marked them as experimental using meta, mentioned that in GitHub issues, discussions and in Slack.We have already mentioned that the support can be dropped at anytime
You can still use the old version of those packages for now. Take a look at the existing quill_html_converter and quill_pdf_converter
We haven't dropped the support for the experimental functions
DeltaX.fromMarkdown
andDeltaX.fromHtml
influtter_quill
, which work well for the Rich Text Pasting Feature only, we do plan soon, we will deprecate them first for a while then avoid exposing them and only using them internally for this feature which also requiressuper_clipboard
, we recommend to avoid using those APIs as soon as possible.Suggested alternatives
DeltaX.fromMarkdown
: https://pub.dev/packages/markdown_quillDeltaX.fromHtml
: https://pub.dev/packages/flutter_quill_delta_from_htmlquill_pdf_converter
: https://pub.dev/packages/flutter_quill_to_pdfquill_html_converter
: https://pub.dev/packages/vsc_quill_delta_to_htmlThere might be other alternatives for other data formats, you might want to explore them on pub.dev.
Checklist
CHANGELOG.md
nor the package version inpubspec.yaml
files../scripts/before_push.sh
and it all passed successfullyBreaking Change
!
in the title as explained in Conventional Commits).