From 9775973311dadacf183f155c568afda925b49768 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 13 Mar 2018 11:58:02 +0100 Subject: [PATCH] Put it all together and see if anything works. --- index.html | 5 +++++ use-markdown.js | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 use-markdown.js diff --git a/index.html b/index.html index f6e775e..eccdd6c 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,13 @@ This page is powered by Markdown.js + diff --git a/use-markdown.js b/use-markdown.js new file mode 100644 index 0000000..51427eb --- /dev/null +++ b/use-markdown.js @@ -0,0 +1,11 @@ +"use strict"; + +function loadMdFromUrl(url) { + $.get(url, function(date) { + var converter = new showdown.Converter(); + var html = converter.makeHtml(text); + $("#markdown-content").html(html); + }); + +// TODO: Add more, add menu, add ... +loadMdFromUrl("content/hello.md");