【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)
相关推荐
weixin199701080162 分钟前
[特殊字符]《跨境二手ERP对接Back Market:标准化API + 7~10工作日技术合规审核实录》(附Python源码)
开发语言·python·pandas
持敬chijing39 分钟前
Python-数据类型-列表
开发语言·python·青少年编程
2601_962301011 小时前
Python环境搭建及PyCharm破解使用技巧
python·pycharm·环境搭建·避坑技巧·破解使用
2601_962099463 小时前
Python中的find()函数:用法和示例
python·字符串·索引·子字符串·find函数
大圣编蚕3 小时前
Java StringWriter 详解:从入门到实战
java·开发语言·python
for_ever_love__4 小时前
python基础语法学习: requirements.txt
开发语言·python·学习
程序员清风4 小时前
FastAPI 入门:用 Python 快速开发现代后端服务
python·oracle·fastapi
SunnyDays10114 小时前
使用 Python 提取 Word 文档中的表格数据
python·word
for_ever_love__4 小时前
python基础语法学习: 动态类型
开发语言·python·学习
冰帆<4 小时前
DBViewer — 把数据库工作台,安装进浏览器
数据库·数据可视化·数据同步