Skip to content

Type Editor


Type Editor / @type-editor/dom-change-util / types/dom-change/MarkChangeInfo

types/dom-change/MarkChangeInfo

Interfaces

InterfaceDescription

MarkChangeInfo

Represents a mark change operation (adding or removing a mark).

This interface is used to optimize mark changes by detecting when a change is simply adding or removing a single mark type (like bold or italic) rather than changing the actual text content.

MarkChangeInfo

Example

typescript
// User presses Ctrl+B to make text bold
const markChange: MarkChangeInfo = {
  mark: schema.marks.strong.create(),
  type: "add",
};