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

MarkSpec

Used to define marks when creating a schema.

interface MarkSpec {
[key: string]: any;
attrs?: {
[name: string]: AttributeSpec;
}
;
excludes?: string;
group?: string;
inclusive?: boolean;
parseDOM?: readonly ParseRule[];
spanning?: boolean;
toDOM?: (mark: Mark, inline: boolean) => DOMOutputSpec;
}

§Index Signatures

§
[key: string]: any

§Properties

§
attrs?: {
[name: string]: AttributeSpec;
}
[src]

The attributes that marks of this type get.

§
excludes?: string
[src]

Determines which other marks this mark can coexist with. Should be a space-separated strings naming other marks or groups of marks. When a mark is added to a set, all marks that it excludes are removed in the process. If the set contains any mark that excludes the new mark but is not, itself, excluded by the new mark, the mark can not be added an the set. You can use the value "_" to indicate that the mark excludes all marks in the schema.

Defaults to only being exclusive with marks of the same type. You
can set it to an empty string (or any string not containing the
mark's own name) to allow multiple marks of a given type to
coexist (as long as they have different attributes).
§
group?: string
[src]

The group or space-separated groups to which this mark belongs.

§
inclusive?: boolean
[src]

Whether this mark should be active when the cursor is positioned at its end (or at its start when that is also the start of the parent node). Defaults to true.

§
parseDOM?: readonly ParseRule[]
[src]

Associates DOM parser information with this mark (see the corresponding node spec field). The mark field in the rules is implied.

§
spanning?: boolean
[src]

Determines whether marks of this type can span multiple adjacent nodes when serialized to DOM/HTML. Defaults to true.

§
toDOM?: (mark: Mark, inline: boolean) => DOMOutputSpec
[src]

Defines the default way marks of this type should be serialized to DOM/HTML. When the resulting spec contains a hole, that is where the marked content is placed. Otherwise, it is appended to the top node.