Fix bug in CodeEditor class due to moving the hooks outside of the config object