Users of Microsoft Word are familiar with the situation when you paste a text fragment into an existing formatted text…