add preview when editing