attempt to replace selected text while embedding