Page 1 of 2

Create anchors or bookmarks that a plugin to scroll to?

PostPosted: Thu Oct 05, 2017 2:07 am
by eaglejs
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

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

PostPosted: Thu Oct 05, 2017 7:32 am
by Maxim
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.

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

PostPosted: Thu Oct 05, 2017 2:18 pm
by eaglejs
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. :)

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

PostPosted: Fri Oct 06, 2017 2:04 am
by eaglejs
Is it possible to PM you? We have a list of requirements for you. :)

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

PostPosted: Fri Oct 06, 2017 6:32 am
by Maxim
Hello eaglejs!
Is it possible to PM you?

You are welcome!

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

PostPosted: Tue Oct 10, 2017 5:37 pm
by eaglejs
Hey Maxim,

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

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

PostPosted: Fri Jan 05, 2018 2:05 pm
by nypateffill4817
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.

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

PostPosted: Fri Jan 05, 2018 3:19 pm
by nypateffill4817
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 ?

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

PostPosted: Tue Jan 09, 2018 7:29 am
by Maxim
Hello!
I will inform plugin developers about your feedback but i cannot say if it's gonna be updated soon.

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

PostPosted: Sun Aug 26, 2018 6:13 am
by Leboudin
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)'