# API to enter edit context or apply edits support

**URL:** <https://forums.creativeclouddeveloper.com/t/api-to-enter-edit-context-or-apply-edits-support/1101>\
**Category:** UXP Plugin API\
**Tags:** api-feedback\
**Created:** [July 29, 2019, 3:16pm UTC](https://forums.creativeclouddeveloper.com/t/api-to-enter-edit-context-or-apply-edits-support/1101 "2019-07-29T15:16:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Velara](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/velara/32/1278_2.png) [@Velara](https://forums.creativeclouddeveloper.com/u/Velara)\
**Post date:** [July 29, 2019, 3:16pm UTC](https://forums.creativeclouddeveloper.com/t/api-to-enter-edit-context-or-apply-edits-support/1101/1 "2019-07-29T15:16:38Z")

</div>

With dialogs you had a window open and you had to apply changes without making any errors and if you did make errors all the changes would be rolled back.

With plugin panels a user is always on the document level and the panel is always visible and changes can be made atomically (change by change sort of). So maybe there is the possibility of support for something like this?

I’m also posting this for discussion purposes to figure how to get this to work.

**Use Case**  
My specific use case is I’m trying to make a plugin feature that will rename all scene nodes to unique names but if I run into an edit context error I want to store the node or enter the node context, rename the node and then exit that context.

This is somewhat related:

> [@Admin privileges for edit context](http://forums.creativeclouddeveloper.com/t/admin-privileges-for-edit-context/564):
>
> 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 thi…

---

<div class="post-metadata">

**Author:** ![stevekwak](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/stevekwak/32/48_2.png) [@stevekwak](https://forums.creativeclouddeveloper.com/u/stevekwak)\
**Post date:** [July 31, 2019, 1:53pm UTC](https://forums.creativeclouddeveloper.com/t/api-to-enter-edit-context-or-apply-edits-support/1101/2 "2019-07-31T13:53:27Z")

</div>

Isn’t this what Rename It plugin does?

---

<div class="post-metadata">

**Author:** ![Velara](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/velara/32/1278_2.png) [@Velara](https://forums.creativeclouddeveloper.com/u/Velara)\
**Post date:** [August 1, 2019, 7:03pm UTC](https://forums.creativeclouddeveloper.com/t/api-to-enter-edit-context-or-apply-edits-support/1101/3 "2019-08-01T19:03:02Z")

</div>

It might and I can recommend it. Rename It currently supports renaming selected layers.

In my case this is a feature that I would use in an existing plugin to ensure all of the names of all layers are not the same. There are other use cases though. Naming a layer would, in my opinion, be a risk free change. You could rename all the layers in a document and not cause anything to break (unless there are other reasons).

In my plugin, a second use case is, I’d like to create a breadcrumb trail. If you have an element in a group selected you could select the parent container and exit out of the current edit context. I don’t think that’s possible right now. So if you could do something like document.applyEdits() then it might make it possible to exit from the existing context or the inverse.
