Bases: Component
CommonMark text, rendered as prose; raw HTML in the text is shown, not interpreted.
cg.ui.Markdown("## Sessions")
Source code in capturegraph-lib/capturegraph/ui/markdown.py
| class Markdown(Component):
"""CommonMark ``text``, rendered as prose; raw HTML in the text is shown, not interpreted.
```python
cg.ui.Markdown("## Sessions")
```
"""
text: str
def html(self, render: Render) -> str:
"""The text as HTML inside a ``cg-markdown`` block."""
return element("div", {"class": "cg-markdown"}, _MARKDOWN.render(self.text))
|
html(render)
The text as HTML inside a cg-markdown block.
Source code in capturegraph-lib/capturegraph/ui/markdown.py
| def html(self, render: Render) -> str:
"""The text as HTML inside a ``cg-markdown`` block."""
return element("div", {"class": "cg-markdown"}, _MARKDOWN.render(self.text))
|