remove higlighted text before saving