Skip to content

[Feature] Formatting Toolbar (WYSIWYG Toolbar) for Crepe Editor #2221

@fehmisener

Description

@fehmisener

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Problem

Milkdown Crepe Editor currently provides a clean editing experience, but it lacks a visible formatting toolbar (WYSIWYG / rich-text toolbar).
For many users—especially non-technical or first-time users—discoverability of formatting actions (bold, italic, headings, lists, links, code, etc.) is limited without a toolbar.

This creates a usability gap compared to other editors and makes onboarding harder, as users must rely on shortcuts or external UI implementations.

Solution

Introduce an optional built-in formatting toolbar for the Crepe Editor that:

  • Displays common formatting actions:

    • Bold, Italic, Strikethrough
    • Headings (H1–H6)
    • Bullet / Ordered lists
    • Blockquote
    • Code / Code block
    • Link
    • Undo / Redo
  • Syncs automatically with editor state (active marks/nodes)

  • Is configurable:

    • Enable/disable toolbar
    • Choose which buttons appear
    • Horizontal / floating / sticky variants
  • Uses Milkdown commands internally to stay consistent with the core architecture

This would significantly improve UX while keeping Crepe’s minimal design philosophy intact.

Alternatives

  1. Expose a Toolbar API / Plugin

    • Provide an official toolbar plugin or helper utilities
    • Allows developers to build custom toolbars with less boilerplate
  2. Example Toolbar Implementation

    • Add an official example in the docs showing how to build a toolbar for Crepe
    • Include recommended patterns and command bindings
  3. Command-to-UI Mapping Helper

    • Provide a helper that maps Milkdown commands to UI state (active/disabled)
    • Makes it easier for frameworks (React/Vue/Svelte) to implement toolbars

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions