Darginec05 / Yoopta-Editor

Build Notion-like, Craft-like, Coda-like, Medium-like editors with Yoopta
https://yoopta.dev/
MIT License
1.18k stars 91 forks source link

[BUG] Markdown Serializer Strips out asterisks #201

Closed sandrews-inc closed 1 week ago

sandrews-inc commented 3 months ago

Has this bug been raised before?

Description

In the new Yoopta/Exports (current version 4.6.1) the markdown serializer is removing bolded text, and horizontal rules in the markdown it's outputting.

It seems to also miss the bolded text nested within other components like bullet lists when deserializing.

Steps to Reproduce

  1. Add the editor to a page
  2. Add some text to the editor with bold words, and horizontal rules Ex:
    **Bold Header**
    Fun message
    ***
    **Another Bold Header**
    Even funner message
  3. Get the editor value and serialize it to markdown:
    const editorValue = editor?.getEditorValue();
    if (editor && editorValue) {
    newContent = markdown.serialize(editor!, editorValue);
    setMarkdownBody(newContent);
    }
  4. Display or log the output markdown and see that the asterisk have all been stripped

Environment

Screenshots

Orignal markdown: Screenshot 2024-07-02 at 1 09 32 PM

Deserialized and in the Yoopta Editor: Screenshot 2024-07-02 at 1 11 31 PM

Serialized back to markdown: Screenshot 2024-07-02 at 1 10 25 PM

Do you want to work on this issue?

No

If "yes" to above, please explain how you would technically implement this

No response

Darginec05 commented 3 months ago

hmmm

sandrews-inc commented 1 month ago

@Darginec05 Is this on the roadmap to fix? This is currently the only issue blocking my company from implementing this editor.

We're happy to donate to the cause as well!

Darginec05 commented 1 month ago

Hi @sandrews-inc 👋 Unfortunately my time is limited, because I have another full-time work. So your donation will certainly motivate me.

And if this task is urgent for you, I will try to publish version of the fix tomorrow or the day after tomorrow evening. Thanks in advance! ❤️

Darginec05 commented 2 weeks ago

Hi @sandrews-inc 👋 Good news! I published -rc version with this fixes. Check it in demo - https://yoopta-editor-ffxdyxq73-dargos-projects.vercel.app/examples/withBaseFullSetup

Darginec05 commented 1 week ago

Added in v4.8.0 Check it in examples https://yoopta.dev/examples/withBaseFullSetup