blockcn

Remove a core block

Leave a core block out of the schema.

A key set to false removes that block, its slash item, Turn into entry, toolbar control, and HTML serializer. A document that still contains it loads as an unsupported block and round-trips through getJSON(). See Upgrading.

This page's code block is examples/recipes/remove-core.ts. pnpm --dir docs typecheck compiles that file and fails if this block drifts.

import { createBlockcnEditor } from "@/components/editor/preset";

/** `false` drops the block, its slash item, toolbar control, and HTML serializer. */
export const kit = createBlockcnEditor({
  core: {
    callout: false,
    toggle: false,
    horizontalRule: false,
  },
});