Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

§Classes

ContentMatch

Instances of this class represent a match state of a node type's content expression, and can be used to find out whether further content matches here, and whether a given position is a valid end of the node.

DOMParser

A DOM parser represents a strategy for parsing DOM content into a ProseMirror document conforming to a given schema. Its behavior is defined by an array of rules.

DOMSerializer

A DOM serializer knows how to convert ProseMirror nodes and marks of various types to DOM nodes.

Fragment

A fragment represents a node's collection of child nodes.

Mark

A mark is a piece of information that can be attached to a node, such as it being emphasized, in code font, or a link. It has a type and optionally a set of attributes that provide further information (such as the target of the link). Marks are created through a Schema, which controls which types exist and which attributes they have.

MarkType

Like nodes, marks (which are associated with nodes to signify things like emphasis or being part of a link) are tagged with type objects, which are instantiated once per Schema.

Node

This class represents a node in the tree that makes up a ProseMirror document. So a document is an instance of Node, with children that are also instances of Node.

NodeRange

Represents a flat range of content, i.e. one that starts and ends in the same node.

NodeType

Node types are objects allocated once per Schema and used to tag Node instances. They contain information about the node type, such as its name and what kind of node it represents.

ReplaceError

Error type raised by Node.replace when given an invalid replacement.

ResolvedPos

You can resolve a position to get more information about it. Objects of this class represent such a resolved position, providing various pieces of context information, and some helper methods.

Schema

A document schema. Holds node and mark type objects for the nodes and marks that may occur in conforming documents, and provides functionality for creating and deserializing such documents.

Slice

A slice represents a piece cut out of a larger document. It stores not only a fragment, but also the depth up to which nodes on both side are ‘open’ (cut through).

§Interfaces

AttributeSpec

Used to define attributes on nodes or marks.

MarkSpec

Used to define marks when creating a schema.

NodeSpec

A description of a node type, used when defining a schema.

ParseOptions

These are the options recognized by the parse and parseSlice methods.

ParseRule

A value that describes how to parse a given DOM node or inline style as a ProseMirror node or mark.

SchemaSpec

An object describing a schema, as passed to the Schema constructor.

§Type Aliases

Attrs

An object holding the attributes of a node.

DOMOutputSpec

A description of a DOM structure. Can be either a string, which is interpreted as a text node, a DOM node, which is interpreted as itself, a {dom, contentDOM} object, or an array.