Admin privileges for edit context

Support elavated privileges to allow modifying artboards and elements in non focused artboards.

Use Case
Saotome is an underling at a national ad agency. He is in charge of taking prototypes from the graphics department and presenting them to the review committee.

But he has to use the office computer for his presentations and often the fonts in the prototypes are missing from the computer he uses for presentation which has resulted in a lower quality or displaced text content.

After the third occurrence Saotome decided to write a plugin to find all occurrences where a text field is using a missing font and replace it with a font he has installed on the presentation computer.

After getting it to work on the selected artboard he attempted to do a search and replace in all artboards but unfortunately he encountered a edit context privileges error.

He went back to the manifest for his plugin and set edit context permissions property from “local” to “global”. He ran his plugin again and was able to replace fonts in all artboards all at once instead of one at a time.

Use Case:
Saotome requires setting data to the new pluginData property. He encounters this error with all the artboards but the selected artboard.

@Velara Because of the way XD is built, this limitation is unlikely going to go away anytime soon.

But I do hear this request a lot from the partners I work with. @peterflynn do we have any rough estimate on when this limitation might go away?


I can understand issues are prioritized so I’d like to suggest another option and that is to let the user accept the changes and maybe show a warning.

Or allow the edit as long as you catch the error and notify the user.

For example, I have a Font Replacement plugin that works even with the error but as soon as the plugin is closed the changes are reverted:

So the way I am understanding it more is that it’s not so much an admin privilege but a way to keep things organized in editable and uneditable sections.

In that case a sort of enterEditContext() method might allow the app to commit any changes and enter a new context for new changes.


// looping through artboard items
if (currentNode.isInEditContext()==false) {
     currentNode.fontSize += value;

So two nodes are in the edit context if they are 1, siblings and 2, their parent is selection.editContext?

Another API request: SceneNode.isSiblingNode(nodeB). :slight_smile: