Can I insert plain HTML without "invoking" Bokeh Layout Engine?

In Panel is there a way of adding plain HTML to a layout element like a Column?

With “plain” I mean not wrapped in the Bookeh Divs or handled by the Bokeh layout engine?

I would like to avoid having the Bookeh layout engine laying out large HTML elements generated from markdown files. The markdown might have lots of paragraphs, images and code. And this is not handled very well by the bokeh layout engine if I wan’t things to be full width, responsive.

Please note that I cannot use the Template as I’m developing a single page application with multiple pages and my pages don’t have the same layout.

Unfortunately I don’t have an immediate answer here. The problem here is that bokeh needs to know how big the content is going to be so it can lay stuff out around it. Since the HTML model is in Panel itself we could take control of this ourselves somehow. I’d have to play around with it to see how well that would work. What I’d really prefer if bokeh allowed caching the size of different elements so they don’t have to be recomputed every single time the layout changes which is very expensive.

1 Like

And if we could design “HTML” freely and add callbacks to anything just like Dash works. That would be truly amazing and make it very easy to create simple, custom Widgets.

I’ve made a PR here which aims uses caching to try to address some of the extreme slowness of the layout solver. So far it seems to work quite well.