【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)
相关推荐
山楂树の22 分钟前
Python Pandas 数据处理:数据读取、筛选、清洗、排序与分组
开发语言·python·pandas
Logintern0940 分钟前
langgraph 图编译的聊天机器人
python·langgraph
xurileidian1 小时前
第 22 篇 · 边玩边学Python · 双等号与 is 不是一回事
开发语言·python·spring
钱栈up3 小时前
GitHub热榜实测|Sherlock:一个用户名搜遍全网
python·开源·github
geovindu3 小时前
python: Gradient Boosting
开发语言·后端·python·算法·boosting
Agent世界4 小时前
发布台账字段漂移:1265 条记录里 190 条没有标题
python·自动化运维
用户298698530145 小时前
Python 自动化处理 Word:按规则查找并高亮关键文本
python·api·编程语言
人工智能技术咨询.6 小时前
什么才算高质量数据集
python
DanCheng-studio6 小时前
毕业设计项目 机器视觉指纹识别特征对比算法(源码+论文)
python·毕业设计·毕设
梅雅达编程笔记7 小时前
一份 PDF 到底该拆成什么存进去:RAG 智能问答毕设数据库设计完整教程
python·flask·智能问答·毕设·向量数据库·rag·数据库设计