diff --git a/js/docx/smoke/api_range/to_json.js b/js/docx/smoke/api_range/to_json.js index 16e5ee488..418430f15 100644 --- a/js/docx/smoke/api_range/to_json.js +++ b/js/docx/smoke/api_range/to_json.js @@ -1,20 +1,20 @@ builder.CreateFile("docx"); -var oDocument = Api.GetDocument(); -var oParagraph = oDocument.GetElement(0); -oParagraph.AddText("ONLYOFFICE Document Builder"); -var oRange = Api.CreateRange(oParagraph, 0, 9); -var json = oRange.ToJSON(true, true); + var oDocument = Api.GetDocument(); + var oParagraph = oDocument.GetElement(0); + oParagraph.AddText("ONLYOFFICE Document Builder"); + var oRange = Api.CreateRange(oParagraph, 0, 10); + var json = oRange.ToJSON(true, true); GlobalVariable["JSON"] = json; builder.CloseFile(); //////////////////////// builder.CreateFile("docx"); -var oDocument = Api.GetDocument(); -var json = GlobalVariable["JSON"] -var oRangeFromJSON = Api.FromJSON(json); -oDocument.Push(oRangeFromJSON[0]); -var oParagraph = oDocument.GetElement(0); -oParagraph.AddText(json); + var oDocument = Api.GetDocument(); + var json = GlobalVariable["JSON"] + var oRangeFromJSON = Api.FromJSON(json); + oDocument.Push(oRangeFromJSON[0]); + var oParagraph = oDocument.GetElement(0); + oParagraph.AddText(json); builder.SaveFile("docx", "ParagraphToJSON.docx"); builder.CloseFile();