Is it feasible to execute script in string form?

I want to execute string form code in plugin. eg:
const oDocument = Api.GetDocument()
var oParagraph = Api.CreateParagraph();
oParagraph.AddText(“Hello world from macros!”);

Hi @tankxxl,
If you want to execute a document builder script in the plugin, you need to use the callCommand method: