Hello, I’m getting the following error when trying to call Api.GetTables
sdk-all.js:12625 TypeError: Api.GetTables is not a function
at eval (eval at f (sdk-all.js:12625:270), <anonymous>:8:28)
at eval (eval at f (sdk-all.js:12625:270), <anonymous>:10:11)
at eval (eval at f (sdk-all.js:12625:270), <anonymous>:11:3)
at f (sdk-all.js:12625:270)
Here’s the relevant code: (this is inside a plugin’s init()
function`
document
.getElementById("buttonAddOptionalField")
.addEventListener("click", function () {
window.Asc.plugin.callCommand(
function () {
var oDocument = Api.GetDocument()
var oParagraph = Api.CreateParagraph()
var tables = Api.GetTables()
console.log(tables)
},
false,
true,
(args) => {
console.log(args)
}
)
})