import DOMPurify from 'dompurify'; var Markdown = require('markdown-it')({ html: true, linkify: true, typographer: true, breaks: true, }); //import markdownItMermaid from "@wekanteam/markdown-it-mermaid"; // 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") !== false) { return HTML.Raw('

WARNING! HIDDEN TEXT!

' + DOMPurify.sanitize(text.replace('', '-->').replace('
', '').replace('
','') + '
')); } else { return HTML.Raw(DOMPurify.sanitize(Markdown.render(text).replace('', '-->'), {ALLOW_UNKNOWN_PROTOCOLS: true})); } })); }