【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)
相关推荐
习明然11 小时前
我的本地化AI项目(三)
人工智能·python·electron·c#·avalonia
喜欢的名字被抢了11 小时前
Python实战:SQLAlchemy ORM与FastAPI项目集成
开发语言·python·sql·教程·fastapi
夏季疯13 小时前
读论文:STARS 是什么结构?一个统一的歌声自动标注框架
python
光测实验室14 小时前
3种Python降噪算法实测:我把处理速度提升了20倍
python
AOwhisky14 小时前
Python 学习笔记(第三期)——流程控制核心知识点自测与详解
开发语言·笔记·python·学习·云原生·运维开发·流程控制
爱吃提升14 小时前
Python桌面自动化PyAutoGUI完整实战教程:模拟鼠标键盘、窗口操作、图形识别自动化
python·自动化·计算机外设
花花无缺15 小时前
Windows 定时执行 Python 脚本方案
python·操作系统·命令行
流云鹤16 小时前
1. 配置环境、创建导航栏
python·django
三亚兴嘉装饰16 小时前
准备在三亚装房子找哪家装修
python
Mx_coder16 小时前
8年Java开发者AI转型第二周:RAG系统深入 + 向量数据库实战(Day 8-10)
python