Persist updates to current doc when the editor changes.