basic

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

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.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL