In a component of my Vue 2.x project, I followed the example in the official documentation to create a listener using the automation API, but it didn’t work.
const docEditor = new DocsAPI.DocEditor(“placeholder”, initConfig);
const connector = docEditor.createConnector();
connector.attachEvent(“onChangeContentControl”, (obj) => {
console.log(
[EVENT] onChangeContentControl: ${JSON.stringify(obj)}
);});
connector.executeMethod(“GetSelectedText”, , (selectedText) => {
console.log(“Selected text:”, selectedText);
});
Is it because there is something wrong with my usage method?