hackmd-io-issues icon indicating copy to clipboard operation
hackmd-io-issues copied to clipboard

Formatting is removed, when copying rich text

Open lfuhr opened this issue 1 year ago • 0 comments

Is this a hackmd.io issue?

  • [x] Yes, the bug happens on https://hackmd.io

What's the problem

Current behaviour

  1. View Document in View or Split Mode
  2. Copy text
  3. Paste in other editor like Word

It got plain text.

Expected behaviour

Formatting is copied as everywhere on the web

Environment

I use HackMD on:

Desktop

  • OS: Windows

  • Browser: Chrome

  • Device: [e.g. iPhone XS]

  • OS: [e.g. iOS 12.1]

  • Browser: [e.g. chrome, safari]

  • Version: [e.g. 23]

Additional context

The Copy event is catched. a.clipboardData.setData("text/plain", window.getSelection().toString().replace(/\u200b/g, ""))

lfuhr avatar Oct 08 '24 11:10 lfuhr