       @element.innerHTML = d.html
       @graphData = d.graphData
       @codeChunksData = d.codeChunksData
+      @presentationMode = d.presentationMode
+      @slideConfigs = d.slideConfigs
+
+      if @presentationMode
+        @element.setAttribute 'data-presentation-preview-mode', ''
+      else
+        @element.removeAttribute 'data-presentation-preview-mode'
 
       @setInitialScrollPos()
       # console.log 'restore ' + @editor.getPath()

      CACHE[@editor.getPath()] = {
        html: @element?.innerHTML or '',
        codeChunksData: @codeChunksData,
        graphData: @graphData
      }

      @element.innerHTML = '<p style="font-size: 24px;"> loading preview... </p>'

  html: @element.innerHTML
  codeChunksData: @codeChunksData
  graphData: @graphData
  presentationMode: @presentationMode
  slideConfigs: @slideConfigs
}
###
CACHE = {}
