mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 22:23:28 +08:00
Changes default behaviour for absolute urls in Quill [SCI-684]
This commit is contained in:
parent
1dff6c527e
commit
d6f5f6b9bf
1 changed files with 10 additions and 0 deletions
10
app/assets/javascripts/sitewide/quill_links.js
Normal file
10
app/assets/javascripts/sitewide/quill_links.js
Normal file
|
@ -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;
|
||||
};
|
Loading…
Reference in a new issue