You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to render cytoscapejs HTML outside of IPython notebook (i.e. in my own webapp). Unfortunately, the function py2cytoscape.cytoscapejs.viewer.render does not return HTML, it calls display(HTML(html_string)), then returns None. This means (AFAIK), I cannot directly access the HTML that is generated from this function.
I suggest that there be two functions in py2cytoscape.cytoscapejs.viewer, one to render HTML from a graph, and another to both render and display the result in IPython notebook. Or even more simply, the function could remain as is, but just return the html string from the rendered template (but I am not sure if this would interfere with usage in ipynb).
Another possible approach would be to allow the caller to select the IPython frontend that is called by display and return the DisplayHandle object used by IPython, which might let the user control how and where the HTML is rendered. But I think the first approach is simpler and more flexible.
The text was updated successfully, but these errors were encountered:
I would like to render cytoscapejs HTML outside of IPython notebook (i.e. in my own webapp). Unfortunately, the function
py2cytoscape.cytoscapejs.viewer.render
does not return HTML, it calls display(HTML(html_string)), then returns None. This means (AFAIK), I cannot directly access the HTML that is generated from this function.I suggest that there be two functions in
py2cytoscape.cytoscapejs.viewer
, one to render HTML from a graph, and another to both render and display the result in IPython notebook. Or even more simply, the function could remain as is, but just return the html string from the rendered template (but I am not sure if this would interfere with usage in ipynb).Another possible approach would be to allow the caller to select the IPython frontend that is called by
display
and return theDisplayHandle
object used by IPython, which might let the user control how and where the HTML is rendered. But I think the first approach is simpler and more flexible.The text was updated successfully, but these errors were encountered: