About insertText on excel

hi,i use php and javascript.
i already add custom button on my project.
image
so,next i want insert some text when i click this button.so i try this code:

postMessage({
                            MessageId: 'Send_UNO_Command',
                            Values: {
                                Command: '.InsertText',
                                Args: {
                                    Text: {
                                        type: 'string',
                                        value: 'this is text',
                                    },
                                    ParaStyleName: {
                                        type: 'string',
                                        value: 'Heading 1'
                                    }
                                }
                            }
                        })

not working, the code is from forum search;

then i use google find this code:

postMessage({'MessageId': 'CallPythonScript',
                            'SendTime': Date.now(),
                            'ScriptFile': 'InsertText.py',
                            'Function': 'InsertText',
                            'Values': { 'text': {'type': 'string', 'value': 'test'}}
                        });

still not working.

then i find online/browser/html/framed.doc.html at master ยท CollaboraOnline/online (github.com)
i run the code on my server, the Run python InsertText.py script and Run Capitalize.py script not working,but the other function (Hide/Show Menubar and others) is working fine. please tell me where is my mistake. thanks

Hello @langziyang I see you had some discussion in Matrix about this topic. Is this issue solved ? Did you get any conclusion ?

Thanks,
Darshan

still not solved.the api document is very simple