diff --git a/plugin/speakernotes/client.js b/plugin/speakernotes/client.js index 1aba8b8c29837fb5780ff538958bce0583714478..9e657d6361ead481c4a9f3c7f10550694d1908f4 100644 --- a/plugin/speakernotes/client.js +++ b/plugin/speakernotes/client.js @@ -27,7 +27,9 @@ indexv : event.indexv, nextindexh : nextindexh, nextindexv : nextindexv, - socketId : socketId + socketId : socketId, + markdown : notes ? notes.getAttribute('data-markdown') != null : false + }; socket.emit('slidechanged', slideData); diff --git a/plugin/speakernotes/notes.html b/plugin/speakernotes/notes.html index 88924c0d663b98637a46456d381a33827361f527..f61501d74ffa56ea2bce600fafdf38fc68753b9d 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); });