Skip to main content

Markdown

Use markup language for creating formatted text.

app.markdown
app.markdown(body, line_numbers=False)

Parameters

ParameterDescription
body (str)Markdown text
line_numbersEnables / Disables line numbers.
cssClassName (str)HTML class attribute
cssStyles (Dict[str, Any])CSS properties

Example

The example below shows how to create a basic markdown widget.

from shapelets.apps import dataApp, markdown

# Set up the app
app = dataApp()

# Set the title of the app
app.title('Markdown Example App')

# A sample markdown text
sample_md = """
# Markdown Description

This is a sample markdown text. You can write text using **bold** formatting, as well as *italic* formatting.

## Lists

### Unordered List
- First item
- Second item
- Third item
- Subitem 1
- Subitem 2

### Ordered List
1. First element
2. Second element
1. Sub-element 1
2. Sub-element 2
3. Third element

## Links and Images

Here is a [link to Shapelets](https://shapelets.io/).

![Python Logo](https://www.python.org/static/community_logos/python-logo.png)
"""
markdown_component = app.markdown(body=sample_md, line_numbers=True)

Shapelets Basic Input
Shapelets 2024