The question is, what is different about the display that you want to do in Jupyter compared to the text/plain
output in the REPL? In the case of a Widget
, I’m guessing that you want to use its text/html
output method, so you would do:
Base.show(io::IO, m::MIME"text/html", x::Foo) = show(io, m, foo(x))
(In Jupyter, if both text/plain and text/html output are available, it shows the “richer” html output.)