Add hooks when the muse editor is opened and closed