Provides the default rich-text schema for ProseMirror, including nodes (doc, paragraph, blockquote, heading, code_block, image, hard_break, horizontal_rule, text) and marks (link, em, strong, code). Current version 1.2.4 is stable and mature with infrequent updates. Key differentiator: designed to be extended or subsetted in custom schemas via `schema.spec.nodes` and `schema.spec.marks`. ES module only; no CommonJS or UMD bundle. Ships TypeScript definitions.
npm install prosemirror-schema-basicNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import the basic schema and extend it with a custom node using the prosemirror-model Schema class.
Use schema.spec.nodes and schema.spec.marks to build new schemas.
Use ES module imports (import ... from ...). If using Node, set "type": "module" in package.json or use .mjs extension.
Create a new Schema and use its node types.
Install `prosemirror-model` as a dependency and ensure `@types/prosemirror-model` is not needed (types ship in prosemirror-model itself).
Ensure your bundler supports ES modules from prosemirror packages. If using Node directly, set "type": "module" in package.json or use `.mjs` file extension.
Use named import: `import { schema } from 'prosemirror-schema-basic'`.Run `npm install prosemirror-schema-basic`.
Either convert to ESM (add `"type": "module"` in package.json) or use dynamic import: `const { schema } = await import('prosemirror-schema-basic')`.