【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)
相关推荐
小徐学编程-zZ1 小时前
量产测试数据
python·压力测试·数据库架构
QQ8057806511 小时前
django基于机器学习的电商评论情感分析系统设计实现
python·机器学习·django
wx09091 小时前
stata实现机器学习的环境配置
python·机器学习·stata
nuowenyadelunwen3 小时前
CS 61A Lab 2 笔记:短路求值、高阶函数与 Lambda 表达式
python·函数式编程·cs61a·berkeley
qq_422828624 小时前
android图形学之SurfaceControl和Surface的关系 五
android·开发语言·python
weixin_444012934 小时前
c++如何将std--vector直接DUMP到二进制文件_指针地址直写【附代码】
jvm·数据库·python
woxihuan1234564 小时前
Go语言中--=运算符详解:位右移赋值操作的原理与应用
jvm·数据库·python
石山代码4 小时前
Python 数据分析三大库:NumPy + Pandas + Matplotlib
python·数据分析·numpy
如竟没有火炬4 小时前
用队列实现栈
开发语言·数据结构·python·算法·leetcode·深度优先
yivifu5 小时前
CustomTkinter的布局管理器介绍及应用
python·gui·customtkinter·pdf去水印