Added a way to pass editor instance to extensions