Skip to content
Brickee
Language:en Author:AtomForge
svelte editor markdown block-editor

Block editing with @atom-forge/brickee

@atom-forge/brickee is a block editor for Svelte 5. Its core is a markdown block editor — paragraphs, headings, lists, to-dos, quotes, code, dividers — and every other block is a plugin: a block with an editor view, a site preview, its fields, and optionally a markdown form. Documents are stored as JSON.

The package is built in three layers:

flowchart TB
  core["Core: markdown blocks, Editor, Preview, stored form, kit"]
  bundled["Bundled plugins: table, YouTube, map, gap"]
  own["Your plugins: the same BlockPlugin shape"]
  core --> bundled
  core --> own
  • Core — the markdown blocks, the Editor and the Preview, the stored form and its markdown conversions, and the kit plugins are written with. Without plugins it is a plain markdown block editor.
  • Bundled plugins — plugins like any other, written only with what the core exports. You opt in to the ones you need.
  • Your plugins — the same BlockPlugin shape, living in your application.

The editor itself knows nothing about your application. Its code languages and its language reach the editor through contexts; everything else — its media, its page widths, its users — belongs to the app's own plugins, which read it from the app's own code and may show their own fields form. There are no special editor props for application concepts.

This book is for Svelte 5 developers who embed the editor in an application, choose and adapt the bundled plugins, or write their own.

Reading path

  1. Getting started — the three layers, installation, host setup, and a first editor with its preview.
  2. The editor and the preview — the Editor and Preview props, the palette, the editing features, and scroll sync.
  3. Documents and markdown — the stored form (StoredBlock), the built-in blocks, and converting from and to markdown.
  4. Bundled plugins — what @atom-forge/brickee/plugins contains, and how to override a preview or add fields.
  5. Writing plugins — the BlockPlugin anatomy, fields and custom fields forms, views and previews, containers, markdown forms, inline plugins, and the kit.
  6. Host contexts — code languages and UI text, and where the app's own data comes from.
  7. On the server — schema validation and plain text.
  8. Recipes and pitfalls — complete patterns and the mistakes to avoid.
  9. Upgrading — what to change in your code when you move to a newer version.
  10. AI Notes — instructions to copy into the agent instruction file of a project that uses the package.