diff --git a/src/utils.ts b/src/utils.ts index 89ea0d55..a07064db 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -163,3 +163,13 @@ export function unpatch(C: any, patchName: string) { } } } + +export async function loadTemplates(url: string): Promise { + const result = await fetch(url); + if (!result.ok) { + throw new Error("Error while fetching xml templates"); + } + let templates = await result.text(); + templates = templates.replace(//g, ""); + return templates; +} \ No newline at end of file