EditingBuffer

Class

Common
class EditingBuffer(
    /** The initial text of this editing buffer */
    text: AnnotatedString,
    /**
     * The initial selection range of this buffer. If you provide collapsed selection, it is treated
     * as the cursor position. The cursor and selection cannot exists at the same time. The
     * selection must points the valid index of the initialText, otherwise IndexOutOfBoundsException
     * will be thrown.
     */
    selection: TextRange,
)

The editing buffer

This class manages the all editing relate states, editing buffers, selection, styles, etc.

Secondary Constructors

internal constructor(
    text: String,
    selection: TextRange,
) : this(AnnotatedString(text), selection)

Companion Object