New Topic
Click here to advertise on this slot

how to make a pasted link a hyperlink when pasted?

avatar
2021-06-01 07:36:23 UTC
hello, I'm have a rich text editor on a webpage for which I'm using quill.js. When I paste I a link it doesn't automatically become a hyperlink. Instead I have to do it by manually making it a hyperlink. How can I automatically make it a hyperlink when the link is pasted inside the richtext editor? My quill.js config is this: var options = { placeholder: 'Type here..', readOnly: false, theme: 'snow' }; editor = new Quill('#div-id', options); Thanks in advance.
Created
avatar1301d
Replies
1
avatar
2021-06-02 23:04:50 UTC
<p>There is a nice module to handle this: https://github.com/visualjerk/quill-magic-url</p><p>This module can be included onto the page using a CDN: https://github.com/visualjerk/quill-magic-url#from-cdn</p><p>Or it can be installed into a project using npm: https://github.com/visualjerk/quill-magic-url#with-npm</p><p>And it can be configured pretty easily: https://github.com/visualjerk/quill-magic-url#usage</p><p><br></p><p><br></p>