ApiParaPr

class ApiParaPr

Description

Class representing the paragraph properties.

Instance Methods

GetClassType(): paraPr

Returns a type of the ApiParaPr class.

SetStyle(oStyle)

The paragraph style base method.

GetStyle(): ApiStyle

Returns the paragraph style method.

SetContextualSpacing(isContextualSpacing)

Specifies that any space before or after this paragraph set using the {@link ApiParaPr#SetSpacingBefore} or {@link ApiParaPr#SetSpacingAfter} spacing element, should not be applied when the preceding and following paragraphs are of the same paragraph style, affecting the top and bottom spacing respectively.

SetIndLeft(nValue)

Sets the paragraph left side indentation.

GetIndLeft(): twips | "undefined"

Returns the paragraph left side indentation.

SetIndRight(nValue)

Sets the paragraph right side indentation.

GetIndRight(): twips | "undefined"

Returns the paragraph right side indentation.

SetIndFirstLine(nValue)

Sets the paragraph first line indentation.

GetIndFirstLine(): twips | "undefined"

Returns the paragraph first line indentation.

SetJc(sJc)

Sets the paragraph contents justification.

GetJc(): left | right | both | center | "undefined"

Returns the paragraph contents justification.

SetKeepLines(isKeepLines)

Specifies that when rendering the document using a page view, all lines of the current paragraph are maintained on a single page whenever possible.

SetKeepNext(isKeepNext)

Specifies that when rendering the document using a paginated view, the contents of the current paragraph are at least partly rendered on the same page as the following paragraph whenever possible.

SetPageBreakBefore(isPageBreakBefore)

Specifies that when rendering the document using a paginated view, the contents of the current paragraph are rendered at the beginning of a new page in the document.

SetSpacingLine(nLine, sLineRule)

Sets the paragraph line spacing.

GetSpacingLineValue(): twips | line240 | "undefined"

Returns the paragraph line spacing value.

GetSpacingLineRule(): auto | atLeast | exact | "undefined"

Returns the paragraph line spacing rule.

SetSpacingBefore(nBefore, isBeforeAuto)

Sets the spacing before the current paragraph.

GetSpacingBefore(): twips

Returns the spacing before value of the current paragraph.

SetSpacingAfter(nAfter, isAfterAuto)

Sets the spacing after the current paragraph.

GetSpacingAfter(): twips

Returns the spacing after value of the current paragraph.

SetShd(sType, r, g, b, isAuto)

Specifies the shading applied to the contents of the paragraph.

GetShd(): ApiRGBColor

Returns the shading applied to the contents of the paragraph.

SetBottomBorder(sType, nSize, nSpace, r, g, b)

Specifies the border which will be displayed below a set of paragraphs which have the same paragraph border settings.

SetLeftBorder(sType, nSize, nSpace, r, g, b)

Specifies the border which will be displayed at the left side of the page around the specified paragraph.

SetRightBorder(sType, nSize, nSpace, r, g, b)

Specifies the border which will be displayed at the right side of the page around the specified paragraph.

SetTopBorder(sType, nSize, nSpace, r, g, b)

Specifies the border which will be displayed above a set of paragraphs which have the same set of paragraph border settings.

SetBetweenBorder(sType, nSize, nSpace, r, g, b)

Specifies the border which will be displayed between each paragraph in a set of paragraphs which have the same set of paragraph border settings.

SetWidowControl(isWidowControl)

Specifies whether a single line of the current paragraph will be displayed on a separate page from the remaining content at display time by moving the line onto the following page.

SetTabs(aPos, aVal)

Specifies a sequence of custom tab stops which will be used for any tab characters in the current paragraph.

SetNumPr(oNumPr, nLvl)

Specifies that the current paragraph references a numbering definition instance in the current document.

SetOutlineLvl(nLvl): boolean

Sets the outline level for the specified properties.

GetOutlineLvl(): Number

Gets the outline level of the specified properties.

ToJSON(bWriteStyles): JSON

Converts the ApiParaPr object into the JSON object.

Extends By

ApiParagraphApiParaPr

Class representing a paragraph.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).