editor: deactivate old text model before activating the new one