Skip to content

feat: callout/admonition block type #187

Description

@oobagi

Problem

The editor has no native way to create callout/admonition blocks (tip, warning, note, info). GitHub-style admonitions are rendered in view mode (#21), but there's no dedicated block type — users can't create them from the command palette or edit them structurally.

Goal

Add a Callout block type with variants (note, tip, warning, caution, important) that renders as a colored box with an icon and label.

Markdown format

GitHub-style blockquote admonitions:

> [!NOTE]
> This is a note callout.

> [!TIP]
> Helpful advice here.

> [!WARNING]
> Watch out for this.

Tasks

  • Add Callout to BlockType enum with variant tracking (note/tip/warning/caution/important)
  • Parse > [!TYPE] syntax in parse.go — detect admonition prefix, store variant + content
  • Serialize callouts back to GitHub blockquote admonition syntax
  • Round-trip tests
  • Add Callout entry to / command palette (with variant sub-menu or default to Note)
  • Render inactive callout with colored left border, icon, and label
  • Add CalloutStyle to theme system (per-variant colors)
  • View mode rendering with full styling

Scope

Type: enhancement
Size: medium

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