ONLYOFFICE Docs v7.3 released: enhanced forms, SmartArt, new security settings, Watch Window, and more
ONLYOFFICE Docs v7.3 released

Help: How to use this function (onChangeContentControl)

The onChangeContentControl function is currently found in the plugin development documentation. However, there is no detailed instruction document in the documentation.
I tried to use this function directly, just like the functions labeled in events, without any reaction. If you have used it successfully, I hope you can help me.

Hello @bashfuldeng

Sorry for the late reply.
We are checking the situation with this event. I will update this thread once any news come up.

We have found out that current behavior of this event is bugged resulting in inability to initialize it. The bug report was registered in our internal bug tracker under the number 61194.

Please accept our apologies for the inconvenience caused and thank you for pointing to this issue.

May I ask whether you will solve this problem in the new version or at the same time in the old version?

The issue will be solved in one of future releases.

Hello again @bashfuldeng

We have just released version 7.3.3 of Document Server. This version contains fix of the bug 61194.
Please update your instance and check the situation again.

I use the community image according to the example, but it still cannot be triggered, can you simply write the use method? Thank you very much(7.3.3.49)

Hello @GGbeng @bashfuldeng

Please note that before using this method you have to declare initialization of the event in config.json of your plugin:
https://api.onlyoffice.com/plugin/config#events
Here’s the example of onChangeContentControl event initialization:

    "variations" : [ 
            {
            ...
            "events" : ["onChangeContentControl"],
            ...
           }

@GGbeng also started an issue on GitHub. As my colleague stated there, currently there is an inaccuracy in the documentation, so the example of the event usage looks like this:

        var _plugin = window.Asc.plugin

        _plugin.event_onChangeContentControl = function(control){
            console.log(control);
        };

We will fix the example of usage of this event in documentation soon.

Thank you very much, my friend. Thank you again for your help

1 Like

We are glad to help.
Please do not hesitate asking questions if you have any.

hello, If the event_onChangeContentControl event is triggered by a form change, the contents of the callCommand are not executed
onBlurContentControl is ok

Hello again @GGbeng

We will take a closer look at the situation and I will inform you about the results.