Search code examples
adobe-xd

I'm making changes to the open XD document globally, but receive the following error


I'm trying to build a plugin that makes changes to nodes across the entire XD document. When I do so, though, I get the following error:

Plugin made a change outside the current edit context

Is making changes globally to the entire document something that's not currently supported? Is there any way to determine what is currently in this "edit context"?


Solution

  • XD extensibility currently has the edit context rules, which prohibit the plugin from making changes outside the user selected object's scope for editing. This scope includes the selected object and its immediate children.

    Since changes to the entire XD document like a global search and replace would require editing objects outside this scope, this use case is not currently possible.

    You can check the selection's edit context by checking the editContext property of the selection object (reference: https://adobexdplatform.com/plugin-docs/reference/selection.html#selection-editContext).