Skip to content

Prototype: Integrate CascadeEditor as NoteDelight’s rich-text editor #726

Description

@linreal

hi, @softartdev!

Summary

This issue proposes replacing NoteDelight’s plain TextField with CascadeEditor, giving notes structured blocks, rich-text spans, slash commands, lists, todos, quotes, code blocks, links, indentation, and document serialization

NoteDelightCeDemo.mp4

Why this fits NoteDelight

NoteDelight currently stores note content as a String. That string can remain the persistence container while its contents become a versioned Cascade document - core features of the app remain intact

Cascade documents can be distinguished from existing notes with a small versioned prefix:

notedelight:cascade:v1
{ ...Cascade document JSON... }

Existing unprefixed content remains legacy plain text
This means the initial migration is technically straightforward and does not require a database schema migration:

  • If content has the Cascade prefix, decode it as a structured document
  • Otherwise, import the existing text as paragraph blocks
  • Preserve line boundaries by creating one paragraph per line
  • On the next save, persist the document in Cascade’s serialized node format

Migration can therefore happen lazily when a note is opened and edited. An eager migration can be added later if there is a concrete need for one

Would you be open to reviewing a PR based on this prototype

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions