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

[BUG] Markdown Symbols Remove Existing Block

Open mdsaban opened this issue 1 year ago • 4 comments

Has this bug been raised before?

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

Description

When using markdown symbols (e.g., #, - ) to convert an existing text block into a heading or bullet list, the entire text block gets removed, leaving a blank block with the new markdown format. The existing text block should be retained and converted to the specified markdown symbol format (e.g., heading or bullet list) without losing content.

Attaching video

https://github.com/user-attachments/assets/23a2594e-353d-4014-8253-e8ecf759433a

Steps to Reproduce

Steps to Reproduce:

  • Create a new text block with any content.
  • Use markdown symbols (e.g., # for heading or - for bullet list) to convert the text block.
  • Observe that the text disappears and only a blank formatted block remains.

Screenshots

No response

Do you want to work on this issue?

Yes

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

No response

mdsaban avatar Oct 02 '24 14:10 mdsaban

@Darginec05, are you aware of this? If it hasn't been addressed yet, I'd be glad to investigate further.

mdsaban avatar Oct 02 '24 14:10 mdsaban

Related: https://github.com/Darginec05/Yoopta-Editor/issues/206

Darginec05 avatar Oct 02 '24 14:10 Darginec05

@mdsaban I remember this issue, but I didnt have time to check this. So, I'll be happy if you will investigate.

I think the problem can be found in packages/core/editor/src/extensions/shortcuts.ts

Darginec05 avatar Oct 02 '24 15:10 Darginec05

@Darginec05 sure, will look into this

mdsaban avatar Oct 02 '24 15:10 mdsaban