Skip to content

Quill

Quill adds a configurable rich text editor to a web app. It represents text and formatting in a structured format called Delta.

Visit Quill

Which Quill output should you save?

Save the complete Delta from getContents when you want to reopen the note. A Delta can describe a whole document or just a change to it. The change “make this line bold” cannot tell a new editor what the rest of the note says.

Reload the saved document with setContents. Quill documents end with a newline, and some line formatting is stored on that newline. Keeping the full Delta avoids dropping those details.

What can another editor read?

Quill 2 can return HTML using getSemanticHTML. Keep the original Delta while checking what another editor does with the export. A matching heading or list in the original does not guarantee the receiving tool interprets it the same way.

Quill is BSD-3-Clause open source. The library does not supply the place your app saves notes. Choose that storage and decide which formatting your toolbar and receiving view will support.

How can you distinguish a saved document from the last change?

Write a fictional note with a heading and two list items on paper. Use no real note or connected storage.

  1. Make one edit
    Make the first item bold. Write “made the first item bold” on a separate slip.
  2. Open from each copy
    Try to reconstruct the note using the slip alone. Then reopen it from a sketch that shows the complete text and formatting.
  3. Compare the result
    Check that both list items, the heading and the bold word return. Keep the complete document in the plan.