Last date modified: 2025-Jul-02
Interface: HighlightConfig
Style information for [[Highlight]] objects
Extends
Properties
activationMode
activationMode:
HighlightActivationMode
Controls how the highlight is rendered when it is active and inactive.
activeStyle?
optionalactiveStyle:HighlightStyle
The style to use for the highlight when it is active
allowDelete?
optionalallowDelete:boolean
Determines if the highlight can be deleted, default is false
allowMove?
optionalallowMove:boolean
Determines if the highlight can be moved, default is false
allowResize?
optionalallowResize:boolean
Determines if the highlight can be resized, default is false
borderColor
borderColor:
string
The border color. This property is ignored for text highlights and for any highlights where borderLineType is LineType.none.
The value of this string may be any valid CSS color value, as defined here:
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
If not specified, the inverse of the fill color will be used. The border color for a highlight may be changed at any time by setting the [[Highlight.borderColor]] property.
Inherited from
borderLineType
borderLineType:
LineType
The border line type. This property is ignored for text highlights.
If not specified, the default value of LineType.none will be used (resulting in no border). The line type for a highlight may be changed at any time by setting the [[Highlight.borderLineType]] property.
Inherited from
borderWidth
borderWidth:
number
The border width in pixels. This property is ignored for text highlights and for any highlights where borderLineType is LineType.none.
If not specified, the default value of 1 pixel will be used. The line type for a highlight may be changed at any time by setting the [[Highlight.borderLineType]] property.
Inherited from
cssClass
cssClass:
string
A CSS class or space-separated list of classes to apply to the highlighted text. This property is ignored for cell and rectangular highlights.
Note that this property must be used very carefully to avoid affecting the layout of the text. Any CSS properties that change the box size or visibility of the text will cause layout issues in the viewer.
If not specified, the CSS class for the text will not be altered by the highlight. The CSS class for a highlight may be changed at any time by setting the [[Highlight.cssClass]] property.
Inherited from
enableDelete
enableDelete:
boolean
Controls whether the user is able to delete the highlight by pressing the DELETE key while the highlight is active.
If not specified, defaults to false. This value may be changed at any time by setting the [[Highlight.enableDelete]] property.
Inherited from
enableMove
enableMove:
boolean
Controls whether the user is able to move the highlight using the mouse, touch, or keyboard while the highlight is active. This property is ignored for text highlights.
If not specified, defaults to false. This value may be changed at any time by setting the [[Highlight.enableMove]] property.
Inherited from
enableResize
enableResize:
boolean
Controls whether the user is able to resize the highlight using the mouse, touch, or keyboard while the highlight is active. This property is ignored for text highlights.
If not specified, defaults to false. This value may be changed at any time by setting the [[Highlight.enableResize]] property.
Inherited from
fillColor
fillColor:
string
The background fill color for text and rectangular highlights. The value of this string may be any valid CSS color value, as defined here:
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
If not specified, the default will be based on the highlight properties: white (#fff) for cross redactions black (#000) for other redactions transparent yellow (rgba(255,255,0,0.5)) for highlights
The fill color for a highlight may be changed at any time by setting the [[Highlight.fillColor]] property.
Inherited from
image
image:
HighlightImage
The image to draw over the highlight. This property is ignored for text highlights.
The only supported value is "cross", which draws a diagonal cross and outline over the highlight in the inverse of the highlight color.
If not specified, no image will be drawn. The highlight image may be changed at any time by setting the [[Highlight.image]] property.
Inherited from
inverse
inverse:
boolean
If true, the highlight will be treated as an inverse redaction - that is, the full page will be redacted except or the highlight range. If there are multiple inverse redactions on the page, they will each be subtracted from the full page redaction.
This property is only supported for rectangular redactions. If specified for any other type of highlight, it will be ignored.
If not specified, defaults to false. The inverse flat may not be changed once a highlight is created.
label
label:
string
A string value specifying a label to attach to each highlight. This property is ignored for text highlights.
If not specified, the highlight will no label. The label may be changed at any time by setting the [[Highlight.label]] property.
Inherited from
labelColor
labelColor:
string
The color for text labels. This property is ignored for text highlights and highlights without labels.
The value of this string may be any valid CSS color value, as defined here:
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
If not specified, the inverse of the fill color will be used. The label color for a highlight may be changed at any time by setting the [[Highlight.labelColor]] property.
Inherited from
labelFontFace
labelFontFace:
string
The label font name. This property is ignored for text highlights and for any highlights without a label.
If not specified, defaults to "Arial". The label font may be changed at any time by setting the [[Highlight.labelFont]] property.
Inherited from
labelFontSize
labelFontSize:
FontSizeOrAuto
The label font size. This property is ignored for text highlights and for any highlights without a label.
May be a numeric value in points, a [[FontSize]] object with a size in either points or pixels, or "auto" to automatically scale the label with the size of the highlight.
If not specified, defaults to "auto". The label size may be changed at any time by setting the [[Highlight.labelFontSize]] property.
Inherited from
labelFontWeight
labelFontWeight:
FontWeight
The label font weight. This property is ignored for text highlights and for any highlights without a label.
If not specified, defaults to FontWeight.normal. The label font weight may be changed at any time by setting the [[Highlight.labelFontWeight]] property.
Inherited from
HighlightStyle.labelFontWeight
redaction
redaction:
boolean
If true, the highlight will be treated as a redaction.
If not specified, defaults to false. The redaction flag may not be changed once a highlight is created.
relativeOrder?
optionalrelativeOrder:RelativeOrderType
For cell highlights, controls whether the highlight renders above embeddings, or below embeddings.
If not specified, defaults to aboveEmbeddings.
reversion
reversion:
boolean
If true, the highlight will be treated as a redaction reversion. Any redacted cells under a redaction reversion will be displayed unredacted.
Redaction reversions are only supported for cell redactions in spreadsheets. For cell highlights and rectangular and text highlights and redactions, this flag is ignored.
All other [[HighlightStyle]] properties (fill color, label properties, etc.) are ignored for reversions.
If not specified, defaults to false. The reversion flag may not be changed once a highlight is created.
strokeColor
strokeColor:
string
The stroke color for cross redactions. This property is ignored for other highlight types.
The value of this string may be any valid CSS color value, as defined here:
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
If not specified, the inverse of the fill color will be used. The stroke color for a highlight may be changed at any time by setting the [[Highlight.strokeColor]] property.
Inherited from
textColor
textColor:
string
The text color for text highlights. The value of this string may be any valid CSS color value, as defined here:
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
If not specified, the text color will not be altered by the highlight. The text color for a highlight may be changed at any time by setting the [[Highlight.textColor]] property.
Inherited from
userData?
optionaluserData:UserDataMap
User data to apply to any highlights created using this PartialRangeHighlightConfig. The individual properties in this userData object are copied by value to each highlight.
On this page
- Interface: HighlightConfig
- Extends
- Properties
- activationMode
- activeStyle?
- allowDelete?
- allowMove?
- allowResize?
- borderColor
- borderLineType
- borderWidth
- cssClass
- enableDelete
- enableMove
- enableResize
- fillColor
- image
- inverse
- label
- labelColor
- labelFontFace
- labelFontSize
- labelFontWeight
- redaction
- relativeOrder?
- reversion
- strokeColor
- textColor
- userData?