Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting is removed, when copying rich text #387

Open
1 task done
lfuhr opened this issue Oct 8, 2024 · 0 comments
Open
1 task done

Formatting is removed, when copying rich text #387

lfuhr opened this issue Oct 8, 2024 · 0 comments

Comments

@lfuhr
Copy link

lfuhr commented Oct 8, 2024

Is this a hackmd.io issue?

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, ""))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant