Insert HTML with content controls

Integration questions/issues
Post Reply
Posts: 9
Joined: Mon Jul 22, 2019 4:10 pm

Insert HTML with content controls

Post by 4kochi » Fri Feb 28, 2020 3:18 pm


we want to insert some text in a document. Since this text is html, we use the method:

window.Asc.plugin.executeMethod('PasteHtml', ['my html content here']);

Now this text we want to insert could also include some placeholders. Something like this:

window.Asc.plugin.executeMethod('PasteHtml', ['Hello, this is <NAME>']);

where <NAME> is the placeholder which should be later replaced by the actual data. We already have a plugin that can insert these placeholders as Content Controls into the document, which works fine.

Since OnlyOffice does not recognize a placeholder like <NAME>, we have to convert it to a content control. But the content control has to be placed in the html, which is then inserted in to the document. So here is an example:

window.Asc.plugin.executeMethod('PasteHtml', ['Hello, this is <NAME>']); should result in "Hello, this is <NAME>" in the document, and <NAME> is then a content control.

Is there any way we can achieve this?

Thanks for your help


Posts: 147
Joined: Thu Dec 12, 2019 11:08 am

Re: Insert HTML with content controls

Post by Alexandre » Tue Mar 03, 2020 1:28 pm

According to our data, you have commercial license. Therefore we recommend you to contact our support team via helpdesk to get prompt replies to your requests:
Please describe the usage scenario of the requested feature in more details.

Post Reply