Quill is a free, open-source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need.
The target attribute is set in the link blot. You can extend the link blot to remove this attribute:
var Link = Quill.import('formats/link'); class MyLink extends Link { static create(value) { let node = super.create(value); value = this.sanitize(value); node.setAttribute('href', value); if (value.includes(thisDomain)) { node.removeAttribute('target'); } return node; } } Quill.register(MyLink);
Additional Resources:
Some module extensions:
The quill-magic-url extension checks for URLs and mail addresses during typing and pasting and automatically converts them to links and normalizes the links URL.
You can find a demo page here.
<script src="https://cdn.jsdelivr.net/npm/quill-magic-url@4.1.3/dist/index.min.js"></script>
Additional Resources