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

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.

class MarkType {
readonly name: string;
readonly schema: Schema;
readonly spec: MarkSpec;
 
create(attrs?: Attrs | null): Mark;
excludes(other: MarkType): boolean;
isInSet(set: readonly Mark[]): Mark | undefined;
removeFromSet(set: readonly Mark[]): readonly Mark[];
}

§Properties

§
name: string
[src]

The name of the mark type.

§
schema: Schema
[src]

The schema that this mark type instance is part of.

§

The spec on which the type is based.

§Methods

§
create(attrs?: Attrs | null): Mark
[src]

Create a mark of this type. attrs may be null or an object containing only some of the mark's attributes. The others, if they have defaults, will be added.

§
excludes(other: MarkType): boolean
[src]

Queries whether a given mark type is excluded by this one.

§
isInSet(set: readonly Mark[]): Mark | undefined
[src]

Tests whether there is a mark of this type in the given set.

§
removeFromSet(set: readonly Mark[]): readonly Mark[]
[src]

When there is a mark of this type in the given set, a new set without it is returned. Otherwise, the input set is returned.