Quill editor only permits http://, https://, and mailto: for links.
Everything else gets replaced with "about:blank"
How can I enable Quill to permit an additional URL scheme?
Update:
The array of permitted values is in Link.PROTOCOL_WHITELIST
: ["http", "https", "mailto", "tel"]
Can I change that from outside the library?
Here's how I solved it:
let Link = window.Quill.import('formats/link');
class CustomLink extends Link {
static sanitize(url) {
if(url.startsWith("fmp")) {
return url
} else {
let value = super.sanitize(url);
return value;
}
}
}
Quill.register(CustomLink);