Skip to content

Type Editor


Type Editor / @type-editor/gapcursor / GapCursor

GapCursor

Classes

ClassDescription

GapCursor

Represents a gap cursor selection - a cursor positioned between block nodes where regular text selection is not possible.

Gap cursors are used in positions where the document structure doesn't allow normal text cursors, such as between two adjacent block nodes (e.g., between two code blocks or between a heading and an image).

Both $anchor and $head properties point at the same cursor position since gap cursors don't represent a range but a single point between nodes.

Example

ts
// A gap cursor between two paragraphs:
// <p>First paragraph</p>
// [gap cursor here]
// <p>Second paragraph</p>