Skip to content

Commit

Permalink
improve: Loading of markdown features
Browse files Browse the repository at this point in the history
Add additional timeout functions to load the module directly from the
raw text-file.
  • Loading branch information
andre-dietrich committed Jan 9, 2023
1 parent c894a4b commit 45ae75d
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="fetch" content="true">

<meta name="description" content="Write Markdown as Task descriptions for your students" />
<meta name="show-in" content="*" />

Expand Down Expand Up @@ -33,6 +35,11 @@
function init() {
if (window.md) return

if (!window.markdownItTextualUml) {
setTimeout(init, 100)
return
}

window.md = markdownit()

// enable everything
Expand Down Expand Up @@ -79,6 +86,10 @@
startOnLoad: true
})
}, 1000)
} else {
setTimeout(() => {
render(content)
}, 100)
}
}

Expand All @@ -90,24 +101,18 @@
init()

let content = Edrys.module.config || ""
content += "\n\n" + ( Edrys.module[Edrys.role.toLowerCase()+'Config'] || "" )

content += "\n\n" + (Edrys.module[Edrys.role.toLowerCase() + 'Config'] || "")

render(content)
});

</script>

<title>Edrys - Markdown-IT module</title>
</head>

<body>
<h1>Edrys Markdown-IT Module</h1>

<p>
Please refer to the <a href="https://github.com/Cross-Lab-Project/edrys_module-markdown-it">README</a> of this
project.
</p>

</body>

</html>

0 comments on commit 45ae75d

Please sign in to comment.