Is it meant to be possible to use saveMacro from code where the macro does not use a custom editor? I’m trying it but it doesn’t really seem to work.
My use case is trying to create a dynamically generated macro parameter (a random string) which can be saved against any macro the first time it is loaded in the editor, and then used as a permanent unique ID for that macro. If possible this could serve as the basis for some workarounds to solve various conf-cloud bugs and annoyances, such as the macro id constantly changing.
As far as I know you can only call saveMacro from within the editor. I’d like to achieve the same as you, so if you find a workaround - I’d appreciate it if you could post it here.
I can see that some addons (e.g. gliffy) manage to trigger the editor opening automatically when a macro is added which would suit my purposes too as I could then set the ID on macro creation. But I haven’t figured out how they do this.
I never found a way to do this without using the custom editor.
To trigger the editor automatically when a macro is added you need at least one required parameter - this works with both default and custom editor. In the case of a custom editor you can then go ahead and create such an ID.
For my case I ended up coming up with another solution which involved using content properties to persist data.
Hope that helps!
Yes! That helped!
Thanks so much, I’ve been fighting this for days