Get Started
Usage API

GetAllParagraphs

GetAllParagraphs() → { Array.<ApiParagraph> }

Gets a collection of paragraphs that represents all paragraphs in the specified range.

Parameters:

This method doesn't have any parameters.

Returns:

Type
Array.<ApiParagraph>

Example

Copy code
builder.CreateFile("docx");
oDocument = editor.GetDocument();
oFParagraph = oDocument.GetElement(0);
oFParagraph.AddText("First paragraph");
oSParagraph = editor.CreateParagraph();
oSParagraph.AddText("Second Paragraph");
oDocument.Push(oSParagraph);
oRange = oDocument.GetRange(0, 28);
arrParagraphs = oRange.GetAllParagraphs();
arrParagraphs[0].SetBold("true");
builder.SaveFile("docx", "GetAllParagraphs.docx");
builder.CloseFile();

Resulting document