DocumentServer icon indicating copy to clipboard operation
DocumentServer copied to clipboard

AddContentControlCheckBox Report an error

Open RickerAndersons opened this issue 1 year ago • 2 comments

This issue is unique.

  • [x] I have used the search tool and did not find an issue describing my bug.

Operating System of DocumentServer

Linux (RPM package)

Version information

7.5.1

Expected Behavior

Use the Api.PluginMethod_AddContentControlCheckBox to add a check box

Actual Behavior

I use callCommand to call this method

Api.pluginMethod_AddContentControlCheckBox({"Checked": false, "CheckedSymbol": 9756, "UncheckedSymbol": 9744}, {"Id" : 100, "Tag" : "tag", "Lock" : 0});

But the editor report an errot, like this: Uncaught TypeError: this.una is not a function image

Reproduction Steps

No response

Additional information

Api.pluginMethod_AddContentControlList method is right

RickerAndersons avatar Jan 23 '24 09:01 RickerAndersons

api plugin and api buidler are different layers isolated from each other. CallCommand executes api buidler methods. The pluginMethod_AddContentControlList method is an api plugin method not available for execution from the api buidler context by design.

The way to use this method is as follows

https://api.onlyoffice.com/plugin/executemethod/text/addcontentcontrolcheckbox

window.Asc.plugin.executeMethod ("AddContentControlCheckBox", [
    {
        "Checked" : false,
        "CheckedSymbol" : 9756,
        "UncheckedSymbol" : 9744
    },
    {
        "Id" : 7,
        "Tag" : "{tag}",
        "Lock" : 0
    }
]);

askonev avatar Jan 25 '24 13:01 askonev

Thanks for answering

RickerAndersons avatar Jan 26 '24 01:01 RickerAndersons