Document View

Shall we set the view mode in the config? And how can we do it programmatically? I need to show all menus but have them disabled.

Hello @subbu,

Please take a look here:

At this page you can find example editor configs for view mode which you can use in your integration process.

Hello @Carl ,
Thanks for the reply, “In view mode, the menus disappear. Our expectation is for view mode to have the same UI as the edit mode, but with all menus and buttons disabled. We should not change the view”

In this case you can execute this plugin method with ‘readonly’ value:

Will check this @Carl. Should we use this as a plugin only? I have another question: Will the callback URL return additional information, such as document.referenceData.filekey?"

Plugin methods can be executed outside of plugin context via Automation API Automation API - ONLYOFFICE Api Documentation, but it requires a developer edition license.

You can find all the example messages that are sent from the Document Server to the Callback Handler here:

If you need some extra parameters to be passed, you can add them to the callbarkUrl itself as a query string.

Hi @Carl, I am currently unable to perform this task—‘Plugin methods can be executed outside of plugin context via Automation API’—due to license restrictions. Is there an alternative solution? Additionally, is it possible to add a plugin and set it to auto-start without it appearing in the plugin list?

Hi @Carl, I would appreciate any updates or solutions regarding the above thread. Thank you!

In this case you need to use this method in a plugin.

Please take a look:

Thanks @Carl , the restrict editing feature is working fine. Is there any way to restrict menu selection as well?

Which menu do you mean?

@Carl We expected the layout menu and editing interface to function as shown in the attached screenshot, utilizing setEditingRestrictions to allow editing only in specific areas

setEditingRestrictions disables editing completely. If you need to allow certain users to edit only specific parts of the document, we don’t have such functionality. As a workaround, you can wrap a specific part of the document into a content control and then allow a user to only edit content controls without a possibility to edit other parts of the document. Use this permission for that:

Please don’t post different issues in one thread. If you have a commercial license, please submit a request at helpdesk.onlyoffice.com.