mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.63k stars 131 forks source link

[BUG] Creating link via dialog will make previous word anchor #442

Closed braincore closed 2 months ago

braincore commented 2 months ago

If you want to ask for support or request features, sponsor the project and contact me over email.

Describe the bug A clear and concise description of what the bug is.

Reproduction From the live demo: https://mdxeditor.dev/editor/demo

  1. Enter "word1 " (include the trailing space)
  2. Now, create a link using the dialog (url: example.com; title: word2)
  3. Observer that both words "word1 word2" are part of the anchor text.

Expected behavior Only "word2" should be the anchor text.

Desktop (please complete the following information):