Select
function Select(): boolean
Description
Selects the current paragraph.
Returns
boolean
Try It
var oDocument = editor.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("ONLYOFFICE Document Builder");
var bResult = oParagraph.Select();
if (bResult === true) {
oParagraph.SetItalic(true);
}