How to get file contents in registerEvent

I’m trying to get the file contents in a registerEvent for the ‘modify’ event but I’m having no success. It’s easy enough with the addCommand editorCallback but I can not figure out how to do this in a registerEvent. Any help pointing me in the right direction would be appreciated.