mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-06 15:40:31 +08:00
Merge pull request #308 from okriuchykhin/ok_SCI_684
Changes default behaviour for absolute urls in Quill [SCI-684]
This commit is contained in:
commit
c13a1cdd5c
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