Milkdown / milkdown

🍼 Plugin driven WYSIWYG markdown editor framework.
https://milkdown.dev
MIT License
8.64k stars 386 forks source link

refactor: replace autoInsertZeroSpaceInTablePlugin with prosemirror-safari-ime-span #1403

Closed ocavue closed 1 month ago

ocavue commented 1 month ago

Summary

This PR replaces autoInsertZeroSpaceInTablePlugin() with a standalone package prosemirror-safari-ime-span. I believe prosemirror-safari-ime-span has two benefits compared to autoInsertZeroSpaceInTablePlugin():

  1. It uses decoration to insert an empty span, without touching state.doc. This ensure that the document won't contain unexpected zero width character if the compositionend event is not called.
  2. It works for not only table but all nodes.

How did you test this change?

I used IME to type some words in a Storybook table within Safari.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
milkdown-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 4:28pm
Saul-Mirone commented 1 month ago

Thanks for your contribution!

nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ff63ca8fc04c2012ba1dc9cee60bc0a716a592dc. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 3 targets - [`nx build @milkdown/e2e`](https://cloud.nx.app/runs/FvRATT1LJB?utm_source=pull-request&utm_medium=comment) - [`nx run-many --target=tsc --all --parallel`](https://cloud.nx.app/runs/9EWv1bHgMH?utm_source=pull-request&utm_medium=comment) - [`nx run-many --target=build --all --parallel`](https://cloud.nx.app/runs/8wueyxIxMu?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

cypress[bot] commented 1 month ago

Passing run #934 ↗︎

0 83 0 0 Flakiness 0

Details:

refactor: replace autoInsertZeroSpaceInTablePlugin with prosemirror-safari-ime-s...
Project: Default Project Commit: 23b4ac6246
Status: Passed Duration: 01:32 💡
Started: Jul 3, 2024 4:45 PM Ended: Jul 3, 2024 4:46 PM

Review all test suite changes for PR #1403 ↗︎