Skip to content

Copying text from collective page copies it as markdown when text is expected #1300

Description

@pascalBokBok

Describe the bug
When you copy text from e.g. an instruction page with bullets you will get the formatting as part of it 1. 1. * * cp file.txt folder-name which makes unconvenient for storing text that can be copied.
This is a new behaviour. It used to copy fine on an earlier release.
I assume it was added to easily keep formatting when copying around in collectives. I suspect that the mimetype text/markdown should also be used when copy pasting within collectives.
something akin to:
event.clipboardData.setData('text/plain', selectedText); event.clipboardData.setData('text/html', htmlContent); event.clipboardData.setData('text/markdown', markdownContent);

To Reproduce
Steps to reproduce the behavior:

  1. In a page with bullets.
  2. mark the text of one of the bullets and copy it.
  3. paste into text editor
  4. See markdown formatting.

Expected behavior
text without markdown formatting.

Screenshots
If applicable, add screenshots to help explain your problem.

Server details:

  • Collectives app version: 2.11.0
  • Nextcloud version: 28
  • PHP Version: 8.1
  • Database: Postgresql

Client details:

  • OS: Linux
  • Browser: Chrome
  • Browser version: 124
  • Device: desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions