Problems with copying html from the preview

I have two issues with copying formatted text from the preview:

  1. Plain *italics* plain
    is rendered as
    <p>Plain&nbsp;<em>italics</em>&nbsp;plain</p>
    There should be no nbsp’s there – they are not there in the source, and it messes up the formatting.

  2. This one may be a problem with Libreoffice and not of obsidian, but just in case it has to do with the way the output from obsidian looks:

If I copy from the preview some formatted text that spans a paragraph border, the formatting is not preserved when I paste it in a libreoffice document. Pasting just part of the text, without any <p> tags, works as expected, but once a paragraph is crossed, only the nbsp’s are preserved.
If I paste in e.g. a html editing window in a web page, the formatting is preserved, which probably means that it is a problem with libreoffice, but it makes me wonder if there is anything in the output from obsidian that messes with poor ol’ libreoffice.

Environment

  • Operating system: linux
  • Obsidian version: 0.12.15

I can’t reproduce the second problem.

I understand the first. I am not sure how much control we have over how chrome handles the copy/paste. Please, open a feature request for work on this.

Thanks. I will open a request for the first issue.

Regarding the second, I have experimented some more, and the problem is definitely with libreoffice. I see the same behaviour also when copying from an ordinary browser.
I also tried some other word processors. Calligra loses the formatting as well, whereas Abiword and TextMaker (SoftMaker) as well as Google Docs preserve the formatting.