SetItalic

SetItalic(isItalic) → { ApiRange | null }

Sets the italic property to the text character.

Parameters:

Name Type Description
isItalic boolean

Specifies if the contents of the current Range are displayed italicized or not.

Returns:

Type
ApiRange | null

Example

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

Resulting document