IndentContext

open class IndentContext(val state: EditorState, val simulateBreak: DocPos? = null, val simulateDoubleBreak: Boolean = false)

Context object passed to indent services and node prop strategies.

Inheritors

Constructors

Link copied to clipboard
constructor(state: EditorState, simulateBreak: DocPos? = null, simulateDoubleBreak: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The text content of the document.

Link copied to clipboard
val unit: Int

The indent unit size for this state.

Functions

Link copied to clipboard
fun lineAt(pos: DocPos, bias: Int = 1): Line

Get the text of a document line by position.

Link copied to clipboard
fun lineIndent(pos: DocPos, bias: Int = 1): Int

Get the indentation column at the start of a line.