Skip to content

Create markdown widget #2428

@choldgraf

Description

@choldgraf

I would like to create a "Tab" widget where each tab contains markdown that I've generated. I saw that there is an HTML widget, but I didn't see something similar for a Markdown widget. Is this possible in ipywidgets?

E.g., I'd like to do something like:

tab_contents = ['# Heading 1\nMy awesome page', '# Heading 2\nMy awesome second page']
children = [widgets.<MarkdownWidgetIfItExists>(content=content) for content in tab_contents]
tab = widgets.Tab()
tab.children = children
for i in range(len(children)):
    tab.set_title(i, str(i))
tab

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestresolved-lockedClosed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions