HighlightFormatterConfigType: {
    highlights: {
        regexp: RegExp;
        style: string;
    }[];
    maxLength?: number;
    type: string;
}

The configuration object for the Highlighter formatter.

Type declaration

  • highlights: {
        regexp: RegExp;
        style: string;
    }[]

    The highlighter configuration object. The highlighter is a special component to highlight text in the cell. You can set multiple highlighters here. Each highlighter has a regular expression and a style. The regular expression is used to match the text, and the style is used to highlight the text. For example, you can set a highlighter to highlight all the occurrences of the word 'important' in the cell with a bold style. The 'style' should be a valid CSS style string.

  • OptionalmaxLength?: number

    The maximum length of the text. If the text is longer than this value, the text will be cut off and an ellipsis will be added. If not set, the text will not be cut off.

  • type: string

    The type of the formatter. In this case, it should be 'Highlighter'.