MCPcopy Create free account
hub / github.com/datapane/datapane / HTML

Class HTML

python-client/src/datapane/blocks/text.py:127–144  ·  view source on GitHub ↗

The HTML block allows you to add raw HTML to your app, allowing for highly customized components, such as your company's brand, logo, and more. !!! info The HTML block is sandboxed and cannot execute JavaScript.

Source from the content-addressed store, hash-verified

125
126
127class HTML(EmbeddedTextBlock):
128 """
129 The HTML block allows you to add raw HTML to your app, allowing for highly customized components, such as your company's brand, logo, and more.
130
131 !!! info
132 The HTML block is sandboxed and cannot execute JavaScript.
133 """
134
135 _tag = "HTML"
136
137 def __init__(self, html: t.Union[str, dom_tag], name: BlockId = None, label: str = None):
138 """
139 Args:
140 html: The HTML fragment to embed - can be a string or a [dominate](https://github.com/Knio/dominate/) tag
141 name: A unique name for the block to reference when adding text or embedding (optional)
142 label: A label used when displaying the block (optional)
143 """
144 super().__init__(content=str(html), name=name, label=label)
145
146
147class Formula(EmbeddedTextBlock):

Callers 3

_ipython_display_Method · 0.85
generate_chromeMethod · 0.85
__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected