What is prosemirror-schema-list?
The prosemirror-schema-list package provides schema elements and commands for working with lists in ProseMirror, a toolkit for building rich-text editors. It allows you to define ordered and unordered lists, and provides commands to manipulate these lists within the editor.
What are prosemirror-schema-list's main functionalities?
Define List Item Schema
This feature allows you to define a list item schema node, which can be used to create list items in the editor.
const { schema } = require('prosemirror-schema-list');
const listItem = schema.nodes.list_item;
Define Ordered List Schema
This feature allows you to define an ordered list schema node, which can be used to create ordered lists in the editor.
const { schema } = require('prosemirror-schema-list');
const orderedList = schema.nodes.ordered_list;
Define Bullet List Schema
This feature allows you to define a bullet list schema node, which can be used to create unordered lists in the editor.
const { schema } = require('prosemirror-schema-list');
const bulletList = schema.nodes.bullet_list;
Wrap in List Command
This feature provides a command to wrap the selected text in a list, making it easy to convert text into a list format.
const { wrapInList } = require('prosemirror-schema-list');
const command = wrapInList(schema.nodes.bullet_list);
Lift List Item Command
This feature provides a command to lift a list item out of its parent list, useful for changing the nesting level of list items.
const { liftListItem } = require('prosemirror-schema-list');
const command = liftListItem(schema.nodes.list_item);
Sink List Item Command
This feature provides a command to sink a list item into a nested list, useful for creating sub-lists.
const { sinkListItem } = require('prosemirror-schema-list');
const command = sinkListItem(schema.nodes.list_item);
Other packages similar to prosemirror-schema-list
prosemirror-schema-basic
The prosemirror-schema-basic package provides a basic schema for ProseMirror, including paragraphs, headings, and lists. It is more general-purpose compared to prosemirror-schema-list, which is specifically focused on list functionality.
prosemirror-schema-table
The prosemirror-schema-table package provides schema elements and commands for working with tables in ProseMirror. While it focuses on table functionality, it complements prosemirror-schema-list by providing additional rich-text editing capabilities.
prosemirror-commands
The prosemirror-commands package provides a set of basic editor commands for ProseMirror, including commands for manipulating lists. It offers a broader range of commands beyond just list manipulation, making it a more comprehensive solution for editor commands.
prosemirror-schema-list
[ 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 exports
schema elements and commands for including lists in a ProseMirror
editor.
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.