Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add "linkify" feature #62
There are two scenarios here.
Pasting a URL on selected text adds a link to the given URL on the selected text
Wordpress / Dropbox Paper do this and it feels very pleasant to use. See https://github.com/ianstormtaylor/slate-paste-linkify/blob/master/lib/index.js
Pasting / typing a URL in text converts it into a link
This is the usual "linkify". Lots of editors do this.
I created a simple gist to get you started:
Hope it helps
I believe I got it from https://www.npmjs.com/package/draft-js-linkify-plugin.
You can do a lot more from this starting point:
Let me know if you need more help