Quill: Proposal: (Doc) write about **the correct way** to store & display quill editor content

Created on 26 Aug 2018  路  10Comments  路  Source: quilljs/quill

1. Why

so far(2018-8-26) Quill document didn't say anything about what is the correct / suggest way to store and display content from quill editor

2. Base on my current understanding

There are 2 way to store and then display content when using quill editor to write content.

  1. (Delta) __Store__ Delta into database (MySQL/PostgreSQL as JSON). then, when __Display__, use some library convert Delta to HTML and then display

  2. (HTML) __Store__ HTML using quill.root.innerHTML into database (MySQL/PostgreSQL) and then just __Display__ these HTML

3. Question

Would you guys write about this topic (store&display) in document?

Thanks!

(I am still researching, If I find any new info helpful for this. I would update this issue)

4. info relate to this topic

https://www.bountysource.com/issues/37978100-render-quill-delta-without-instantiating-an-editor
https://github.com/quilljs/quill/issues/993
https://github.com/quilljs/quill/issues/1551

Most helpful comment

It's really frustrating to invest a lot of time in understanding Quill, expecting there will be instructions along the way about rendering its content, only to learn that this project is bring-your-own-renderer. It'd be great to mention that at the beginning.

All 10 comments

I think this solution is the best one so far
image

  1. Store both format.
  2. Under different use case, Delta for editor, HTML for display

Quill work with Delta.
HTML from users is unsafe. Best way is to store Delta in the database and render it to HTML if needed.
Quill currently doesn't support delta to html conversion but you'll might find what you need in one of the community projects.

@benbro got it. thank you.

new question: can you put these into doc? a new section, maybe here:
image

Adding a huge screenshot for each post is unneeded. Please use text only.
There are Delta sections in docs and guide. Please submit a PR to the docs with your suggested changes if you think it can be improved.

got it, thanks

This was a deal breaker for me with using this; I don't want to store both Delta json and HTML; shame because looks like such a great product; I am switching to summernote

It's really frustrating to invest a lot of time in understanding Quill, expecting there will be instructions along the way about rendering its content, only to learn that this project is bring-your-own-renderer. It'd be great to mention that at the beginning.

A little update: (in short: I am not using Quill anymore)

because our product pivot to another direction.
we focus on App now, main feature are all on App.
website just a single landing page.

So I am not using Quill anymore.
Also. we lower the bar for user post content. again and again.
Now our app look like Instagram

This is just a simple update in case anyone interested

This is 2020 and i still find it difficult to display data saved from the editor. This is a bit disappointing i must say after going through the stress of integrating the library. It also says a lot about the library with its number of opened issues and pending pull requests

please help me with this similar issue: https://github.com/pingcap/tidb/issues/18922

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aletorrado picture aletorrado  路  3Comments

GildedHonour picture GildedHonour  路  3Comments

rsdrsd picture rsdrsd  路  3Comments

Kivylius picture Kivylius  路  3Comments

lustoykov picture lustoykov  路  3Comments