diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index 6f0694bf3..a04b99727 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -526,7 +526,8 @@ import {ShortcutEditor} from 'notebook/js/shortcuteditor'; * @return {jQuery} A selector of all cell elements */ Notebook.prototype.get_cell_elements = function () { - return this.container.find(".cell").not('.cell .cell'); + var container = this.container || $('#notebook-container') + return container.find(".cell").not('.cell .cell'); }; /** diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index fd9f7d0a2..01a79c865 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -996,6 +996,15 @@ define([ [MIME_JAVASCRIPT] : append_javascript, [MIME_PDF] : append_pdf }; + + OutputArea.prototype.register_mime_type = function (mimetype, append, safe) { + if (mimetype && typeof(append) === 'function') { + OutputArea.output_types.push(mimetype); + if (safe) OutputArea.safe_outputs[mimetype] = true; + OutputArea.display_order.unshift(mimetype); + OutputArea.append_map[mimetype] = append; + } + }; return {'OutputArea': OutputArea}; });