Koenig Default Cards
Mobiledoc card definitions for Ghost's editor.
Legacy: this package supports posts that have never been converted from Mobiledoc. New editor work belongs in the Lexical packages.
Install
npm install @tryghost/kg-default-cards
Usage
import {cards} from '@tryghost/kg-default-cards';
cards.map(card => card.name);
// ['bookmark', 'code', 'email', 'email-cta', 'embed', ...]
Each card exposes name, type and a render function, ready to hand to the
Mobiledoc renderer. Cards that contain URLs also expose the relevant transform
helpers (absoluteToRelative, relativeToAbsolute, toTransformReady) that
Ghost applies when storing and serving content.
Develop
This package is part of the Ghost monorepo
and resolves through the pnpm workspace — there is no linking or per-package
install step. Run pnpm bootstrap in the monorepo root, then work in
koenig/kg-default-cards.
See the Koenig README for the shared build, test and release workflow.
Test
pnpm test:unitruns the unit testspnpm testruns the unit and type tests, including coverage thresholdspnpm lintruns the lint checks
Copyright & License
Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license.