The DecorationStyle defines how a decoration looks. You can use BuiltinDecorationStyle by specifying a type from DecorationStyleType.
Available DecorationStyleType values:
Highlight: Background-color overlay (default).HighlightUnderline: Background-color overlay and underline (used for selection/focus).Underline: Line drawn beneath the text.Strikethrough: Line drawn through the middle of the text.Outline: Border drawn around each text box.TextColor: Changes text color directly (requires CSS Highlight API; falls back to wrap width in older browsers).Mask: Dims everything outside the selection rects (use width: Page for block-level behavior).Template: Custom HTML template (see HTMLDecorationTemplate).
Layout and Width options:
DecorationLayout: Boxes (one element per line, default) or Bounds (single element covering the whole range).DecorationWidth: Wrap (fits text exactly, default), Viewport (stretches to full viewport width), Page (fills the anchor page), or Bounds (fills the bounding region of all boxes).
const style: BuiltinDecorationStyle = {
type: DecorationStyleType.Highlight,
tint: "#ffff00",
layout: DecorationLayout.Boxes,
width: DecorationWidth.Wrap,
enforceContrast: true
};