nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
16.91k stars 1.72k forks source link

Allow Merging `extendedAutolinks` function with existing autolink behavior #3204

Open trescenzi opened 8 months ago

trescenzi commented 8 months ago

Version

"@toast-ui/vue-editor": "3.2.2"

Development Environment

Browser

Current Behavior

When using the extendedAutolinks setting setting it to true automatically links urls and emails. However if you write a function this then overrides the behavior of automatically creating links out of urls and emails.

Expected Behavior

It would be awesome if there was a way to extend the default behavior instead of overriding it. I think the simplest way to do this would be to reexport the functions which also wouldn't result in a breaking change.

If you could export: baseAutolinksParser or the url/email parsers that should allow people to easily extend the default behavior.

I ran into this while working on dullage/flatnotes#136. If I'm missing something and there's a way to currently get both the default behavior and extend it please let me know. That would be awesome.

Thank you for making such a great library! It was super easy to extend 😄