WIP rewrite of editor toggling. Remains: JS observer + callbacks