Documentation ¶
Overview ¶
Package basic defines a basic ProseMirror document schema, whose elements can be reused in other schemas.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Marks = []*model.MarkSpec{
{Key: "em"},
{Key: "strong"},
{Key: "link", Attrs: linkAttrs, Inclusive: &falsy},
{Key: "code"},
}
Marks are the specs for the marks in the schema.
View Source
var Nodes = []*model.NodeSpec{ {Key: "doc", Content: "block+"}, {Key: "paragraph", Content: "inline*", Group: "block"}, {Key: "blockquote", Content: "block+", Group: "block"}, {Key: "horizontal_rule", Group: "block"}, {Key: "heading", Content: "inline*", Group: "block", Attrs: headingAttrs}, {Key: "code_block", Content: "text*", Marks: &empty, Group: "block"}, {Key: "text", Group: "inline"}, {Key: "image", Group: "inline", Inline: true, Attrs: imageAttrs}, {Key: "hard_break", Group: "inline", Inline: true}, }
Nodes are the specs for the nodes defined in this schema.
View Source
var Schema, _ = model.NewSchema(&model.SchemaSpec{
Nodes: Nodes,
Marks: Marks,
})
Schema roughly corresponds to the document schema used by [CommonMark](http://commonmark.org/), minus the list elements, which are defined in the prosemirror-schema-list module.
To reuse elements from this schema, extend or read from its spec.nodes and spec.marks properties.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.