Replace Bookmarks with API Data Every on loading Document

Integration questions/issues
Post Reply
himanshu.v
Posts: 3
Joined: Thu Apr 01, 2021 5:02 pm

Replace Bookmarks with API Data Every on loading Document

Post by himanshu.v » Fri Apr 02, 2021 4:17 pm

I want to create a template in only office with some bookmarks(variable type). then replace these bookmarks, every time we open the document in the editor. Bookmark values will be replaced by Calling Our server API that fetches the data from the database.
Is there any way we can implement this type of functionality using only office.

Carl
Posts: 620
Joined: Thu Apr 12, 2018 10:00 am

Re: Replace Bookmarks with API Data Every on loading Document

Post by Carl » Tue Apr 06, 2021 7:43 am

Hello,

You can use Content Controls to load some external data to your document:
https://api.onlyoffice.com/plugin/execu ... ntcontrols

Plugin examples:
https://github.com/ONLYOFFICE/sdkjs-plu ... t-controls

himanshu.v
Posts: 3
Joined: Thu Apr 01, 2021 5:02 pm

Re: Replace Bookmarks with API Data Every on loading Document

Post by himanshu.v » Wed Apr 07, 2021 8:46 am

Thanks for the help.

I tried content control. But it is not updating existing content control, every time it is creating new CC. I want to update the existing ones by using the tag.

Can you please help me?

Thanks

himanshu.v
Posts: 3
Joined: Thu Apr 01, 2021 5:02 pm

Re: Replace Bookmarks with API Data Every on loading Document

Post by himanshu.v » Wed Apr 14, 2021 11:23 am

I Found a way to update Content Controls.
here is the link
https://github.com/ONLYOFFICE/sdkjs-plu ... trols_tags

Post Reply