REST Resource: documents
Resource: Document
A Google Docs document.
JSON representation | |
---|---|
{ "documentId": string, "title": string, "body": { object (
|
Fields | |
---|---|
documentId |
Output only. The ID of the document. |
title |
The title of the document. |
body |
Output only. The main body of the document. |
headers |
Output only. The headers in the document, keyed by header ID. |
footers |
Output only. The footers in the document, keyed by footer ID. |
footnotes |
Output only. The footnotes in the document, keyed by footnote ID. |
documentStyle |
Output only. The style of the document. |
suggestedDocumentStyleChanges |
Output only. The suggested changes to the style of the document, keyed by suggestion ID. |
namedStyles |
Output only. The named styles of the document. |
suggestedNamedStylesChanges |
Output only. The suggested changes to the named styles of the document, keyed by suggestion ID. |
lists |
Output only. The lists in the document, keyed by list ID. |
namedRanges |
Output only. The named ranges in the document, keyed by name. |
revisionId |
Output only. The revision ID of the document. Can be used in update requests to specify which revision of a document to apply updates to and how the request should behave if the document has been edited since that revision. Only populated if the user has edit access to the document. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the document has not changed. Conversely, a changed ID (for the same document and user) usually means the document has been updated; however, a changed ID can also be due to internal factors such as ID format changes.
|
suggestionsViewMode |
Output only. The suggestions view mode applied to the document. Note: When editing a document, changes must be based on a document with
|
inlineObjects |
Output only. The inline objects in the document, keyed by object ID. |
positionedObjects |
Output only. The positioned objects in the document, keyed by object ID. |
Body
The document body.
The body typically contains the full document contents except for headers
, footers
and footnotes
.
JSON representation | |
---|---|
{
"content": [
{
object (
|
Fields | |
---|---|
content[] |
The contents of the body. The indexes for the body's content begin at zero.
|
StructuralElement
A StructuralElement describes content that provides structure to the document.
JSON representation | |
---|---|
{ "startIndex": number, "endIndex": number, // Union field
|
Fields | ||
---|---|---|
startIndex |
The zero-based start index of this structural element, in UTF-16 code units. | |
endIndex |
The zero-based end index of this structural element, exclusive, in UTF-16 code units. | |
Union field content . The content of the structural element. content can be only one of the following: | ||
paragraph |
A paragraph type of structural element. | |
sectionBreak |
A section break type of structural element. | |
table |
A table type of structural element. | |
tableOfContents |
A table of contents type of structural element. |
Paragraph
A StructuralElement
representing a paragraph. A paragraph is a range of content that is terminated with a newline character.
JSON representation | |
---|---|
{ "elements": [ { object (
|
Fields | |
---|---|
elements[] |
The content of the paragraph broken down into its component parts. |
paragraphStyle |
The style of this paragraph. |
suggestedParagraphStyleChanges |
The suggested paragraph style changes to this paragraph, keyed by suggestion ID. |
bullet |
The bullet for this paragraph. If not present, the paragraph does not belong to a list. |
suggestedBulletChanges |
The suggested changes to this paragraph's bullet. |
positionedObjectIds[] |
The IDs of the positioned objects tethered to this paragraph. |
suggestedPositionedObjectIds |
The IDs of the positioned objects that are suggested to be attached to this paragraph, keyed by suggestion ID. |
ParagraphElement
A ParagraphElement describes content within a Paragraph
.
JSON representation | |
---|---|
{ "startIndex": number, "endIndex": number, // Union field
|
Fields | ||
---|---|---|
startIndex |
The zero-based start index of this paragraph element, in UTF-16 code units. | |
endIndex |
The zero-base end index of this paragraph element, exclusive, in UTF-16 code units. | |
Union field content . The content of the paragraph element. content can be only one of the following: | ||
textRun |
A text run paragraph element. | |
autoText |
An auto text paragraph element. | |
pageBreak |
A page break paragraph element. | |
columnBreak |
A column break paragraph element. | |
footnoteReference |
A footnote reference paragraph element. | |
horizontalRule |
A horizontal rule paragraph element. | |
equation |
An equation paragraph element. | |
inlineObjectElement |
An inline object paragraph element. |
TextRun
A ParagraphElement
that represents a run of text that all has the same styling.
JSON representation | |
---|---|
{ "content": string, "suggestedInsertionIds": [ string ], "suggestedDeletionIds": [ string ], "textStyle": { object (
|
Fields | |
---|---|
content |
The text of this run. Any non-text elements in the run are replaced with the Unicode character U+E907.
|
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
textStyle |
The text style of this run. |
suggestedTextStyleChanges |
The suggested text style changes to this run, keyed by suggestion ID. |
TextStyle
Represents the styling that can be applied to text.
Inherited text styles are represented as unset fields in this message. A text style's parent depends on where the text style is defined:
- The TextStyle of text in a
Paragraph
inherits from the paragraph's correspondingnamed style type
. - The TextStyle on a
named style
inherits from thenormal text
named style. - The TextStyle of the
normal text
named style inherits from the default text style in the Docs editor. - The TextStyle on a
Paragraph
element that is contained in a table may inherit its text style from the table style.
If the text style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.
JSON representation | |
---|---|
{ "bold": boolean, "italic": boolean, "underline": boolean, "strikethrough": boolean, "smallCaps": boolean, "backgroundColor": { object (
|
Fields | |
---|---|
bold |
Whether or not the text is rendered as bold. |
italic |
Whether or not the text is italicized. |
underline |
Whether or not the text is underlined. |
strikethrough |
Whether or not the text is struck through. |
smallCaps |
Whether or not the text is in small capital letters. |
backgroundColor |
The background color of the text. If set, the color is either an RGB color or transparent, depending on the |
foregroundColor |
The foreground color of the text. If set, the color is either an RGB color or transparent, depending on the |
fontSize |
The size of the text's font. |
weightedFontFamily |
The font family and rendered weight of the text. If an update request specifies values for both If If
|
baselineOffset |
The text's vertical offset from its normal position. Text with
|
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:
|
OptionalColor
A color that can either be fully opaque or fully transparent.
JSON representation | |
---|---|
{
"color": {
object (
|
Fields | |
---|---|
color |
If set, this will be used as an opaque color. If unset, this represents a transparent color. |
Color
A solid color.
JSON representation | |
---|---|
{
"rgbColor": {
object (
|
Fields | |
---|---|
rgbColor |
The RGB color value. |
RgbColor
An RGB color.
JSON representation | |
---|---|
{ "red": number, "green": number, "blue": number }
|
Fields | |
---|---|
red |
The red component of the color, from 0.0 to 1.0. |
green |
The green component of the color, from 0.0 to 1.0. |
blue |
The blue component of the color, from 0.0 to 1.0. |
Dimension
A magnitude in a single direction in the specified units.
JSON representation | |
---|---|
{
"magnitude": number,
"unit": enum (
|
Fields | |
---|---|
magnitude |
The magnitude. |
unit |
The units for magnitude. |
Unit
Units of measurement.
Enums | |
---|---|
UNIT_UNSPECIFIED | The units are unknown. |
PT | A point, 1/72 of an inch. |
WeightedFontFamily
Represents a font family and weight of text.
JSON representation | |
---|---|
{ "fontFamily": string, "weight": number }
|
Fields | |
---|---|
fontFamily |
The font family of the text. The font family can be any font from the Font menu in Docs or from Google Fonts. If the font name is unrecognized, the text is rendered in
|
weight |
The weight of the font. This field can have any value that is a multiple of The default value is The font weight makes up just one component of the rendered font weight. The rendered weight is determined by a combination of the
|
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). |
Link
A reference to another portion of a document or an external URL resource.
JSON representation | |
---|---|
{ // Union field
|
Fields | ||
---|---|---|
Union field destination . The link destination. destination can be only one of the following: | ||
url |
An external URL. | |
bookmarkId |
The ID of a bookmark in this document. | |
headingId |
The ID of a heading in this document. |
AutoText
A ParagraphElement
representing a spot in the text that is dynamically replaced with content that can change over time, like a page number.
JSON representation | |
---|---|
{ "type": enum (
|
Fields | |
---|---|
type |
The type of this auto text. |
suggestedInsertionIds[] |
The suggested insertion IDs. An |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
textStyle |
The text style of this AutoText. |
suggestedTextStyleChanges |
The suggested text style changes to this AutoText, keyed by suggestion ID. |
Type
The types of auto text.
Enums | |
---|---|
TYPE_UNSPECIFIED | An unspecified auto text type. |
PAGE_NUMBER | Type for auto text that represents the current page number. |
PAGE_COUNT | Type for auto text that represents the total number of pages in the document. |
PageBreak
A ParagraphElement
representing a page break. A page break makes the subsequent text start at the top of the next page.
JSON representation | |
---|---|
{ "suggestedInsertionIds": [ string ], "suggestedDeletionIds": [ string ], "textStyle": { object (
|
Fields | |
---|---|
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
textStyle |
The text style of this PageBreak. Similar to text content, like text runs and footnote references, the text style of a page break can affect content layout as well as the styling of text inserted adjacent to it.
|
suggestedTextStyleChanges |
The suggested text style changes to this PageBreak, keyed by suggestion ID. |
ColumnBreak
A ParagraphElement
representing a column break. A column break makes the subsequent text start at the top of the next column.
JSON representation | |
---|---|
{ "suggestedInsertionIds": [ string ], "suggestedDeletionIds": [ string ], "textStyle": { object (
|
Fields | |
---|---|
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
textStyle |
The text style of this ColumnBreak. Similar to text content, like text runs and footnote references, the text style of a column break can affect content layout as well as the styling of text inserted adjacent to it.
|
suggestedTextStyleChanges |
The suggested text style changes to this ColumnBreak, keyed by suggestion ID. |
FootnoteReference
A ParagraphElement
representing a footnote reference. A footnote reference is the inline content rendered with a number and is used to identify the footnote.
JSON representation | |
---|---|
{ "footnoteId": string, "footnoteNumber": string, "suggestedInsertionIds": [ string ], "suggestedDeletionIds": [ string ], "textStyle": { object (
|
Fields | |
---|---|
footnoteId |
The ID of the |
footnoteNumber |
The rendered number of this footnote. |
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
textStyle |
The text style of this FootnoteReference. |
suggestedTextStyleChanges |
The suggested text style changes to this FootnoteReference, keyed by suggestion ID. |
HorizontalRule
A ParagraphElement
representing a horizontal line.
JSON representation | |
---|---|
{ "suggestedInsertionIds": [ string ], "suggestedDeletionIds": [ string ], "textStyle": { object (
|
Fields | |
---|---|
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
textStyle |
The text style of this HorizontalRule. Similar to text content, like text runs and footnote references, the text style of a horizontal rule can affect content layout as well as the styling of text inserted adjacent to it.
|
suggestedTextStyleChanges |
The suggested text style changes to this HorizontalRule, keyed by suggestion ID. |
Equation
A ParagraphElement
representing an equation.
JSON representation | |
---|---|
{ "suggestedInsertionIds": [ string ], "suggestedDeletionIds": [ string ] }
|
Fields | |
---|---|
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
InlineObjectElement
A ParagraphElement
that contains an InlineObject
.
JSON representation | |
---|---|
{ "inlineObjectId": string, "suggestedInsertionIds": [ string ], "suggestedDeletionIds": [ string ], "textStyle": { object (
|
Fields | |
---|---|
inlineObjectId |
The ID of the |
suggestedInsertionIds[] |
The suggested insertion IDs. An |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
textStyle |
The text style of this InlineObjectElement. Similar to text content, like text runs and footnote references, the text style of an inline object element can affect content layout as well as the styling of text inserted adjacent to it.
|
suggestedTextStyleChanges |
The suggested text style changes to this InlineObject, keyed by suggestion ID. |
ParagraphStyle
Styles that apply to a whole paragraph.
Inherited paragraph styles are represented as unset fields in this message. A paragraph style's parent depends on where the paragraph style is defined:
- The ParagraphStyle on a
Paragraph
inherits from the paragraph's correspondingnamed style type
. - The ParagraphStyle on a
named style
inherits from thenormal text
named style. - The ParagraphStyle of the
normal text
named style inherits from the default paragraph style in the Docs editor. - The ParagraphStyle on a
Paragraph
element that is contained in a table may inherit its paragraph style from the table style.
If the paragraph style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.
JSON representation | |
---|---|
{ "headingId": string, "namedStyleType": enum (
|
Fields | |
---|---|
headingId |
The heading ID of the paragraph. If empty, then this paragraph is not a heading. This property is read-only.
|
namedStyleType |
The named style type of the paragraph. Since updating the named style type affects other properties within ParagraphStyle, the named style type is applied before the other properties are updated.
|
alignment |
The text alignment for this paragraph. |
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. |
direction |
The text direction of this paragraph. If unset, the value defaults to |
spacingMode |
The spacing mode for the paragraph. |
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. |
borderBetween |
The border between this paragraph and the next and previous paragraphs. If unset, the value is inherited from the parent. The between border is rendered when the adjacent paragraph has the same border and indent properties. Paragraph borders cannot be partially updated. When making changes to a paragraph border the new border must be specified in its entirety.
|
borderTop |
The border at the top of this paragraph. If unset, the value is inherited from the parent. The top border is rendered when the paragraph above has different border and indent properties. Paragraph borders cannot be partially updated. When making changes to a paragraph border the new border must be specified in its entirety.
|
borderBottom |
The border at the bottom of this paragraph. If unset, the value is inherited from the parent. The bottom border is rendered when the paragraph below has different border and indent properties. Paragraph borders cannot be partially updated. When making changes to a paragraph border the new border must be specified in its entirety.
|
borderLeft |
The border to the left of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When making changes to a paragraph border the new border must be specified in its entirety.
|
borderRight |
The border to the right of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When making changes to a paragraph border the new border must be specified in its entirety.
|
indentFirstLine |
The amount of indentation for the first line of the paragraph. If unset, the value is inherited from the parent. |
indentStart |
The amount of indentation for the paragraph on the side that corresponds to the start of the text, based on the current paragraph direction. If unset, the value is inherited from the parent. |
indentEnd |
The amount of indentation for the paragraph on the side that corresponds to the end of the text, based on the current paragraph direction. If unset, the value is inherited from the parent. |
tabStops[] |
A list of the tab stops for this paragraph. The list of tab stops is not inherited. This property is read-only.
|
keepLinesTogether |
Whether all lines of the paragraph should be laid out on the same page or column if possible. If unset, the value is inherited from the parent. |
keepWithNext |
Whether at least a part of this paragraph should be laid out on the same page or column as the next paragraph if possible. If unset, the value is inherited from the parent. |
avoidWidowAndOrphan |
Whether to avoid widows and orphans for the paragraph. If unset, the value is inherited from the parent. |
shading |
The shading of the paragraph. If unset, the value is inherited from the parent. |
NamedStyleType
The types of named styles.
Enums | |
---|---|
NAMED_STYLE_TYPE_UNSPECIFIED | The type of named style is unspecified. |
NORMAL_TEXT | Normal text. |
TITLE | Title. |
SUBTITLE | Subtitle. |
HEADING_1 | Heading 1. |
HEADING_2 | Heading 2. |
HEADING_3 | Heading 3. |
HEADING_4 | Heading 4. |
HEADING_5 | Heading 5. |
HEADING_6 | Heading 6. |
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. |
ContentDirection
The directions content can flow in.
Enums | |
---|---|
CONTENT_DIRECTION_UNSPECIFIED | The content direction is unspecified. |
LEFT_TO_RIGHT | The content goes from left to right. |
RIGHT_TO_LEFT | The content 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. |
ParagraphBorder
A border around a paragraph.
JSON representation | |
---|---|
{ "color": { object (
|
Fields | |
---|---|
color |
The color of the border. |
width |
The width of the border. |
padding |
The padding of the border. |
dashStyle |
The dash style of the border. |
DashStyle
The kinds of dashes with which linear geometry can be rendered. These values are based on the "ST_PresetLineDashVal" simple type described in section 20.1.10.48 of "Office Open XML File Formats - Fundamentals and Markup Language Reference", part 1 of ECMA-376 4th edition.
Enums | |
---|---|
DASH_STYLE_UNSPECIFIED | Unspecified dash style. |
SOLID | Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'. This is the default dash style. |
DOT | Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'. |
DASH | Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'. |
TabStop
A tab stop within a paragraph.
JSON representation | |
---|---|
{ "offset": { object (
|
Fields | |
---|---|
offset |
The offset between this tab stop and the start margin. |
alignment |
The alignment of this tab stop. If unset, the value defaults to |
TabStopAlignment
The alignment of the tab stop.
Enums | |
---|---|
TAB_STOP_ALIGNMENT_UNSPECIFIED | The tab stop alignment is unspecified. |
START | The tab stop is aligned to the start of the line. This is the default. |
CENTER | The tab stop is aligned to the center of the line. |
END | The tab stop is aligned to the end of the line. |
Shading
The shading of a paragraph.
JSON representation | |
---|---|
{
"backgroundColor": {
object (
|
Fields | |
---|---|
backgroundColor |
The background color of this paragraph shading. |
Bullet
Describes the bullet of a paragraph.
JSON representation | |
---|---|
{
"listId": string,
"nestingLevel": number,
"textStyle": {
object (
|
Fields | |
---|---|
listId |
The ID of the list this paragraph belongs to. |
nestingLevel |
The nesting level of this paragraph in the list. |
textStyle |
The paragraph specific text style applied to this bullet. |
SectionBreak
A StructuralElement
representing a section break. A section is a range of content which has the same SectionStyle
. A section break represents the start of a new section, and the section style applies to the section after the section break.
The document body always begins with a section break.
JSON representation | |
---|---|
{
"suggestedInsertionIds": [
string
],
"suggestedDeletionIds": [
string
],
"sectionStyle": {
object (
|
Fields | |
---|---|
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
sectionStyle |
The style of the section after this section break. |
SectionStyle
The styling that applies to a section.
JSON representation | |
---|---|
{ "columnProperties": [ { object (
|
Fields | |
---|---|
columnProperties[] |
The section's columns properties. If empty, the section contains one column with the default properties in the Docs editor.
|
columnSeparatorStyle |
The style of column separators. This style can be set even when there is one column in the section.
|
contentDirection |
The content direction of this section. If unset, the value defaults to |
SectionColumnProperties
Properties that apply to a section's column.
JSON representation | |
---|---|
{ "width": { object (
|
Fields | |
---|---|
width |
The width of the column. |
paddingEnd |
The padding at the end of the column. |
ColumnSeparatorStyle
The style of column separators between columns.
Enums | |
---|---|
COLUMN_SEPARATOR_STYLE_UNSPECIFIED | An unspecified column separator style. |
NONE | No column separator lines between columns. |
BETWEEN_EACH_COLUMN | Renders a column separator line between each column. |
Table
A StructuralElement
representing a table.
JSON representation | |
---|---|
{ "rows": number, "columns": number, "tableRows": [ { object (
|
Fields | |
---|---|
rows |
Number of rows in the table. |
columns |
Number of columns in the table. It is possible for a table to be non-rectangular, so some rows may have a different number of cells.
|
tableRows[] |
The contents and style of each row. |
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
tableStyle |
The style of the table. |
TableRow
The contents and style of a row in a Table
.
JSON representation | |
---|---|
{ "startIndex": number, "endIndex": number, "tableCells": [ { object (
|
Fields | |
---|---|
startIndex |
The zero-based start index of this row, in UTF-16 code units. |
endIndex |
The zero-based end index of this row, exclusive, in UTF-16 code units. |
tableCells[] |
The contents and style of each cell in this row. It is possible for a table to be non-rectangular, so some rows may have a different number of cells than other rows in the same table.
|
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
tableRowStyle |
The style of the table row. |
suggestedTableRowStyleChanges |
The suggested style changes to this row, keyed by suggestion ID. |
TableCell
The contents and style of a cell in a Table
.
JSON representation | |
---|---|
{ "startIndex": number, "endIndex": number, "content": [ { object (
|
Fields | |
---|---|
startIndex |
The zero-based start index of this cell, in UTF-16 code units. |
endIndex |
The zero-based end index of this cell, exclusive, in UTF-16 code units. |
content[] |
The content of the cell. |
tableCellStyle |
The style of the cell. |
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
suggestedTableCellStyleChanges |
The suggested changes to the table cell style, keyed by suggestion ID. |
TableCellStyle
The style of a TableCell
.
Inherited table cell styles are represented as unset fields in this message. A table cell style can inherit from the table's style.
JSON representation | |
---|---|
{ "rowSpan": number, "columnSpan": number, "backgroundColor": { object (
|
Fields | |
---|---|
rowSpan |
The row span of the cell. This property is read-only.
|
columnSpan |
The column span of the cell. This property is read-only.
|
backgroundColor |
The background color of the cell. |
borderLeft |
The left border of the cell. |
borderRight |
The right border of the cell. |
borderTop |
The top border of the cell. |
borderBottom |
The bottom border of the cell. |
paddingLeft |
The left padding of the cell. |
paddingRight |
The right padding of the cell. |
paddingTop |
The top padding of the cell. |
paddingBottom |
The bottom padding of the cell. |
contentAlignment |
The alignment of the content in the table cell. The default alignment matches the alignment for newly created table cells in the Docs editor. |
TableCellBorder
A border around a table cell.
Table cell borders cannot be transparent. To hide a table cell border, make its width 0.
JSON representation | |
---|---|
{ "color": { object (
|
Fields | |
---|---|
color |
The color of the border. This color cannot be transparent.
|
width |
The width of the border. |
dashStyle |
The dash style of the border. |
ContentAlignment
The types of content alignment.
Derived from a subset of the values of the "ST_TextAnchoringType" simple type in section 20.1.10.59 of "Office Open XML File Formats - Fundamentals and Markup Language Reference", part 1 of ECMA-376 4th edition.
Enums | |
---|---|
CONTENT_ALIGNMENT_UNSPECIFIED | An unspecified content alignment. The content alignment is inherited from the parent if one exists. |
CONTENT_ALIGNMENT_UNSUPPORTED | An unsupported content alignment. |
TOP | An alignment that aligns the content to the top of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 't'. |
MIDDLE | An alignment that aligns the content to the middle of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'ctr'. |
BOTTOM | An alignment that aligns the content to the bottom of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'b'. |
TableRowStyle
Styles that apply to a table row.
JSON representation | |
---|---|
{
"minRowHeight": {
object (
|
Fields | |
---|---|
minRowHeight |
The minimum height of the row. The row will be rendered in the Docs editor at a height equal to or greater than this value in order to show all the content in the row's cells. |
TableStyle
Styles that apply to a table.
JSON representation | |
---|---|
{
"tableColumnProperties": [
{
object (
|
Fields | |
---|---|
tableColumnProperties[] |
The properties of each column. Note that in Docs, tables contain rows and rows contain cells, similar to HTML. So the properties for a row can be found on the row's
|
TableColumnProperties
The properties of a column in a table.
JSON representation | |
---|---|
{ "widthType": enum (
|
Fields | |
---|---|
widthType |
The width type of the column. |
width |
The width of the column. Set when the column's |
WidthType
The type of width of the column.
Enums | |
---|---|
WIDTH_TYPE_UNSPECIFIED | The column width type is unspecified. |
EVENLY_DISTRIBUTED | The column width is evenly distributed among the other evenly distrubted columns. The width of the column is automatically determined and will have an equal portion of the width remaining for the table after accounting for all columns with specified widths. |
FIXED_WIDTH | A fixed column width. The [width][google.apps.docs.v1.TableColumnProperties.width property contains the column's width. |
TableOfContents
A StructuralElement
representing a table of contents.
JSON representation | |
---|---|
{
"content": [
{
object (
|
Fields | |
---|---|
content[] |
The content of the table of contents. |
suggestedInsertionIds[] |
The suggested insertion IDs. A |
suggestedDeletionIds[] |
The suggested deletion IDs. If empty, then there are no suggested deletions of this content. |
DocumentStyle
The style of the document.
JSON representation | |
---|---|
{ "background": { object (
|
Fields | |
---|---|
background |
The background of the document. Documents cannot have a transparent background color. |
defaultHeaderId |
The ID of the default header. If not set, there is no default header. This property is read-only.
|
defaultFooterId |
The ID of the default footer. If not set, there is no default footer. This property is read-only.
|
evenPageHeaderId |
The ID of the header used only for even pages. The value of This property is read-only.
|
evenPageFooterId |
The ID of the footer used only for even pages. The value of This property is read-only.
|
firstPageHeaderId |
The ID of the header used only for the first page. If not set then a unique header for the first page does not exist. The value of This property is read-only.
|
firstPageFooterId |
The ID of the footer used only for the first page. If not set then a unique footer for the first page does not exist. The value of This property is read-only.
|
useFirstPageHeaderFooter |
Indicates whether to use the first page header / footer IDs for the first page. This property is read-only.
|
useEvenPageHeaderFooter |
Indicates whether to use the even page header / footer IDs for the even pages. This property is read-only.
|
pageNumberStart |
The page number from which to start counting the number of pages. |
marginTop |
The top page margin. Updating the top page margin on the document style clears the top page margin on all section styles.
|
marginBottom |
The bottom page margin. Updating the bottom page margin on the document style clears the bottom page margin on all section styles.
|
marginRight |
The right page margin. Updating the right page margin on the document style clears the right page margin on all section styles. It may also cause columns to resize in all sections.
|
marginLeft |
The left page margin. Updating the left page margin on the document style clears the left page margin on all section styles. It may also cause columns to resize in all sections.
|
pageSize |
The size of a page in the document. |
Background
Represents the background of a document.
JSON representation | |
---|---|
{
"color": {
object (
|
Fields | |
---|---|
color |
The background color. |
Size
A width and height.
JSON representation | |
---|---|
{ "height": { object (
|
Fields | |
---|---|
height |
The height of the object. |
width |
The width of the object. |
NamedStyles
The named styles. Paragraphs in the document can inherit their TextStyle
and ParagraphStyle
from these named styles.
JSON representation | |
---|---|
{
"styles": [
{
object (
|
Fields | |
---|---|
styles[] |
The named styles. There is an entry for each of the possible
|
NamedStyle
A named style. Paragraphs in the document can inherit their TextStyle
and ParagraphStyle
from this named style when they have the same named style type.
JSON representation | |
---|---|
{ "namedStyleType": enum (
|
Fields | |
---|---|
namedStyleType |
The type of this named style. |
textStyle |
The text style of this named style. |
paragraphStyle |
The paragraph style of this named style. |
SuggestionsViewMode
The suggestions view mode applied to the document which indicates how suggested changes are represented. It provides options for reading the document with all suggestions inline, accepted or rejected.
Enums | |
---|---|
DEFAULT_FOR_CURRENT_ACCESS | The SuggestionsViewMode applied to the returned document depends on the user's current access level. If the user only has view access, PREVIEW_WITHOUT_SUGGESTIONS is applied. Otherwise, SUGGESTIONS_INLINE is applied. This is the default suggestions view mode. |
SUGGESTIONS_INLINE | The returned document has suggestions inline. Suggested changes will be differentiated from base content within the document. Requests to retrieve a document using this mode will return a 403 error if the user does not have permission to view suggested changes. |
PREVIEW_SUGGESTIONS_ACCEPTED | The returned document is a preview with all suggested changes accepted. Requests to retrieve a document using this mode will return a 403 error if the user does not have permission to view suggested changes. |
PREVIEW_WITHOUT_SUGGESTIONS | The returned document is a preview with all suggested changes rejected if there are any suggestions in the document. |
Methods | |
---|---|
| Applies one or more updates to the document. |
| Creates a blank document using the title given in the request. |
| Gets the latest version of the specified document. |