Skip to content

Support rich text (headings, lists, blockquotes, code blocks) #93

Description

@jonesd

Goal

Extend text styling (#92) to full rich text: headings, lists, blockquotes, code blocks, tables.

Current state

Plain text only. The O-tree CRDT stores text as a flat string with RangeElement variants for transclusions and data.

Approach

Build on #92 (inline marks). Add block-level marks that apply to entire lines/paragraphs rather than character ranges:

  • Block marks: heading, list_item, blockquote, code_block
  • Inline marks: bold, italic, code, link

Block marks would be stored as line-level annotations (line number → mark type). The editor renders block marks by wrapping lines in appropriate HTML elements (<h1>, <ul>, <blockquote>, <pre>).

Wire ops

Extends #92 mark system with block-level mark types.

UI

  • Markdown-style shortcuts (type # for heading, - for list, > for blockquote)
  • Format toolbar with block type dropdown
  • Keyboard shortcuts (Ctrl+B, Ctrl+I, Ctrl+Shift+K for code)

Migration

Existing plain-text documents continue to work — no block marks means default paragraph rendering.

Dependencies

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions