You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug? feature What is the current behavior?
As described in the ONLYOFFICE Plugins API Docs
We can pass data one-way through Asc.scope object to the plugin code in window.Asc.plugin.callCommand method.
The object is used to pass any additional data (objects, parameters, variables, etc.) to the window.Asc.plugin.callCommand method, which is executed in its own isolated context.
And we can get the selected text when plugin run through setting variations.initDataType in the plugin configuration file.
Is usually equal to "" - this is the data which is sent from the editor to the plugin at the plugin start (e.g. if initDataType == "text", the plugin will receive the selected text when run). It may also be equal to encryption in the encryption plugins.
But I can't find any other way to get the spreadsheet data in the API Docs,this question seems to be similar to #154 .And I think the ONLYOFFICE/sdkjs#1964 mentioned in it is a good feature. So is there any other way to access the data in the spreadsheet ?
By the way, I used the unofficial way to directly call the API instead of overriding window.Asc.plugin.callCommand method, so that my plugin can get the spreadsheet data.
// in plugin iframeconstApi=window.parent.g_asc_plugins.api;
Thanks !
The text was updated successfully, but these errors were encountered:
I have checked the API you mentioned(executeMethod and callCommand) before creating this issue.They all have their own limitations and cannot do what Builder API can do.
The name of the specific method that must be executed.
The values allowed for its parameter name may different from Builder API, but I haven't tried the method names in the Builder API.
e.g. Spreadsheet Api under the executeMethod Docs.
Name
Description
AddComment
Adds a comment to the workbook.
ChangeComment
Changes the specified comment.
RemoveComments
Removes the specified comments.
For the callCommand API:
Documentation describes that it has its own context, it seems to be via JavaScript eval()
This method is executed in its own context isolated from other JavaScript data. If some parameters or other data need to be passed to this method, use Asc.scope object.
Hi @ChiuJun! There is currently no way to get data from the plugin context for security reasons. We provide an api plugin to manipulate document data at this time. The ONLYOFFICE team is working on a solution to this problem
Do you want to request a feature or report a bug?
feature
What is the current behavior?
As described in the ONLYOFFICE Plugins API Docs
We can pass data one-way through
Asc.scope
object to the plugin code inwindow.Asc.plugin.callCommand
method.And we can get the selected text when plugin run through setting variations.initDataType in the plugin configuration file.
But I can't find any other way to get the spreadsheet data in the API Docs,this question seems to be similar to #154 .And I think the ONLYOFFICE/sdkjs#1964 mentioned in it is a good feature.
So is there any other way to access the data in the spreadsheet ?
By the way, I used the unofficial way to directly call the API instead of overriding
window.Asc.plugin.callCommand
method, so that my plugin can get the spreadsheet data.Thanks !
The text was updated successfully, but these errors were encountered: