Remove line breaks inside text segments when editing