express.ui.markdown(text, *, render_func=None, **kwargs)

Convert a string of markdown to ui.HTML.


text: str

A string of text containing markdown.

render_func: Optional[Callable[[str], str]] = None

A function (with at least 1 argument) which accepts a string of markdown and returns a string of HTML. By default, a customized instance of the markdown_id.main.MarkdownIt class (which supports Github-flavored markdown) from the markdown-it package is used.

**kwargs: object = {}

Additional keyword arguments passed to the render_func.


Type Description
HTML An HTML string of the rendered markdown.


#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400

## file:
from import ui

    # Hello World

    This is **markdown** and here is some `code`:

    print('Hello world!')