diff --git a/app/assets/javascripts/sitewide/quill_links.js b/app/assets/javascripts/sitewide/quill_links.js new file mode 100644 index 000000000..870275010 --- /dev/null +++ b/app/assets/javascripts/sitewide/quill_links.js @@ -0,0 +1,10 @@ +//= require quill + +// Globally overwrite links handling in Quill rich text editor +var Link = Quill.import('formats/link'); +Link.sanitize = function(url) { + if (url.includes('http:') || url.includes('https:')) { + return url; + } + return 'http://' + url; +};