Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply changes API #58

Open
mathiassoeholm opened this issue Dec 8, 2022 · 2 comments
Open

Apply changes API #58

mathiassoeholm opened this issue Dec 8, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@mathiassoeholm
Copy link

Hi 👋

Thanks for a lot providing this API, I was able to automate everything I needed to apart from this last thing :-)
I'm missing the ability to apply the changes I made on some instantiated templates. The equivalent of clicking the Apply All button:

Screenshot 2022-12-08 at 09 45 08

Is there an API for that, which I have simply missed? Or is it not possible via the editor API yet?

@yaustar yaustar added the enhancement New feature or request label Dec 8, 2022
@yaustar
Copy link
Collaborator

yaustar commented Dec 8, 2022

I don't believe Revert All, Revert and Apply All are part of the public API. There would be private API in the Editor UI code that you could call in the meantime if it's needed for you

If you open source maps for the Editor page, look for the file templates-entity-inspector.js and you can see what functions are bound to those buttons.

@mathiassoeholm
Copy link
Author

mathiassoeholm commented Dec 8, 2022

Thanks! I figured out that I can just call:

window.editor.call('templates:apply', entity);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants