diff --git a/frontend/src/components/input/editor/TipTap.vue b/frontend/src/components/input/editor/TipTap.vue index 360c9028d..d5ef4e181 100644 --- a/frontend/src/components/input/editor/TipTap.vue +++ b/frontend/src/components/input/editor/TipTap.vue @@ -325,6 +325,13 @@ watch( }, ) +const additionalLinkProtocols = [ + 'ftp', + 'git', + 'obsidian', + 'notion', +] + const extensions : Extensions = [ // Starterkit: Blockquote, @@ -379,7 +386,11 @@ const extensions : Extensions = [ Underline, Link.configure({ openOnClick: false, - validate: (href: string) => /^https?:\/\//.test(href), + validate: (href: string) => (new RegExp( + `^(https?|${additionalLinkProtocols.join('|')}):\\/\\/`, + 'i', + )).test(href), + protocols: additionalLinkProtocols, }), Table.configure({ resizable: true,