Stay organized with collections Save and categorize content based on your preferences.
RichTextValueA stylized text string used to represent cell text. Substrings of the text can have different text styles.
A run is the longest unbroken substring having the same text style. For example, the sentence, "This child is carrying apples" has 4 runs: ['This ', 'child ', 'is carrying ', 'apples']
.
copy()
Returns a builder for a Rich Text value initialized with the values of this Rich Text value.
ReturnRichTextValueBuilder
— A builder for a Rich Text value.
getEndIndex()
Gets the end index of this value in the cell.
ReturnInteger
— The end index of this value in the cell.
getLinkUrl()
Returns the link URL for this value.
ReturnString
— The link URL for this value, or null
if there is no link or if there are multiple different links.
getLinkUrl(startOffset, endOffset)
Returns the link URL for the text from startOffset
to endOffset
. Offsets are 0 based and relative to the cell's text, with the start offset being inclusive and the end offset being exclusive.
startOffset
Integer
The start offset. endOffset
Integer
The end offset. Return
String
— The link URL for this value, or null
if there is no link or if multiple different links are in the given range.
getRuns()
Returns the Rich Text string split into an array of runs, wherein each run is the longest possible substring having a consistent text style.
ReturnRichTextValue[]
— An array of runs.
getStartIndex()
Gets the start index of this value in the cell.
ReturnInteger
— The start index of this value in the cell.
getText()
Returns the text of this value.
ReturnString
— The text of this value.
getTextStyle()
Returns the text style of this value.
ReturnTextStyle
— The text style of this value.
getTextStyle(startOffset, endOffset)
Returns the text style of the text from startOffset
to endOffset
. Offsets are 0 based and relative to the cell's text, with the start offset being inclusive and the end offset being exclusive.
startOffset
Integer
The start offset. endOffset
Integer
The end offset. Return
TextStyle
— The text style of the given substring of this value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-03 UTC."],[[["`RichTextValue` objects represent stylized text within a spreadsheet cell, allowing substrings to have varied styles."],["Text is broken into \"runs,\" which are the longest continuous substrings sharing the same style."],["The `RichTextValue` class provides methods to access and manipulate text, styles, and links within these runs."],["Developers can retrieve individual runs, get/set text styles, and extract link URLs using dedicated methods."],["Methods like `copy()`, `getText()`, `getRuns()`, and `getTextStyle()` offer manipulation of `RichTextValues`."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4