mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
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.
This commit is contained in:
parent
44af0e2b6b
commit
b8b3c6152d
@ -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']);
|
||||||
|
Loading…
Reference in New Issue
Block a user