website/tesses.cf/markdown.php

30 lines
735 B
PHP
Raw Normal View History

2022-07-23 13:29:59 +00:00
<?php include("header0.php")?>Tesses - Markdown<?php include("header1.php")?>
<div class="container">
<div id="markdown_page">
</div>
</div>
<script src="https://unpkg.com/showdown@1.9.1/dist/showdown.min.js"></script>
<script>
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var myData = this.responseText;
var dest=document.getElementById('markdown_page');
var converter = new showdown.Converter();
dest.innerHTML = converter.makeHtml(myData);
}
};
xmlhttp.open("GET", window.location.hash.replace('#',''), true);
xmlhttp.send();
</script>
<?php include("footer.php")?>