Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run callCommand function in plugin when document is opened in view mode #164

Open
oszymanski opened this issue Sep 22, 2021 · 6 comments
Labels
feature request Issues that request new features to be added to OnlyOffice

Comments

@oszymanski
Copy link

What is the current behavior?

Hello, I cannot get this code to work when document editor mode is set to 'view'.

window.Asc.plugin.callCommand(function () {
var activeSheet = Api.GetActiveSheet()
var currentPage = Api.GetCurrentVisiblePage();
}

What is the expected behavior?

I assume that callCommand is blocked in view mode in order to prevent the file from being edited, but sadly it also prevents me from getting any information about the document (I need current page/sheet the most but getting page size would be very useful).

DocumentServer version:

I've pulled the latest docker image of Developer Edition so I assume it's version 6.4

Operating System:

Windows running Docker Desktop

Browser version:

Chrome, but it doesn't really work on any browser.

PS. Is there any way around this? I'd appreciate any suggestion. Thank you :)

@ShockwaveNN
Copy link
Contributor

Hi, first of all - please fill out issue template correctly - specify version of product and host os

@oszymanski
Copy link
Author

Hi, first of all - please fill out issue template correctly - specify version of product and host os

Done, edited, sorry for the inconvenience

@ShockwaveNN
Copy link
Contributor

@askonev please take a look, I think we already had some discussion about plugins in view mode, but I'm not sure

@askonev
Copy link
Member

askonev commented Jan 31, 2022

@oszymanski Hi! Wrote enhancement in our internal repository #55230

@ShockwaveNN ShockwaveNN transferred this issue from ONLYOFFICE/DocumentServer Jan 31, 2022
@ShockwaveNN ShockwaveNN added the feature request Issues that request new features to be added to OnlyOffice label Jan 31, 2022
@ShockwaveNN
Copy link
Contributor

This issue is closely related to #164

@anti-the-social
Copy link

Any progress/plans with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to OnlyOffice
Projects
None yet
Development

No branches or pull requests

4 participants