Create anchors or bookmarks that a plugin to scroll to?

Integration questions/issues
eaglejs
Posts: 6
Joined: Thu Oct 05, 2017 2:01 am

Create anchors or bookmarks that a plugin to scroll to?

Post by eaglejs » Thu Oct 05, 2017 2:07 am

Greetings,

I'm trying to create a plugin that will scroll to an anchor or bookmark link inside of my document. So if I have a link in my plugin that when clicked, it should scroll to that anchor or bookmark link inside of the word document. I was mining your minified javascript and found some references to your own scrollTo or scrollBy methods and I am wondering if it is possible to utilize them for onlyoffice.

Thank you very much for your time.

Regards,

eaglejs

Maxim
Posts: 1751
Joined: Tue Oct 11, 2016 2:34 pm

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by Maxim » Thu Oct 05, 2017 7:32 am

Hello eaglejs!
if it is possible to utilize them for onlyoffice
Yes but there are a lot of problems could appear, for example if your anchor or bookmark link is deleted by user in co-editing mode(?), also scrollTo or scrollBy methods you mentioned cannot be used for that plugin for some reasons. But if you provide us a scenario, the way how this plugin should work then we could create an API for you.

eaglejs
Posts: 6
Joined: Thu Oct 05, 2017 2:01 am

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by eaglejs » Thu Oct 05, 2017 2:18 pm

Sure! We want to create a plugin that could add text to the document in a defined location. This plugin will have, for example, (15 places it could input text into). Each place is located (perhaps by a bookmark) or something that we can scroll to when that edit is clicked on from inside the plugin. I also would like to be able to edit that text, accept or reject this edit. When accepted, it should inject that edit or modify the text in the document, and if I reject it, it will simply delete the edit from the plugin, I think we can do that within the plugin, but not 100% sure on this. We have designs about how we want to go about this which I'm not sure if I can post here, i'll have to get permission. This is a very important feature we would like to use with Onlyoffice, and it would be great if Onlyoffice has an API for this. :D Thank you very much for your fast response. :)
Last edited by eaglejs on Tue Oct 10, 2017 5:39 pm, edited 1 time in total.

eaglejs
Posts: 6
Joined: Thu Oct 05, 2017 2:01 am

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by eaglejs » Fri Oct 06, 2017 2:04 am

Is it possible to PM you? We have a list of requirements for you. :)

Maxim
Posts: 1751
Joined: Tue Oct 11, 2016 2:34 pm

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by Maxim » Fri Oct 06, 2017 6:32 am

Hello eaglejs!
Is it possible to PM you?
You are welcome!

eaglejs
Posts: 6
Joined: Thu Oct 05, 2017 2:01 am

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by eaglejs » Tue Oct 10, 2017 5:37 pm

Hey Maxim,

I sent you a PM, though, I am not sure if you actually received it. Let me know! Thank you! :)

nypateffill4817
Posts: 3
Joined: Fri Jan 05, 2018 1:43 pm

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by nypateffill4817 » Fri Jan 05, 2018 2:05 pm

Hello,

I would a similar feature :

Automatically Select and to Scroll to a "ContentControl" by using its InternalId.
"SelectContentControl(InternalId)"

It would be nice if you could have the matching object returned instead of a Id, as we can't do annything with the Internal ID.

Without this feature, I don't know if I can loop on all the elements in order to find where my control is and select it.

nypateffill4817
Posts: 3
Joined: Fri Jan 05, 2018 1:43 pm

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by nypateffill4817 » Fri Jan 05, 2018 3:19 pm

I would have also the same feature to scroll and select a ContentControls by its internalId:
window.Asc.plugin.executeMethod("SelectContentControl", [obj]);

Without this functionnality, is it possible to loop over all items/subitem to find the ContentControl matching the InternalId ?

Maxim
Posts: 1751
Joined: Tue Oct 11, 2016 2:34 pm

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by Maxim » Tue Jan 09, 2018 7:29 am

Hello!
I will inform plugin developers about your feedback but i cannot say if it's gonna be updated soon.

Leboudin
Posts: 9
Joined: Tue Jan 23, 2018 7:13 am

Re: Create anchors or bookmarks that a plugin to scroll to?

Post by Leboudin » Sun Aug 26, 2018 6:13 am

eaglejs wrote:Greetings,

I'm trying to create a plugin that will scroll to an anchor or bookmark link inside of my document. So if I have a link in my plugin that when clicked, it should scroll to that anchor or bookmark link inside of the word document. I was mining your minified javascript and found some references to your own scrollTo or scrollBy methods and I am wondering if it is possible to utilize them for onlyoffice.

Thank you very much for your time.

Regards,

eaglejs

For those who may have the same issue, if you want to scroll to somewhere, you may try 'Api.ViewScrollToY(nNum)'

Post Reply