What is prosemirror-schema-basic?
The prosemirror-schema-basic package provides a basic schema for ProseMirror, a toolkit for building rich-text editors. This schema includes nodes and marks for common text formatting tasks, such as paragraphs, headings, bold, italic, and links.
What are prosemirror-schema-basic's main functionalities?
Basic Schema
This feature provides a basic schema that includes nodes and marks for common text formatting tasks. The code sample demonstrates how to create a new schema using the basic schema provided by the package.
const { Schema } = require('prosemirror-model');
const { schema } = require('prosemirror-schema-basic');
const mySchema = new Schema({
nodes: schema.spec.nodes,
marks: schema.spec.marks
});
Paragraph Node
This feature allows you to create a paragraph node. The code sample demonstrates how to create a paragraph node using the basic schema.
const { schema } = require('prosemirror-schema-basic');
const paragraphNode = schema.nodes.paragraph.createAndFill();
Bold Mark
This feature allows you to create a bold mark. The code sample demonstrates how to create a bold mark using the basic schema.
const { schema } = require('prosemirror-schema-basic');
const boldMark = schema.marks.strong.create();
Other packages similar to prosemirror-schema-basic
prosemirror-schema-list
The prosemirror-schema-list package provides a schema for handling lists in ProseMirror. It includes nodes and commands for ordered and unordered lists, which are not covered by the basic schema. This package is useful if you need more advanced list handling capabilities.
prosemirror-schema-table
The prosemirror-schema-table package provides a schema for handling tables in ProseMirror. It includes nodes and commands for creating and manipulating tables, which are not included in the basic schema. This package is useful for applications that require table editing functionality.
prosemirror-schema-basic
[ WEBSITE | ISSUES | FORUM | GITTER | CHANGELOG ]
ProseMirror is a well-behaved rich semantic content editor based on
contentEditable, with support for collaborative editing and custom
document schemas.
This module defines a
basic ProseMirror document schema, whose elements can be reused in
other schemas.
The project page has more information, a
number of demos and the
documentation.
NOTE: This project is in BETA stage. It isn't thoroughly tested,
and the API might still change across 0.x
releases. You are welcome
to use it, but don't expect it to be very stable yet.
This code is released under an
MIT license.
There's a forum for general
discussion and support requests, and the
Github bug tracker
is the place to report issues.