Scribo

Scribo is an editor kit built on Lexical. It comes in two forms:

  • A ready Markdown editor. @eventuras/scribo-markdown is a React component that edits rich text and gives you Markdown.
  • A core with extensions. @eventuras/scribo-core is a set of Lexical extensions to build your own editor from. Other packages add to it: React bindings, a syntax highlighter, songs with chords.

The Markdown editor is itself a preset over the core.

The Markdown editor beside the Markdown it produces

Packages

PackageWhat it is
@eventuras/scribo-markdownMarkdownEditor and MarkdownInput, with the callout and schedule plugins.
@eventuras/scribo-coreThe core: extensions for rich text, a toolbar built from data, Markdown and code blocks. No React.
@eventuras/scribo-reactReact bindings for the core: a toolbar, a language picker for code blocks and a placeholder.
@eventuras/scribo-chordsSongs with chords, as an extension for the core, with a reader and a play mode.
@eventuras/scribo-code-prismPrism as the syntax highlighter for the core's code blocks.

@eventuras/scribo is the old name of @eventuras/scribo-markdown. It is deprecated and only re-exports the new package.

Every package pins lexical and @lexical/* to exactly 0.50.0, the version Payload CMS uses, so an app that has both gets one Lexical.

Where to start

Songs with chords

@eventuras/scribo-chords shows what an extension can add. This is its song editor, an editor built on the core:

The song editor, with chords above the lyrics and a chord palette

The same song in the reader, shown two semitones up. Transposing changes what is shown, never what is stored:

The song reader, transposed from G to A

Play mode on a phone:

Play mode on a phone, with large text and autoscroll

The song in the pictures is made up for the package.

Demos

The docs site carries a build of both demos:

These two links work on the built site only. To run a demo from a checkout, use pnpm dev for the Markdown editor and pnpm --filter @eventuras/scribo-chords dev for chords. The Markdown editor is also at scribo.losol.no.