So, just so I got it right. I want to do this:
let repeatGrid = selection.items[0].parent.parent;
let selectedTextNode = selection.items[0]
repeatGrid.attachTextDataSeries(selectedTextNode, searchReults)
Then I need to have this in my webpack’able file:
let {selection} = require('scenegraph')
And this in my webpack.config.js
externals: {
scenegraph: 'scenegraph'
}
I guess that understanding what externals I’m using from XD is the part I’m most unsure aboiut.
But, just setting up the plugin to run when it’s loaded/reloaded seems promising, since I get this error message:
Plugin Error: Plugin cdxxxxxxxx is not permitted to make changes from the background. Use editDocument() for panel UI handlers, or return a Promise to extend an edit operation asynchronously.