Apply button on node Edit panel

In theory, yes, we could simply call both mechanisms to get changes made, but there are two consequences to this:

  • After oneditsave, the DOM is destroyed. What happens if an oneditsave function modifies the DOM?
  • oneditprepare also has its own logic; what happens if it isn't called even though the changes have been validated? e.g. some nodes apply different logic based on legacy constraints.

I was just going to edit my comment and point that out too - this.editor.destroy() is a favourite of mine in the oneditsave callback.

Ok, so it has to do a full done-button-pressed cycle ...

Has anyone mentioned the shortcut Ctrl/Cmd-d to deploy? That's what I tend to do to speed up deployment. If this apply button will cause edit panel to close&open, I won't want to use it since that would be too much visual distraction.

As I was saying, the end user won't see edit boxes closing and reopening.

I don't see how you can deploy the changes without closing the edit box; the node is only modified when "Done" is called.

I don't have the use case, editor, save, deploy, reopen, edit, save, deploy, reopen, edit, save, deploy, reopen ... that's not how I work.

I know that's the only way to deploy changes to the server, i.e., by closing the edit panel. I can understand how folks can get into a loop but I think it's better to prevent folks from getting into a loop of constantly editing + deploying - because obviously something is not being understand for it to be continually broken and needing fixing or why would you enter such a loop? So being forced to take a longer path might lead to reflection and finding the true fix to the problem.

How are you going to do that? Do sound non-trivial but then again, I'm not a JS/CSS person.

What will happen if there is a syntax error, which would normally bring up a Deploy warning and ask for confirmation or cancel?

See my GIF :wink: There is an intentional error in one of the nodes.

Yeah sorry for the French editor :sweat_smile:

OK, thanks.