Hello, I want to append / edit content inside an existing content control.
Currently, I’ve been using the InsertAndReplaceContentControls - ONLYOFFICE Api Documentation method for replacing content inside content controls. However, I’m unable to find a way to add content at the end of content controls.
For example:
Before:
What I want to happen:
InsertAndReplaceContentControls will completely overwrite the “description” content control. This makes it unsuitable for this task.
What I came up with was to use the MoveCursorToContentControl
to position the cursor and the end of the content control and afterwards call AddContentControl
.
This works but it seems incredibly hacky. Any suggestions?
Hello @fr3fou
We are checking described scenario. I will update this thread when we have something to share.
Hello @fr3fou
Sorry for the late reply. We have added a suggestion on this scenario and we have started working on it. I will update this thread when we have something to share.
Hello @fr3fou
Probably there’s another way to achieve this result. Please take a look at these methods:
https://api.onlyoffice.com/docs/office-api/usage-api/text-document-api/apiblocklvlsdt/addelement/
https://api.onlyoffice.com/docs/office-api/usage-api/text-document-api/apiblocklvlsdt/push/
This way you should be able to add a text or new content control at the end of the current one.
If I misunderstood the situation, please clarify it.