TextContent
The general text content. The text must reside in a compatible shape (e.g. text box or rectangle) or a table cell in a page.
JSON representation |
---|
{ "textElements": [ { object ( |
Fields | |
---|---|
textElements[]
|
The text contents broken down into its component parts, including styling information. This property is read-only. |
lists
|
The bulleted lists contained in this text, keyed by list ID. |
TextElement
A TextElement describes the content of a range of indices in the text content of a Shape or TableCell.
JSON representation |
---|
{ "startIndex": integer, "endIndex": integer, // Union field |
Fields | |
---|---|
startIndex
|
The zero-based start index of this text element, in Unicode code units. |
endIndex
|
The zero-based end index of this text element, exclusive, in Unicode code units. |
Union field
kind . The kind of text that this element represents.
kind
can be only one of the following:
|
|
paragraphMarker
|
A marker representing the beginning of a new paragraph.
The
|
textRun
|
A TextElement representing a run of text where all of the characters in the run have the same
The
|
autoText
|
A TextElement representing a spot in the text that is dynamically replaced with content that can change over time. |
ParagraphMarker
A TextElement kind that represents the beginning of a new paragraph.
JSON representation |
---|
{ "style": { object ( |
Fields | |
---|---|
style
|
The paragraph's style |
bullet
|
The bullet for this paragraph. If not present, the paragraph does not belong to a list. |
ParagraphStyle
Styles that apply to a whole paragraph.
If this text is contained in a shape with a parent
placeholder
, then these paragraph styles may be inherited from the parent. Which paragraph styles are inherited depend on the nesting level of lists:
- A paragraph not in a list will inherit its paragraph style from the paragraph at the 0 nesting level of the list inside the parent placeholder.
- A paragraph in a list will inherit its paragraph style from the paragraph at its corresponding nesting level of the list inside the parent placeholder.
Inherited paragraph styles are represented as unset fields in this message.
JSON representation |
---|
{ "lineSpacing": number, "alignment": enum ( |
Fields | |
---|---|
lineSpacing
|
The amount of space between lines, as a percentage of normal, where normal is represented as 100.0. If unset, the value is inherited from the parent. |
alignment
|
The text alignment for this paragraph. |
indentStart
|
The amount indentation for the paragraph on the side that corresponds to the start of the text, based on the current text direction. If unset, the value is inherited from the parent. |
indentEnd
|
The amount indentation for the paragraph on the side that corresponds to the end of the text, based on the current text direction. If unset, the value is inherited from the parent. |
spaceAbove
|
The amount of extra space above the paragraph. If unset, the value is inherited from the parent. |
spaceBelow
|
The amount of extra space below the paragraph. If unset, the value is inherited from the parent. |
indentFirstLine
|
The amount of indentation for the start of the first line of the paragraph. If unset, the value is inherited from the parent. |
direction
|
The text direction of this paragraph. If unset, the value defaults to
|
spacingMode
|
The spacing mode for the paragraph. |
Alignment
The types of text alignment for a paragraph.
Enums | |
---|---|
ALIGNMENT_UNSPECIFIED
|
The paragraph alignment is inherited from the parent. |
START
|
The paragraph is aligned to the start of the line. Left-aligned for LTR text, right-aligned otherwise. |
CENTER
|
The paragraph is centered. |
END
|
The paragraph is aligned to the end of the line. Right-aligned for LTR text, left-aligned otherwise. |
JUSTIFIED
|
The paragraph is justified. |
TextDirection
The directions text can flow in.
Enums | |
---|---|
TEXT_DIRECTION_UNSPECIFIED
|
The text direction is inherited from the parent. |
LEFT_TO_RIGHT
|
The text goes from left to right. |
RIGHT_TO_LEFT
|
The text goes from right to left. |
SpacingMode
The different modes for paragraph spacing.
Enums | |
---|---|
SPACING_MODE_UNSPECIFIED
|
The spacing mode is inherited from the parent. |
NEVER_COLLAPSE
|
Paragraph spacing is always rendered. |
COLLAPSE_LISTS
|
Paragraph spacing is skipped between list elements. |
Bullet
Describes the bullet of a paragraph.
JSON representation |
---|
{
"listId": string,
"nestingLevel": integer,
"glyph": string,
"bulletStyle": {
object ( |
Fields | |
---|---|
listId
|
The ID of the list this paragraph belongs to. |
nestingLevel
|
The nesting level of this paragraph in the list. |
glyph
|
The rendered bullet glyph for this paragraph. |
bulletStyle
|
The paragraph specific text style applied to this bullet. |
TextStyle
Represents the styling that can be applied to a TextRun.
If this text is contained in a shape with a parent
placeholder
, then these text styles may be inherited from the parent. Which text styles are inherited depend on the nesting level of lists:
- A text run in a paragraph that is not in a list will inherit its text style from the the newline character in the paragraph at the 0 nesting level of the list inside the parent placeholder.
- A text run in a paragraph that is in a list will inherit its text style from the newline character in the paragraph at its corresponding nesting level of the list inside the parent placeholder.
Inherited text styles are represented as unset fields in this message. If text is contained in a shape without a parent placeholder, unsetting these fields will revert the style to a value matching the defaults in the Slides editor.
JSON representation |
---|
{ "backgroundColor": { object ( |
Fields | |
---|---|
backgroundColor
|
The background color of the text. If set, the color is either opaque or transparent, depending on if the
|
foregroundColor
|
The color of the text itself. If set, the color is either opaque or transparent, depending on if the
|
bold
|
Whether or not the text is rendered as bold. |
italic
|
Whether or not the text is italicized. |
fontFamily
|
The font family of the text.
The font family can be any font from the Font menu in Slides or from
Google Fonts. If the font name is unrecognized, the text is rendered in
Some fonts can affect the weight of the text. If an update request specifies values for both
|
fontSize
|
The size of the text's font. When read, the
|
link
|
The hyperlink destination of the text. If unset, there is no link. Links are not inherited from parent text. Changing the link in an update request causes some other changes to the text style of the range:
|
baselineOffset
|
The text's vertical offset from its normal position.
Text with
|
smallCaps
|
Whether or not the text is in small capital letters. |
strikethrough
|
Whether or not the text is struck through. |
underline
|
Whether or not the text is underlined. |
weightedFontFamily
|
The font family and rendered weight of the text.
This field is an extension of
If an update request specifies values for both
If
If
|
OptionalColor
A color that can either be fully opaque or fully transparent.
JSON representation |
---|
{
"opaqueColor": {
object ( |
Fields | |
---|---|
opaqueColor
|
If set, this will be used as an opaque color. If unset, this represents a transparent color. |
BaselineOffset
The ways in which text can be vertically offset from its normal position.
Enums | |
---|---|
BASELINE_OFFSET_UNSPECIFIED
|
The text's baseline offset is inherited from the parent. |
NONE
|
The text is not vertically offset. |
SUPERSCRIPT
|
The text is vertically offset upwards (superscript). |
SUBSCRIPT
|
The text is vertically offset downwards (subscript). |
WeightedFontFamily
Represents a font family and weight used to style a TextRun.
JSON representation |
---|
{ "fontFamily": string, "weight": integer } |
Fields | |
---|---|
fontFamily
|
The font family of the text.
The font family can be any font from the Font menu in Slides or from
Google Fonts. If the font name is unrecognized, the text is rendered in
|
weight
|
The rendered weight of the text. This field can have any value that is a multiple of
|
TextRun
A TextElement kind that represents a run of text that all has the same styling.
JSON representation |
---|
{
"content": string,
"style": {
object ( |
Fields | |
---|---|
content
|
The text of this run. |
style
|
The styling applied to this run. |
AutoText
A TextElement kind that represents auto text.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type
|
The type of this auto text. |
content
|
The rendered content of this auto text, if available. |
style
|
The styling applied to this auto text. |
Type
The types of auto text
Enums | |
---|---|
TYPE_UNSPECIFIED
|
An unspecified autotext type. |
SLIDE_NUMBER
|
Type for autotext that represents the current slide number. |
List
A List describes the look and feel of bullets belonging to paragraphs associated with a list. A paragraph that is part of a list has an implicit reference to that list's ID.
JSON representation |
---|
{
"listId": string,
"nestingLevel": {
integer: {
object ( |
Fields | |
---|---|
listId
|
The ID of the list. |
nestingLevel
|
A map of nesting levels to the properties of bullets at the associated level. A list has at most nine levels of nesting, so the possible values for the keys of this map are 0 through 8, inclusive. |
NestingLevel
Contains properties describing the look and feel of a list bullet at a given level of nesting.
JSON representation |
---|
{
"bulletStyle": {
object ( |
Fields | |
---|---|
bulletStyle
|
The style of a bullet at this level of nesting. |