Pass editor instance to extensions

Hi, I have made some changes to cover a use case raised in this issue: https://github.com/daviferreira/medium-editor/issues/246