From 42994efa9debccfad5949afc09d17347ccec8e45 Mon Sep 17 00:00:00 2001 From: chrisi51 Date: Thu, 4 Mar 2021 16:30:06 +0100 Subject: [PATCH] Added real autolinking and simpler adding of new url schemes to add additional URL Schemes just put your scheme to urlschemes --- packages/markdown/src/template-integration.js | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/markdown/src/template-integration.js b/packages/markdown/src/template-integration.js index 464d0d765..30074d777 100755 --- a/packages/markdown/src/template-integration.js +++ b/packages/markdown/src/template-integration.js @@ -6,23 +6,40 @@ var Markdown = require('markdown-it')({ breaks: true, }); + +// Static URL Scheme Listing +var urlschemes = [ + "aodroplink", + "thunderlink", + "cbthunderlink", + "onenote", + "file", + "abasurl", + "conisio", + "mailspring" +]; + +// Better would be a field in the admin backend to set this dynamically +// instead of putting all known or wanted url schemes here hard into code +// but i was not able to access those settings +// var urlschemes = currentSetting.automaticLinkedUrlSchemes.split('\n'); + +// put all url schemes into the linkify configuration to automatically make it clickable +for(var i=0; i