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.
Mirrors CodeMirror 6's IndentContext. When simulateBreak is set, the context computes indentation as if a line break had been inserted at that position (used to answer "what indentation would this position get after pressing Enter"). simulateDoubleBreak additionally treats the break position as an empty line (Enter pressed twice).
Inheritors
Constructors
Link copied to clipboard
constructor(state: EditorState, simulateBreak: DocPos? = null, simulateDoubleBreak: Boolean = false)
Functions
Link copied to clipboard
Get the indentation column at the start of the line at pos.
Link copied to clipboard
The text on the line at pos, starting from pos and capped at 100 characters. Honors simulateBreak/simulateDoubleBreak and bias. Matches CodeMirror's textAfterPos.