This commit is contained in:
2020-04-23 23:45:36 +00:00
parent d9611763f1
commit 6ae161f67f

View File

@@ -404,7 +404,13 @@ export default {
if (this.localVal.length == 0) {
return "";
}
return DOMPurify.sanitize(marked(this.localVal, { breaks: true }));
//replace attachment urls with tokenized local urls
let src = this.localVal.replace(/\[ATTACH:(.*)\]/, function(match, p1) {
return window.$gz.api.downloadUrl(p1);
});
console.log(src);
return DOMPurify.sanitize(marked(src, { breaks: true }));
},
onResize() {
// this.editAreaHeight = window.innerHeight / 2;