Interface EditorDecorationOptions

interface EditorDecorationOptions {
    afterContentClassName?: string;
    beforeContentClassName?: string;
    blockClassName?: string;
    blockDoesNotCollapse?: boolean;
    blockIsAfterEnd?: boolean;
    blockPadding?: [top: number, right: number, bottom: number, left: number];
    className?: string;
    glyphMarginClassName?: string;
    glyphMarginHoverMessage?: string;
    hoverMessage?: string;
    inlineClassName?: string;
    isWholeLine?: boolean;
    linesDecorationsClassName?: string;
    marginClassName?: string;
    minimap?: DecorationMinimapOptions;
    overviewRuler?: DecorationOverviewRulerOptions;
    showIfCollapsed?: boolean;
    stickiness?: TrackedRangeStickiness;
}

Properties

afterContentClassName?: string

the decoration will be rendered after the text with this class name.

beforeContentClassName?: string

the decoration will be rendered before the text with this class name.

blockClassName?: string
blockDoesNotCollapse?: boolean
blockIsAfterEnd?: boolean

Indicates if this block should be rendered after the last line. In this case, the range must be empty and set to the last line.

blockPadding?: [top: number, right: number, bottom: number, left: number]
className?: string

CSS class name of this decoration.

glyphMarginClassName?: string

the decoration will be rendered in the glyph margin with this class name.

glyphMarginHoverMessage?: string

hover message for the glyph margin of this decoration.

hoverMessage?: string

hover message for this decoration.

inlineClassName?: string

the decoration will be rendered inline with this class name. to be used only to change text, otherwise use className.

isWholeLine?: boolean

should the decoration be rendered for the whole line.

linesDecorationsClassName?: string

the decoration will be rendered in the lines decorations with this class name.

marginClassName?: string

the decoration will be rendered in the margin in full width with this class name.

If set, render this decoration in the minimap.

render this decoration in the overview ruler.

showIfCollapsed?: boolean

Always render the decoration (even when the range it encompasses is collapsed).

behavior of decorations when typing/editing near their edges.