Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ParagraphStyle

import type { ParagraphStyle } from "https://googleapis.deno.dev/v1/docs:v1.ts";

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 corresponding named style type. * The ParagraphStyle on a named style inherits from the normal 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's 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.

interface ParagraphStyle {
alignment?:
| "ALIGNMENT_UNSPECIFIED"
| "START"
| "CENTER"
| "END"
| "JUSTIFIED";
avoidWidowAndOrphan?: boolean;
borderBetween?: ParagraphBorder;
borderBottom?: ParagraphBorder;
borderLeft?: ParagraphBorder;
borderRight?: ParagraphBorder;
borderTop?: ParagraphBorder;
direction?: "CONTENT_DIRECTION_UNSPECIFIED" | "LEFT_TO_RIGHT" | "RIGHT_TO_LEFT";
headingId?: string;
indentEnd?: Dimension;
indentFirstLine?: Dimension;
indentStart?: Dimension;
keepLinesTogether?: boolean;
keepWithNext?: boolean;
lineSpacing?: number;
namedStyleType?:
| "NAMED_STYLE_TYPE_UNSPECIFIED"
| "NORMAL_TEXT"
| "TITLE"
| "SUBTITLE"
| "HEADING_1"
| "HEADING_2"
| "HEADING_3"
| "HEADING_4"
| "HEADING_5"
| "HEADING_6";
pageBreakBefore?: boolean;
shading?: Shading;
spaceAbove?: Dimension;
spaceBelow?: Dimension;
spacingMode?: "SPACING_MODE_UNSPECIFIED" | "NEVER_COLLAPSE" | "COLLAPSE_LISTS";
tabStops?: TabStop[];
}

§Properties

§
alignment?: "ALIGNMENT_UNSPECIFIED" | "START" | "CENTER" | "END" | "JUSTIFIED"
[src]

The text alignment for this paragraph.

§
avoidWidowAndOrphan?: boolean
[src]

Whether to avoid widows and orphans for the paragraph. If unset, the value is inherited from the parent.

§
borderBetween?: ParagraphBorder
[src]

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 changing a paragraph border, the new border must be specified in its entirety.

§
borderBottom?: ParagraphBorder
[src]

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 changing a paragraph border, the new border must be specified in its entirety.

§

The border to the left of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.

§
borderRight?: ParagraphBorder
[src]

The border to the right of this paragraph. If unset, the value is inherited from the parent. Paragraph borders cannot be partially updated. When changing a paragraph border, the new border must be specified in its entirety.

§

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 changing a paragraph border, the new border must be specified in its entirety.

§
direction?: "CONTENT_DIRECTION_UNSPECIFIED" | "LEFT_TO_RIGHT" | "RIGHT_TO_LEFT"
[src]

The text direction of this paragraph. If unset, the value defaults to LEFT_TO_RIGHT since paragraph direction is not inherited.

§
headingId?: string
[src]

The heading ID of the paragraph. If empty, then this paragraph is not a heading. This property is read-only.

§
indentEnd?: Dimension
[src]

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.

§
indentFirstLine?: Dimension
[src]

The amount of indentation for the first line of the paragraph. If unset, the value is inherited from the parent.

§
indentStart?: Dimension
[src]

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.

§
keepLinesTogether?: boolean
[src]

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?: boolean
[src]

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.

§
lineSpacing?: number
[src]

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.

§
namedStyleType?: "NAMED_STYLE_TYPE_UNSPECIFIED" | "NORMAL_TEXT" | "TITLE" | "SUBTITLE" | "HEADING_1" | "HEADING_2" | "HEADING_3" | "HEADING_4" | "HEADING_5" | "HEADING_6"
[src]

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.

§
pageBreakBefore?: boolean
[src]

Whether the current paragraph should always start at the beginning of a page. If unset, the value is inherited from the parent. Attempting to update page_break_before for paragraphs in unsupported regions, including Table, Header, Footer and Footnote, can result in an invalid document state that returns a 400 bad request error.

§
shading?: Shading
[src]

The shading of the paragraph. If unset, the value is inherited from the parent.

§
spaceAbove?: Dimension
[src]

The amount of extra space above the paragraph. If unset, the value is inherited from the parent.

§
spaceBelow?: Dimension
[src]

The amount of extra space below the paragraph. If unset, the value is inherited from the parent.

§
spacingMode?: "SPACING_MODE_UNSPECIFIED" | "NEVER_COLLAPSE" | "COLLAPSE_LISTS"
[src]

The spacing mode for the paragraph.

§
tabStops?: TabStop[]
[src]

A list of the tab stops for this paragraph. The list of tab stops is not inherited. This property is read-only.