【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)
相关推荐
曲幽1 分钟前
Flask数据库操作进阶:告别裸写SQL,用ORM提升开发效率
python·sql·sqlite·flask·web·sqlalchemy
程序员miki2 分钟前
多模态模型演变
人工智能·python·llm·多模态·vlm
编程大师哥3 分钟前
R 语言与 Python 数据分析核心区别:选型指南与场景适配
python·数据分析·r语言
shenzhenNBA3 分钟前
如何用python生成一定规则的序列号?
开发语言·python·sn·序列号
秋刀鱼 ..7 分钟前
第二届机器学习、计算智能与模式识别国际学术会议(MLCIPR 2025)
运维·人工智能·python·科技·机器学习·自动化
高洁019 分钟前
循环神经网络讲解(2)
人工智能·python·深度学习·神经网络·机器学习
Zzz 小生10 分钟前
Github-Langflow:可视化AI工作流构建平台,让AI应用开发更简单
人工智能·笔记·python·github
晨非辰14 分钟前
C++ 波澜壮阔 40 年:引用、内联函数与现代空指针,效率跃升三基石
运维·c++·人工智能·后端·python·深度学习
Batac_蝠猫15 分钟前
Mac 本地语音对话系统
python·语言模型