Merge branch 'markdown-in-notes' of https://github.com/technicalpickles/reveal.js
This commit is contained in:
commit
c5fe9bd3c4
@ -205,6 +205,8 @@ If you're interested in using speaker notes, reveal.js comes with a Node server
|
|||||||
|
|
||||||
To include speaker notes in your presentation, simply add an `<aside class="notes">` element to any slide. These notes will be hidden in the main presentation view.
|
To include speaker notes in your presentation, simply add an `<aside class="notes">` element to any slide. These notes will be hidden in the main presentation view.
|
||||||
|
|
||||||
|
It's also possible to write your notes with Markdown. To enable Markdown, simply add the ```data-markdown``` attribute to your ```<aside>``` elements and reveal.js will automatically load the JavaScript parser.
|
||||||
|
|
||||||
You'll also need to [install Node.js](http://nodejs.org/); then, install the server dependencies by running `npm install`.
|
You'll also need to [install Node.js](http://nodejs.org/); then, install the server dependencies by running `npm install`.
|
||||||
|
|
||||||
Once Node.js and the dependencies are installed, run the following command from the root directory:
|
Once Node.js and the dependencies are installed, run the following command from the root directory:
|
||||||
|
@ -28,7 +28,9 @@
|
|||||||
indexv : event.indexv,
|
indexv : event.indexv,
|
||||||
nextindexh : nextindexh,
|
nextindexh : nextindexh,
|
||||||
nextindexv : nextindexv,
|
nextindexv : nextindexv,
|
||||||
socketId : socketId
|
socketId : socketId,
|
||||||
|
markdown : notes ? notes.getAttribute('data-markdown') != null : false
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
socket.emit('slidechanged', slideData);
|
socket.emit('slidechanged', slideData);
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
<div id="notes"></div>
|
<div id="notes"></div>
|
||||||
|
|
||||||
<script src="/socket.io/socket.io.js"></script>
|
<script src="/socket.io/socket.io.js"></script>
|
||||||
|
<script src="/lib/js/showdown.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var socketId = '{{socketId}}';
|
var socketId = '{{socketId}}';
|
||||||
@ -99,7 +100,13 @@
|
|||||||
// ignore data from sockets that aren't ours
|
// ignore data from sockets that aren't ours
|
||||||
if (data.socketId !== socketId) { return; }
|
if (data.socketId !== socketId) { return; }
|
||||||
|
|
||||||
|
if (data.markdown) {
|
||||||
|
notes.innerHTML = (new Showdown.converter()).makeHtml(data.notes);
|
||||||
|
}
|
||||||
|
else {
|
||||||
notes.innerHTML = data.notes;
|
notes.innerHTML = data.notes;
|
||||||
|
}
|
||||||
|
|
||||||
currentSlide.contentWindow.Reveal.navigateTo(data.indexh, data.indexv);
|
currentSlide.contentWindow.Reveal.navigateTo(data.indexh, data.indexv);
|
||||||
nextSlide.contentWindow.Reveal.navigateTo(data.nextindexh, data.nextindexv);
|
nextSlide.contentWindow.Reveal.navigateTo(data.nextindexh, data.nextindexv);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user