Yoopta-Editor icon indicating copy to clipboard operation
Yoopta-Editor copied to clipboard

[BUG] Markdown Serializer Strips out asterisks

Open sandrews-inc opened this issue 1 year ago • 1 comments

Has this bug been raised before?

  • [X] I have checked "open" AND "closed" issues and this is not a duplicate

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
  1. Get the editor value and serialize it to markdown:
const editorValue = editor?.getEditorValue();
if (editor && editorValue) {
    newContent = markdown.serialize(editor!, editorValue);
    setMarkdownBody(newContent);
}
  1. Display or log the output markdown and see that the asterisk have all been stripped

Environment

  • OS: MAC OS Sonoma (14.5)
  • Browser: Chrome (126.0.6478.127), Safari (17.5)

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

sandrews-inc avatar Jul 02 '24 17:07 sandrews-inc

hmmm

Darginec05 avatar Jul 02 '24 20:07 Darginec05

@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!

sandrews-inc avatar Aug 19 '24 16:08 sandrews-inc

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 avatar Aug 19 '24 18:08 Darginec05

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 avatar Sep 17 '24 14:09 Darginec05

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

Darginec05 avatar Sep 24 '24 17:09 Darginec05