Brickee — the AtomForge character editing a document in the Brickee editor

@atom-forge/brickee · Content editing

Write in blocks. Store clean JSON.

Brickee is a block editor for Svelte 5. Its core edits markdown blocks—paragraphs, headings, lists, todos, quotes, code—and every other block is a plugin with its own editor view, site preview and fields. Documents are stored as plain JSON your application owns.

Svelte 5 Block editor Plugins JSON documents

What it is

A markdown core. Everything else is a plugin.

Without plugins, Brickee is a plain markdown block editor. A plugin adds a block type: an editor view, a site preview, its fields and, optionally, a markdown form. The bundled plugins—YouTube, map, table and gap—are plugins like any other: pick the ones you need.

The editor reads and writes StoredBlock[]—plain JSON you save as it is. Render it with the bundled Preview, or with your own renderer. Media, image libraries and per-view values stay in your application's plugins, resolved with your own data.

Why choose Brickee?

Your blocks, your data

Write app-specific blocks with the same BlockPlugin shape the bundled ones use. The editor has no built-in idea of media or users, so your plugins store exactly what your application decides.

Markdown in and out

Import CommonMark/GFM, paste formatted text from the web, Google Docs or Word, and export documents back to markdown—plugin blocks too, when they define a markdown form.

Validated on the server

blocksSchemaFor(plugins) builds a Zod schema to check saved documents before they reach your database.

Fits the AtomForge UI

Popups and field controls come from @atom-forge/ui, and the editor follows its theme tokens, light and dark included. UI text is translatable, with a Hungarian locale bundled.

How it works

  1. Install and set up styles

    Add Brickee with @atom-forge/ui and @lucide/svelte, and include the Brickee dist folder as a Tailwind source next to the UI theme.

  2. Choose the blocks

    Pass the same plugins to the Editor and the Preview of a document type, and narrow what an editor offers with palette.

  3. Store and validate

    Save the editor value as it is, and check it on the server with the schema built from the same plugins.

An honest fit check

Trade-offs, not fine print

An early version

Brickee is at 0.0.x. Expect API changes between versions and read the upgrading notes when you update.

Svelte 5 and AtomForge UI

The editor is built on Svelte 5 and @atom-forge/ui with Tailwind CSS 4. It is not a framework-agnostic editor.

Plugin props are user input

A preview must sanitize what a plugin stores—colours, links, numbers. The schema checks the document shape, not the contents of plugin props.

In practice

An editor and its preview

From the Brickee README. The same plugins go to the editor and the preview; the value is the JSON you store.

Svelte · Illustrative · adapted from the source texts; package API not verified here
<script lang="ts">
  import { Editor, Preview, type StoredBlock } from '@atom-forge/brickee';
  import { PLUGINS } from '@atom-forge/brickee/plugins';

  let value = $state<StoredBlock[]>([]);
</script>

<Editor bind:value plugins={PLUGINS} />
<Preview blocks={value} plugins={PLUGINS} />