Insert html to document when using document builder

I want to know is there a method to insert html content into a document, when using document builder.

our company have a product which have many tables , and we want to develop a function , which could insert table into the document at specific position , for example , the 6th paragraph, and we want to use document builder , because onlyoffice paste function is fantastic, not only can keep table data right , but also the style of it is correct and awesome.

so could anyone help me to know how to use the api to implement this function , insert html to document when using document builder

we have already implement this function in the page, but encouter some problems.

1.when the table is large, the processing time is big(10k rows table), and the page show the picutre below.

2.when paste large table, the page show the dialog below , whick is not friendly, and user could not understand what happended

so we think there could be a method to solve these problems by using document builder.

Hello @lianyzhou

Firstly, let me address this issue:

This is technically the same issue. Second screenshot explicitly states that the made changes to the document are too large, thus Document Server is not allowed to process those. The client side editor cannot display those huge changes in one go, thus the browser tab with the editor hangs up. Limits are specifically made to avoid such issue, but in certain cases it is still possible to face this issue so moving the goal to DocBuilder is a good solution.

As for the DocBuilder implementation of the scenario: unfortunately, there is no method in Office API to handle HTML contents like in Plugins API, but if you have your tables already available in other documents, you can parse the contents of those documents into JSON with ToJSON method to insert them into another document with FromJSON method. Similar approach has been discussed here:

For you case you do not need to combine, but instead simply restoring JSON contents from another document and pasting it directly to a new document.

I hope it would help you with achieving the goal.