Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.45k stars 319 forks source link

Plain text links are clickable in Preview #264

Closed cjmaxik closed 1 year ago

cjmaxik commented 4 years ago

Describe the bug When you paste URL (or write it by hand) in Editor, it will be clickable in Preview, but it is not wrapped in Markdown code, so it should be plain text.

To Reproduce Steps to reproduce the behavior:

  1. Paste link in the editor
  2. Click on 'Preview'
  3. Hover on the link in Preview
  4. See that link is clickable
  5. Check the original text area (with forceSync)
  6. Link will be in plain text

Expected behavior

  1. Link should be in plain text (not clickable) in Preview or
  2. Link should be automatically wrapped with [](https://*) in Editor or
  3. Have an option to disable this behavior

Screenshots image

Version information

nhymxu commented 4 years ago

I think problem from marked.js https://github.com/markedjs/marked/issues/882

Customize this very complex. So just edit your code and self compile is better

https://github.com/Ionaru/easy-markdown-editor/blob/f286a6bae5a1dce943476c90ca77e86285c83da9/src/js/easymde.js#L1920-L1917