Interface InjectedTextOptions

Configures text that is injected into the view without changing the underlying document.

interface InjectedTextOptions {
    attachedData?: unknown;
    content: string;
    cursorStops?: InjectedTextCursorStops;
    inlineClassName?: string;
    inlineClassNameAffectsLetterSpacing?: boolean;
}

Properties

attachedData?: unknown

This field allows to attach data to this injected text. The data can be read when injected texts at a given position are queried.

content: string

Sets the text to inject. Must be a single line.

Configures cursor stops around injected text. Defaults to InjectedTextCursorStops.Both.

inlineClassName?: string

If set, the decoration will be rendered inline with the text with this CSS class name.

inlineClassNameAffectsLetterSpacing?: boolean

If there is an inlineClassName which affects letter spacing.