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 | CHANGELOG ]
This is a schema module for ProseMirror.
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 examples and the
documentation.
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.
We aim to be an inclusive, welcoming community. To make that explicit,
we have a code of
conduct that applies
to communication around the project.