Merge pull request #196 from takluyver/pager-display-html

Display HTML in pager if supplied
This commit is contained in:
Min RK 2015-07-12 14:13:42 -05:00
commit 22d60f9f9b

View File

@ -82,8 +82,13 @@ define([
}); });
this.events.on('open_with_text.Pager', function (event, payload) { this.events.on('open_with_text.Pager', function (event, payload) {
// FIXME: support other mime types // FIXME: support other mime types with generic mimebundle display
if (payload.data['text/plain'] && payload.data['text/plain'] !== "") { // 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.clear();
that.expand(); that.expand();
that.append_text(payload.data['text/plain']); that.append_text(payload.data['text/plain']);