Allow trusted content-editor panels to read and patch the live draft #3005
diogoascarneiro
started this conversation in
Ideas
Replies: 1 comment
|
Converted this to a discussion as it is a feature request. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
In EmDash 0.35, a trusted plugin can add a React panel to the content editor, but the panel receives only the last saved entry, collection, and locale:
It cannot read the editor's current form values or return changes to them. A field widget is not a substitute because it can access only its own field.
This blocks editor tools that need several current fields. For example, a translation plugin should be able to read eligible text fields from an existing target-locale draft, send them to its provider, and place the result back into the form for review.
Expected behavior:
An on-demand shape such as
getDraft()pluspatchDraft(patch, { expectedRevision })would be sufficient. The exact API canfollow the existing panel conventions.
This is a narrower follow-up to #2227, which motivated full-document editor context. The panel shipped in 0.34 provides saved-entry context but not live draft access or write-back.
Documentation:
Steps to reproduce
contentEditorPanelsexport.entryand has no supported API for reading or patching the live form.Environment
0.35.0(3c99225d80a38a9751ed0e4b56e3924e40308e70)22.22.3Screenshots
Not applicable
Logs / error output
All reactions