diff options
author | Josh Nichols | 2012-09-08 22:05:19 -0400 |
---|---|---|
committer | Josh Nichols | 2012-09-08 22:07:14 -0400 |
commit | a8a3765bec9a490b285f3422be2dd06e5acb65d4 (patch) | |
tree | a8853e1468ee16685a4c2ffc72a02b036d12377e /plugin/speakernotes/notes.html | |
parent | e6e80283f24f773ee8d0a5364634a06f081a1410 (diff) |
Support markdown in speaker notes
It's pretty nice to have markdown in slides. It's even nicer to have
markdown in speaker notes too :)
Diffstat (limited to 'plugin/speakernotes/notes.html')
-rw-r--r-- | plugin/speakernotes/notes.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugin/speakernotes/notes.html b/plugin/speakernotes/notes.html index 88924c0..f61501d 100644 --- a/plugin/speakernotes/notes.html +++ b/plugin/speakernotes/notes.html @@ -87,6 +87,7 @@ <div id="notes"></div> <script src="/socket.io/socket.io.js"></script> + <script src="/lib/js/showdown.js"></script> <script> var socketId = '{{socketId}}'; @@ -99,7 +100,13 @@ // ignore data from sockets that aren't ours if (data.socketId !== socketId) { return; } - notes.innerHTML = data.notes; + if (data.markdown) { + notes.innerHTML = (new Showdown.converter()).makeHtml(data.notes); + } + else { + notes.innerHTML = data.notes; + } + currentSlide.contentWindow.Reveal.navigateTo(data.indexh, data.indexv); nextSlide.contentWindow.Reveal.navigateTo(data.nextindexh, data.nextindexv); }); |