Displaying a webpage in a Panel application?

I’m building a Panel application for geospatial sensemaking and would love to simplify the user research experience by automating certain web search queries and displaying the results in the app. Is there a way to define a pane that could render websites found in the web search? In my pass through the Panel documentation, I’m not seeing anything obvious that would let me build this.

Some discussion here: Add IFrame pane · Issue #1863 · holoviz/panel · GitHub

One option is a markdown pane:

import panel as pn

html = """

<iframe src="https://panel.holoviz.org/" width="800" height="800"></iframe>

"""

markdown_pane = pn.pane.Markdown(html)

markdown_pane.servable()

This may not work for some websites.

2 Likes

Brilliant - this is super helpful @droumis, thank you!!

1 Like

Also there is the HTML pane, which achieves the same thing and is probably what you want:

import panel as pn

html = """
<iframe src="https://panel.holoviz.org/" width="800" height="800"></iframe>
"""

html_pane = pn.pane.HTML(html)

html_pane.servable()

1 Like