koenig/kg-default-transforms/README.md
Lexical node transforms shared between the editor and the server, such as denesting and list merging.
npm install @tryghost/kg-default-transforms
const {registerDefaultTransforms} = require('@tryghost/kg-default-transforms');
const teardown = registerDefaultTransforms(editor);
Returns a teardown function that unregisters every transform it added.
Individual transforms are also exported by name for cases that need a subset.
registerRemoveAtLinkNodesTransform is deliberately not part of the defaults —
it is only wanted when rendering.
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 setup in the monorepo root, then work in
koenig/kg-default-transforms.
See the Koenig README for the shared build, test and release workflow.
pnpm test:unit runs the unit testspnpm test runs the unit and type tests, including coverage thresholdspnpm lint runs the lint checksCopyright (c) 2013-2026 Ghost Foundation - Released under the MIT license.