diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index 1aedcd0b8..12e72796a 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -1072,11 +1072,15 @@ define([ [MIME_PDF] : append_pdf }; - OutputArea.prototype.register_mime_type = function (mimetype, append, safe) { + OutputArea.prototype.mime_types = function () { + return OutputArea.display_order; + }; + + OutputArea.prototype.register_mime_type = function (mimetype, append, options) { if (mimetype && typeof(append) === 'function') { OutputArea.output_types.push(mimetype); - if (safe) OutputArea.safe_outputs[mimetype] = true; - OutputArea.display_order.unshift(mimetype); + if (options.safe) OutputArea.safe_outputs[mimetype] = true; + OutputArea.display_order.splice(options.index || 0, 0, mimetype); OutputArea.append_map[mimetype] = append; } };