highlightHtml
function highlightHtml(
range: GoogleAppsScript.Spreadsheet.Range,
theme: Theme | null | undefined = {}
): GoogleAppsScript.Spreadsheet.Range;
The cells are read as text, tags, attribute names, values, comments and text content are told apart, and the cells are written back as rich text with each part in its own colour. A theme decides the colours.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The range whose cells are highlighted. |
|
| The colour for each kind of token. |
Returns
GoogleAppsScript.Spreadsheet.Range — the same range.
Throws
Exception | Condition |
|---|---|
| the first argument is not a range. |
Examples
In use
const range = SpreadsheetApp.getActiveRange();
highlightHtml(range);
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.