【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)
相关推荐
weixin_46244623几秒前
Python用Flask后端解析Excel图表,Vue3+ECharts前端动态还原(附全套代码)
前端·python·flask·echats
偷星星的贼117 分钟前
如何为开源Python项目做贡献?
jvm·数据库·python
秋刀鱼程序编程7 分钟前
Java基础入门(七)---异常处理
java·开发语言·python
二十雨辰10 分钟前
[python]-基础语法
python
小白学大数据10 分钟前
基于 Python 的知网文献批量采集与可视化分析
开发语言·爬虫·python·小程序
Ulyanov11 分钟前
PyVista战场可视化实战(一):构建3D战场环境的基础
开发语言·python·3d·tkinter·gui开发
fai厅的秃头姐!15 分钟前
01-python基础-day01python基础
python
深蓝电商API22 分钟前
Scrapy 爬虫监控:结合 Prometheus+Grafana 实践
爬虫·python·scrapy
薛不痒25 分钟前
项目:矿物分类(训练模型)
开发语言·人工智能·python·学习·算法·机器学习·分类
xixi092429 分钟前
selenium的安装配置
开发语言·python