From b8b3c6152d70331a95133dab1f93b5566dbc8d3e Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Sun, 12 Jul 2015 11:20:37 -0500 Subject: [PATCH] Display HTML in pager if supplied This is still an interim measure until the generic 'put a mimebundle on the page' machinery can easily be used here. --- notebook/static/notebook/js/pager.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/notebook/static/notebook/js/pager.js b/notebook/static/notebook/js/pager.js index 04ded1b61..119612f84 100644 --- a/notebook/static/notebook/js/pager.js +++ b/notebook/static/notebook/js/pager.js @@ -82,8 +82,13 @@ define([ }); this.events.on('open_with_text.Pager', function (event, payload) { - // FIXME: support other mime types - if (payload.data['text/plain'] && payload.data['text/plain'] !== "") { + // FIXME: support other mime types with generic mimebundle display + // mechanism + if (payload.data['text/html'] && payload.data['text/html'] !== "") { + that.clear(); + that.expand(); + that.append(payload.data['text/html']); + } else if (payload.data['text/plain'] && payload.data['text/plain'] !== "") { that.clear(); that.expand(); that.append_text(payload.data['text/plain']);