gtgalone / react-quilljs

React Hook Wrapper for Quill, powerful rich text editor.
https://www.npmjs.com/package/react-quilljs
MIT License
241 stars 27 forks source link

How do I sanitize links? Need to open links in the same tab. #79

Closed masterial closed 2 months ago

masterial commented 3 months ago

Hi, I am using react-quilljs in an SSR environment with next.js. I found that the links are being generated will rel and target attributes added. I need a behavior where the user remains in the same tab when they click the link. Any quick idea how I can sanitize links and remove these attributes on the fly.

<a href="/hashtag/hello" rel="noopener noreferrer" target="_blank"> #hello </a>

Thanks!

gtgalone commented 2 months ago

Hello @masterial !

You need to ask quill repo(https://github.com/slab/quill).

this repo is just for wrapper.