Try the fastest and simplest way to install ONLYOFFICE

Document server plugin- Modal dialog during autostart

Integration questions/issues

Document server plugin- Modal dialog during autostart

Postby Madan » Mon Oct 15, 2018 9:13 am

Hi, I am trying out the document server plugins and have few doubts.

1) Can we call the modal dialog during plugin autostart? We do not want user to click on the plugin to call the modal dialog. The values chosen in the modal dialog from user needs to be updated to the word document as well.

2) Is dynamic table insertion possible at during plugin autostart at required position. for example can we create a token in word document {DynamicTable} and insert a table there? Currently it inserts at a random cursor current position, but we need to insert at a specified location.
Attachments
attachment2.PNG
attachment2.PNG (12.15 KiB) Viewed 428 times
attachement1.png
attachement1.png (30.7 KiB) Viewed 428 times
Madan
 
Posts: 2
Joined: Mon Oct 08, 2018 9:04 am

Re: Document server plugin- Modal dialog during autostart

Postby Maxim » Wed Oct 17, 2018 6:21 am

Hello Madan!
1) Can we call the modal dialog during plugin autostart? We do not want user to click on the plugin to call the modal dialog. The values chosen in the modal dialog from user needs to be updated to the word document as well.

You can add a plugin to autostart and the modal dialog will appear when you open a document.
Here you can find an example of the config file
Your editorConfig section should contain the following info:
Code: Select all
"plugins": {
    "autostart": ["asc.{5FF5F75F-2977-4B98-8D36-7C406D610B90}"],
    "pluginsData": ["../../../../sdkjs-plugins/example_search_replace/config.json"]
  }

asc.{5FF5F75F-2977-4B98-8D36-7C406D610B90} - just an example of the guid used for "example_search_replace" plugin.

2) Is dynamic table insertion possible at during plugin autostart at required position. for example can we create a token in word document {DynamicTable} and insert a table there? Currently it inserts at a random cursor current position, but we need to insert at a specified location.

We would recommend to try using "example_work_with_content_controls" plugin.
It allows to insert the content at a specified location.
We just announced this feature
Maxim
 
Posts: 1747
Joined: Tue Oct 11, 2016 2:34 pm

Re: Document server plugin- Modal dialog during autostart

Postby Madan » Wed Oct 17, 2018 8:20 am

Hi Maxim,

Thanks for the reply. The modal dialog during plugin auto start worked fine.

One more question on this. Can we give multiple auto start plugin? I tried giving multiple auto start plugin and only the first auto start plugin worked. The others did not trigger. Is is restricted to only one auto start plugin? for example if I toggle the plugins below only one of them works.

"editorConfig": {
"plugins": {
"autostart": [
"asc.{7baa678a-750f-4ed0-87a7-b25ee757b4b5}",
"asc.{3886f9bb-f178-488b-b380-def858e8e46a}"
],
"pluginsData": [
"..../sdkjs-plugins/example_search_replace_auto/config.json",
"..../sdkjs-plugins/ApplyTemplates/config.json"
]
},

Regards,
Madan
Madan
 
Posts: 2
Joined: Mon Oct 08, 2018 9:04 am


Return to Plugins

Who is online

Users browsing this forum: No registered users and 0 guests