Cleaner implementation of editor modal