SetBold
Sets the bold property to the text character.
Syntax
expression.SetBold(isBold);
expression - A variable that represents a ApiRange class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| isBold | Required | boolean | Specifies if the Range contents are displayed bold or not. |
Returns
ApiRange | null
Example
Set the bold property to the text character in a document.
// How to make a range text bold in a document.
// Update text properties of the range in a document.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("ONLYOFFICE Document Builder");
let range = doc.GetRange(0, 24);
range.SetBold(true);