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

Copying order/unordered list in view mode don't preserve the format

Open purple6201 opened this issue 2 years ago • 0 comments

Is this a hackmd.io issue?

  • [x] Yes, the bug happens on https://hackmd.io
  • [ ] No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd

What's the problem

Can not copy full order/unordered list in view mode after selection of text. Ordered List item numbers and Unordered list item dashes are dropped, list formats are not preserved when pasting.

Current behaviour

Provide steps to reproduce:

  1. Select a list in view mode
  2. Ctrl - C
  3. Ctrl - P
  4. Format of the list is lost.

Expected behaviour

Copying list in view mode should act like copying from edit mode.

  • Unordered list should use dashes as prefix, and preserve the hierarchical structure.
  • Ordered list should be able to copy along with the rendered item number.

Environment

I use HackMD on:

Desktop

  • OS: Manjaro Linux
  • Browser: Brave
  • Browser Version: 1.57.57

purple6201 avatar Sep 19 '23 17:09 purple6201