But How to obtain the value of a contentControl,Version 7.4

Document Server version:7.4
Type of installation of the Document Server (docker, deb/rpm, exe)
for example,I want get “hello world” ,use “connector ”,
so please tell me what should i do ,thanks2023-07-03 19-14-35 00_00_00-00_00_30

hey @letgooo

Do you mean these examples?:


like this examples ,ONLYOFFICE Api Documentation - GetAllContentControls ,I can use plugin get contentControl of value,but I can not get contentControl of value by connector。In this example, “text” is the value of the contentControl, but it cannot be obtained through the connector

Hello, thank you for your question. To use the connector to get “hello world” in a document, you need to follow these steps:

  • Install the connector for your service (e.g. Nextcloud, Confluence, HumHub, etc.) from the official sources¹³⁴⁵.
  • Connect ONLYOFFICE Docs to your service using the connector settings¹.
  • Open a document in ONLYOFFICE Docs from your service and create a connector object using the docEditor.createConnector() method².
  • Use the connector.callCommand() method to send a command that will insert “hello world” into the document using ONLYOFFICE Document Builder syntax². For example:
connector.callCommand(function() {
  var oDocument = Api.GetDocument();
  var oParagraph = Api.CreateParagraph();
  oParagraph.AddText("Hello world");
  • Save and close the document.

I hope this helps. If you have any further questions, please feel free to contact us at support@onlyoffice.com. Have a nice day! :blush:

ok,thank you