Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'repr_html' of https://github.com/minrk/ipython into min…

…rk-repr_html
  • Loading branch information...
commit a65c2d316b34de43db0c488e9bf744a4baa3b0b1 2 parents 0251893 + 1cc83a7
Brian E. Granger ellisonbg authored
3  IPython/frontend/html/notebook/static/css/notebook.css
View
@@ -285,6 +285,9 @@ div.output_latex {
font-size: 116%;
}
+div.output_html {
+}
+
div.output_png {
}
13 IPython/frontend/html/notebook/static/js/codecell.js
View
@@ -175,7 +175,9 @@ var IPython = (function (IPython) {
CodeCell.prototype.append_display_data = function (data, element) {
- if (data["text/latex"] !== undefined) {
+ if (data["text/html"] !== undefined) {
+ this.append_html(data["text/html"], element);
+ } else if (data["text/latex"] !== undefined) {
this.append_latex(data["text/latex"], element);
// If it is undefined, then we just appended to div.output, which
// makes the latex visible and we can typeset it. The typesetting
@@ -194,6 +196,15 @@ var IPython = (function (IPython) {
};
+ CodeCell.prototype.append_html = function (html, element) {
+ element = element || this.element.find("div.output");
+ var toinsert = $("<div/>").addClass("output_area output_html");
+ toinsert.append(html);
+ element.append(toinsert);
+ return element;
+ }
+
+
CodeCell.prototype.append_stream = function (data, element) {
element = element || this.element.find("div.output");
var toinsert = $("<div/>").addClass("output_area output_stream");
Please sign in to comment.
Something went wrong with that request. Please try again.