tiptap-markdown icon indicating copy to clipboard operation
tiptap-markdown copied to clipboard

Whitespace and empty list items removed when calling setContent

Open idevelop opened this issue 1 year ago • 2 comments

  1. Have a tiptap document with some whitespace at the end of lines, and also some bullet points that are empty, for example:
    Screenshot 2024-02-11 at 16 14 28

  2. Call getMarkdown(), notice it's correctly reflected in the output:
    Screenshot 2024-02-11 at 16 14 50

  3. Call setContent() with the markdown output from step (2), notice that some list items and the trailing whitespace are stripped out when converting back to HTML:
    Screenshot 2024-02-11 at 16 16 12

Is this something that's at all configurable through the plugin's options?

idevelop avatar Feb 11 '24 16:02 idevelop

Hey @idevelop did you find a solution to this issue?

ishan28mkip avatar May 21 '24 10:05 ishan28mkip

Any luck here? Seems to be a non-configurable part of the markdown parsing.

ianwoodfill avatar Sep 18 '24 14:09 ianwoodfill

+1

Same issue but for spaces at the end of the document. I'm using the onUpdate() callback and each time a user adds a space at the end of the document, it is removed when I run editor.storage.markdown.getMarkdown().

blackge avatar Oct 07 '24 15:10 blackge

Yeah, I'm noticing this issue as well.

Erutan409 avatar Oct 09 '24 12:10 Erutan409