【Dash】Markdown

Markdown

While Dash exposes HTML through Dash HTML Components (dash.html ), it can be tedious to write your copy in HTML. For writing blocks of text, you can use the Markdown component in Dash Core Components (dash.dcc).

Dash apps can be written in Markdown. Dash uses the CommonMarkspecification of Markdown.

python 复制代码
from dash import Dash, html, dcc

app = Dash(__name__)

markdown_text = '''
### Dash and Markdown

Dash apps can be written in Markdown.
Dash uses the [ComonMark](http://commonmark.org/)
specification of Markdown.
Check out their [60 Second Markdown Tutorial](http://commonmark.org/help/)
if this is your first introduction to Markdown!
'''


app.layout = html.Div([
    dcc.Markdown(children=markdown_text)
])

if __name__ == '__main__':
    app.run(debug=True)
相关推荐
love530love10 分钟前
教程:PyCharm 中搭建多级隔离的 Poetry 环境(从 Anaconda 到项目专属.venv)
开发语言·ide·人工智能·windows·python·pycharm
Ian在掘金17 分钟前
bat+python实现easy connect自动连接
前端·python
midsummer_woo17 分钟前
【2025】pycharm 安装
ide·python·pycharm
AщYΘ28 分钟前
6.6 day38
python
老胖闲聊38 分钟前
Python ROS2【机器人中间件框架】 简介
python·中间件·机器人
咖啡配辣条1 小时前
Python基础09
python
超大力王1 小时前
DAY 45 超大力王爱学Python
开发语言·python
林-梦璃1 小时前
Python开发基础手语识别(基础框架版)
开发语言·python·手语识别
RockyRich2 小时前
突然无法调用scikit-learn、xgboost
python·机器学习·scikit-learn
真的很上进2 小时前
2025最全TS手写题之partial/Omit/Pick/Exclude/Readonly/Required
java·前端·vue.js·python·算法·react·html5