Original code contained weird html parsing, removing `margin-*: *px;' style properties from raw HTML.
However, when inserted, QTextDocument sees no margins and decides to set them to the default 12px,
which breaks even copy-pasting of non-formatted text (see attached).
Instead just use standard QTextDocument manipulation methods to remove margins. It fixes both pasting
formatted and non-formatted text.
BUG: 302107