Save and Load states directly through editor?

The toolbar menu actions can be accessed from scripts with the toolbar function. It’s also possible to store states in the browser’s cache and recall them using storage, getState and setState, for example:

// save state script
var state = getState("root")
storage.setItem("my_state", state)

// recall state script
setState(storage.getItem("my_state"))