Rendering HTML in ipywidgets output

vvanag
New Contributor III

Hi, I am experimenting with IPywidgets on Databricks (company Azure account and Free Edition).

I have an HTML that I would like to render so typically what happens is that simple things like:

import ipywidgets as widgets

output = widgets.Output()

with output:
    displayHTML(
        """
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
"""
    )

output

 Work flawlessly. I have a more complex one, that works fine with:

with open('testme.html', encoding='utf8') as f:
        some_html = f.read()
displayHTML(some_html)

 But If I do like the above

output = widgets.Output()

with output:
    displayHTML(some_html)

output

It does not work. It gives a message of

"Latest error: Uncaught ReferenceError: Tabulator is not defined"

Tabulator is the JS library I use in HTML.. Here is the said HTML

https://drive.google.com/file/d/1LXqhEDFA5LwRqrhWXGJntitPqv66lCza/view?usp=sharing

My use case is to use IPywidgets controls to change the HTML to be rendered. The code works fine in Jupyterlab and VScodium notebook.