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

MarkView

By default, document marks are rendered using the result of the toDOM method of their spec, and managed entirely by the editor. For some use cases, you want more control over the behavior of a mark's in-editor representation, and need to define a custom mark view.

Objects returned as mark views must conform to this interface.

interface MarkView {
contentDOM?: HTMLElement | null;
destroy?: () => void;
dom: DOMNode;
ignoreMutation?: (mutation: ViewMutationRecord) => boolean;
}

§Properties

§
contentDOM?: HTMLElement | null
[src]

The DOM node that should hold the mark's content. When this is not present, the dom property is used as the content DOM.

§
destroy?: () => void
[src]

Called when the mark view is removed from the editor or the whole editor is destroyed.

§
dom: DOMNode
[src]

The outer DOM node that represents the document node.

§
ignoreMutation?: (mutation: ViewMutationRecord) => boolean
[src]

Called when a mutation happens within the view. Return false if the editor should re-read the selection or re-parse the range around the mutation, true if it can safely be ignored.