Get Started
Usage API

SetItalic

SetItalic(isItalic) → { ApiRange | null }

Set the italic property to the text character.

Parameters:

Name Type Description
isItalic boolean

Specifies that the contents of the current Range are displayed italicized.

Returns:

Type
ApiRange | null

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("ONLYOFFICE Document Builder");
oRange = oDocument.GetRange(0, 24);
oRange.SetItalic(true);
builder.SaveFile("docx", "SetItalic.docx");
builder.CloseFile();

Resulting document