Skip to content

Formatting is removed, when copying rich text #387

Open
@lfuhr

Description

@lfuhr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions