I want to insert text into word, but I can not find the api;
let docEditor = new DocsAPI.DocEditor("placeholder", config);
docEditor.insertText('simple text') // this is I want to do, but insertText is undefine
I want to insert text into word, but I can not find the api;
let docEditor = new DocsAPI.DocEditor("placeholder", config);
docEditor.insertText('simple text') // this is I want to do, but insertText is undefine
You can read this url
https://api.onlyoffice.com/docbuilder/textdocumentapi
sample code:
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is just a sample text. Nothing special.");
builder.SaveFile("docx", "AddText.docx");
builder.CloseFile();