Show More
@@ -514,7 +514,7 b' var IPython = (function (IPython) {' | |||
|
514 | 514 | }; |
|
515 | 515 | |
|
516 | 516 | |
|
517 |
|
|
|
517 | var append_html = function (html, md, element) { | |
|
518 | 518 | var type = 'text/html'; |
|
519 | 519 | var toinsert = this.create_output_subarea(md, "output_html rendered_html", type); |
|
520 | 520 | IPython.keyboard_manager.register_events(toinsert); |
@@ -524,7 +524,7 b' var IPython = (function (IPython) {' | |||
|
524 | 524 | }; |
|
525 | 525 | |
|
526 | 526 | |
|
527 |
|
|
|
527 | var append_javascript = function (js, md, element) { | |
|
528 | 528 | // We just eval the JS code, element appears in the local scope. |
|
529 | 529 | var type = 'application/javascript'; |
|
530 | 530 | var toinsert = this.create_output_subarea(md, "output_javascript", type); |
@@ -545,7 +545,7 b' var IPython = (function (IPython) {' | |||
|
545 | 545 | }; |
|
546 | 546 | |
|
547 | 547 | |
|
548 |
|
|
|
548 | var append_text = function (data, md, element) { | |
|
549 | 549 | var type = 'text/plain'; |
|
550 | 550 | var toinsert = this.create_output_subarea(md, "output_text", type); |
|
551 | 551 | // escape ANSI & HTML specials in plaintext: |
@@ -560,7 +560,7 b' var IPython = (function (IPython) {' | |||
|
560 | 560 | }; |
|
561 | 561 | |
|
562 | 562 | |
|
563 |
|
|
|
563 | var append_svg = function (svg, md, element) { | |
|
564 | 564 | var type = 'image/svg+xml'; |
|
565 | 565 | var toinsert = this.create_output_subarea(md, "output_svg", type); |
|
566 | 566 | toinsert.append(svg); |
@@ -601,7 +601,7 b' var IPython = (function (IPython) {' | |||
|
601 | 601 | if (width !== undefined) img.attr('width', width); |
|
602 | 602 | }; |
|
603 | 603 | |
|
604 |
|
|
|
604 | var append_png = function (png, md, element) { | |
|
605 | 605 | var type = 'image/png'; |
|
606 | 606 | var toinsert = this.create_output_subarea(md, "output_png", type); |
|
607 | 607 | var img = $("<img/>").attr('src','data:image/png;base64,'+png); |
@@ -613,7 +613,7 b' var IPython = (function (IPython) {' | |||
|
613 | 613 | }; |
|
614 | 614 | |
|
615 | 615 | |
|
616 |
|
|
|
616 | var append_jpeg = function (jpeg, md, element) { | |
|
617 | 617 | var type = 'image/jpeg'; |
|
618 | 618 | var toinsert = this.create_output_subarea(md, "output_jpeg", type); |
|
619 | 619 | var img = $("<img/>").attr('src','data:image/jpeg;base64,'+jpeg); |
@@ -625,7 +625,7 b' var IPython = (function (IPython) {' | |||
|
625 | 625 | }; |
|
626 | 626 | |
|
627 | 627 | |
|
628 |
|
|
|
628 | var append_pdf = function (pdf, md, element) { | |
|
629 | 629 | var type = 'application/pdf'; |
|
630 | 630 | var toinsert = this.create_output_subarea(md, "output_pdf", type); |
|
631 | 631 | var a = $('<a/>').attr('href', 'data:application/pdf;base64,'+pdf); |
@@ -636,7 +636,7 b' var IPython = (function (IPython) {' | |||
|
636 | 636 | return toinsert; |
|
637 | 637 | } |
|
638 | 638 | |
|
639 |
|
|
|
639 | var append_latex = function (latex, md, element) { | |
|
640 | 640 | // This method cannot do the typesetting because the latex first has to |
|
641 | 641 | // be on the page. |
|
642 | 642 | var type = 'text/latex'; |
@@ -851,14 +851,14 b' var IPython = (function (IPython) {' | |||
|
851 | 851 | ]; |
|
852 | 852 | |
|
853 | 853 | OutputArea.append_map = { |
|
854 |
"text/plain" : |
|
|
855 |
"text/html" : |
|
|
856 |
"image/svg+xml" : |
|
|
857 |
"image/png" : |
|
|
858 |
"image/jpeg" : |
|
|
859 |
"text/latex" : |
|
|
860 |
"application/javascript" : |
|
|
861 |
"application/pdf" : |
|
|
854 | "text/plain" : append_text, | |
|
855 | "text/html" : append_html, | |
|
856 | "image/svg+xml" : append_svg, | |
|
857 | "image/png" : append_png, | |
|
858 | "image/jpeg" : append_jpeg, | |
|
859 | "text/latex" : append_latex, | |
|
860 | "application/javascript" : append_javascript, | |
|
861 | "application/pdf" : append_pdf | |
|
862 | 862 | }; |
|
863 | 863 | |
|
864 | 864 | IPython.OutputArea = OutputArea; |
General Comments 0
You need to be logged in to leave comments.
Login now