Try the fastest and simplest way to install ONLYOFFICE

Insert a custom string to the doc (where the cursor is)

Any issues about docs (uploading, editing and etc.)

Insert a custom string to the doc (where the cursor is)

Postby michaeldavidson » Thu Sep 28, 2017 6:15 pm

Hi,
I'm trying to programatically add a string from a long list of a strings to the open document. The user would click a button next to that string and the string would be inserted into the doc at the place where the cursor is active.

I would really prefer not to create a plugin for each string because there are ~200 different ones, and I want the user to be able to press a button outside the doc editor.

Do I have to make a call to the API? I'm not seeing any callbacks I can hook a function into that I can call from the Window or anything.

I'm trying to do this in JS. Our page calls a PHP page thru JS, we COULD do this in PHP but I'd prefer a JS solution.

Our server is set up in PHP and I think we have the integration edition (I personally didn't do the integration).
Thanks.
michaeldavidson
 
Posts: 5
Joined: Tue Mar 07, 2017 6:53 pm

Re: Insert a custom string to the doc (where the cursor is)

Postby Maxim » Fri Sep 29, 2017 10:57 am

Hello michaeldavidson!
Here is onlyoffice api, i hope it will help you.
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm

Re: Insert a custom string to the doc (where the cursor is)

Postby michaeldavidson » Mon Oct 02, 2017 3:16 pm

We have the integration edition and we've been using the API. Is there anyone who could help us with this?
michaeldavidson
 
Posts: 5
Joined: Tue Mar 07, 2017 6:53 pm


Return to Documents

Who is online

Users browsing this forum: No registered users and 2 guests