fix editorhooks typo

and add simple exercise test
Merge pull request #6942 from minrk/editorhooks-typo

fix editorhooks typo