Pasting "Code Block" content also pastes "Anytype specific" CSS

Describe the bug
Copying a code block in Anytype and pasting the code here on Discourse, pastes more than just the text.

To Reproduce
Steps to reproduce the behavior:

  1. Create code block with content
    grafik

  2. Click on “copy” button in the code block

  3. Paste content in Discourse
    Result:

.row > * { display: flex; } .header1 { padding: 23px 0px 1px 0px; font-size: 28px; line-height: 32px; letter-spacing: -0.36px; font-weight: 600; } .header2 { padding: 15px 0px 1px 0px; font-size: 22px; line-height: 28px; letter-spacing: -0.16px; font-weight: 600; } .header3 { padding: 15px 0px 1px 0px; font-size: 17px; line-height: 24px; font-weight: 600; } .quote { padding: 7px 0px 7px 0px; font-size: 18px; line-height: 26px; font-style: italic; } .paragraph { font-size: 15px; line-height: 24px; letter-spacing: -0.08px; font-weight: 400; word-wrap: break-word; } .callout-image { width: 20px; height: 20px; font-size: 16px; line-height: 20px; margin-right: 6px; display: inline-block; } .callout-image img { width: 100%; object-fit: cover; } a { cursor: pointer; } kbd { display: inline; font-family: 'Mono'; line-height: 1.71; background: rgba(247,245,240,0.5); padding: 0px 4px; border-radius: 2px; } ul { margin: 0px; } `Test`

Expected behavior
Only the plain text/code should be copied.

System Information:

  • OS: Windows / Linux
  • Anytype Version: 0.27.0
1 Like

I was able to reproduce it on Windows, Anytype 0.27.0
I also tried to past the copied text elsewhere:

  • Anytype: works as expected and a new code snippet is created
  • Notepad ++: works as expected* and only the “test” text is pasted
  • Gmail/Protonmail: works as expected* and only the “test” text is pasted

*For me personally, it would be better to have the markdown syntax (```) copied too.

1 Like

It does not reproduce for me on Mac, only Windows problem?