|
@@ -2475,22 +2475,7 @@
|
|
|
|
|
|
if( config.showNotes && dom.speakerNotes && currentSlide && !isPrintingPDF() ) {
|
|
|
|
|
|
- var notes = '';
|
|
|
-
|
|
|
-
|
|
|
- if( currentSlide.hasAttribute( 'data-notes' ) ) {
|
|
|
- notes = currentSlide.getAttribute( 'data-notes' );
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if( !notes ) {
|
|
|
- var notesElement = currentSlide.querySelector( 'aside.notes' );
|
|
|
- if( notesElement ) {
|
|
|
- notes = notesElement.innerHTML;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- dom.speakerNotes.innerHTML = notes;
|
|
|
+ dom.speakerNotes.innerHTML = getSlideNotes() || '';
|
|
|
|
|
|
}
|
|
|
|
|
@@ -3335,6 +3320,32 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * Retrieves the speaker notes from a slide. Notes can be
|
|
|
+ * defined in two ways:
|
|
|
+ * 1. As a data-notes attribute on the slide <section>
|
|
|
+ * 2. As an <aside class="notes"> inside of the slide
|
|
|
+ */
|
|
|
+ function getSlideNotes( slide ) {
|
|
|
+
|
|
|
+
|
|
|
+ slide = slide || currentSlide;
|
|
|
+
|
|
|
+
|
|
|
+ if( slide.hasAttribute( 'data-notes' ) ) {
|
|
|
+ return slide.getAttribute( 'data-notes' );
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ var notesElement = slide.querySelector( 'aside.notes' );
|
|
|
+ if( notesElement ) {
|
|
|
+ return notesElement.innerHTML;
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* Retrieves the current state of the presentation as
|
|
|
* an object. This state can then be restored at any
|
|
@@ -4486,6 +4497,9 @@
|
|
|
|
|
|
getSlideBackground: getSlideBackground,
|
|
|
|
|
|
+
|
|
|
+ getSlideNotes: getSlideNotes,
|
|
|
+
|
|
|
|
|
|
getPreviousSlide: function() {
|
|
|
return previousSlide;
|