jonathanyeung / mark-sharp

Mark Sharp WYSIWYG Markdown Editor for VS Code
18 stars 0 forks source link

Gremlin characters appear after switching from wysiwyg editor to raw text editor #3

Open hikchoi opened 3 months ago

hikchoi commented 3 months ago

Describe the bug Intermittent addition of gremlin characters after working on some text in wysiwyg mode, then switching to raw editor.

To Reproduce Not sure how to reproduce, but I suspect it has to do with Korean characters and/or line breaks.

Expected behavior No gremlin characters are added to the raw markdown.

Screenshots image image image

Platform (please complete the following information):

jonathanyeung commented 2 months ago

Thanks @hikchoi for opening the first issue (at least via Github 😄) on this project!

I haven't been able to repro yet using Chinese Input, but I'll keep investigating.

jonathanyeung commented 2 months ago

It looks like there are some issues related to Korean input in the core Lexical framework that may be related: https://github.com/facebook/lexical/issues?q=is%3Aissue+korea+is%3Aopen

jeffsnff commented 1 month ago

I have actually been running into this issue as well.

Repo Steps:

  1. Open a Markdown file
  2. Open file in with Mark Sharp
  3. Start to make edits to the document
  4. Switch back and forth between Mark Sharp document and raw markdown file

After a few edits and switching back and forth between it, you will start to see your edits are undone and words will be misspelled.

I was just testing this, and I got an error in VS Code:

Webview Error: Cannot read properties of undefined
(reading 'indexOf')
Source: Mark Sharp

Doing another test where I was doing a numbered list and opening up a log viewer I use for work and I got the following error:

Webview Error: insertAfter: list node is not parent of list item node
Source: Mark Sharp

Disclaimer. I am not a paid person. So I understand if you ignore this message. I do think this is a great application and I have actually gotten my work to approve this to use.

Updates:

jonathanyeung commented 1 month ago

Hi @jeffsnff - paid user or not, I will try to address issues best I can and welcome all feedback! Thank you for using Mark Sharp!

After a few edits and switching back and forth between it, you will start to see your edits are undone and words will be misspelled.

This kind of issue is P1 for me - can you help me understand it a little better?


Update: Would you mind opening a new issue for this? I think this is different from the original issue that hikchoi filed, which is specific to Korean input.