Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Sidecar in jupyterlab. Trying to show HTMl. Just shows in standard cell output instead of opening a sidecar. #36

Open
kevinsneel opened this issue Feb 24, 2020 · 1 comment

Comments

@kevinsneel
Copy link

kevinsneel commented Feb 24, 2020

Here's my code. What am I doing wrong:

sc = Sidecar(title='Trace')
ht = widgets.HTML(
value="Hello World",
placeholder='Some HTML',
description='Some HTML',
)
with sc:
display(ht)

I have also tried:

sc = Sidecar(title='Trace')
with sc:
display(HTML(functools.reduce(lambda x, y: x+y, c.htmlStream())

@kevinsneel kevinsneel changed the title Suing Sidecar in jupyterlab. Trying to show HTMl. Just shows in standard cell output instead of opening a sidecar. Using Sidecar in jupyterlab. Trying to show HTMl. Just shows in standard cell output instead of opening a sidecar. Feb 24, 2020
@thomasaarholt
Copy link

thomasaarholt commented Jun 4, 2020

Both HTML implementations that I'm aware of (IPython and ipywidgets) appear to work fine. The latter seems to add some flexbox layout of its own.

from sidecar import Sidecar
sc = Sidecar(title='Sidecar Output')

from IPython.display import HTML
from ipywidgets import HTML as html

with sc:
    display(HTML('hello there'))
    display(html('<b>hello</b> there2'))

I believe this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants