Edit context error when trying to edit text in a component

Hi there,

I created a small plugin to change the text of a selection of text nodes (handy for tables) at once.
This does not work when the text is in a component AND the component is used somewhere. ‘Plugin made a change outside the current edit context’ is the error. It is fine as long as the component does not have an ‘instance’/‘copy’ (?) of it on the artboard.

So how do I circumvent that?

I could break up the component and recreate it, but then I need to find all occurences of this component in the document and replace them.

The XD API authors (hi @peterflynn) appear to always err on the side of caution when it comes to letting plugins modify non-standard things like components or repeat group contents. Frustrating at times like this.

If you want to propagate your changes to other instances in the document, then you should edit the master component. The edit context rule should be the same regardless of whether you are editing the master or an instance. Make sure the text you are trying to edit within the edit context. See this API reference for more detail, https://adobexdplatform.com/plugin-docs/reference/scenegraph.html#symbolinstance

Hello in our case (Avocode Write plugin), we have a XD plugin that pulls text changes from Avocode Write app. In the app, copywriters can edit text layers in designs and they often need to set a different text for every component instance.
Our Avocode Write plugin has a feature that can pull all text changes from our app back to the XD design. This means the plugin need to edit text layers inside the design. This doesn’t work for editing text layers inside components as per original report.
Editing the master/main component is not a solution as that would edit all the instances, we really need to edit the text inside each component instance separately.
This is not possible and leads to the edit context error. and is unfortunately a dealbreaker for most of the users that would use Avocode Write with XD.