当前位置:网站首页>Markdown editor Use of MD plug-in
Markdown editor Use of MD plug-in
2022-07-07 08:51:00 【HHYZBC】
Official website :
Editor.md - Open source online Markdown Editor (pandao.github.io)https://pandao.github.io/editor.md/index.html Configuration item :
var testEditor;
testEditor = editormd("test-editormd", {
placeholder:' This editor supports Markdown edit , Write on the left , Preview right ', // Default display text , There is no explanation here
width: "90%",
height: 640,
syncScrolling: "single",
path: "lib/js/editor.md-master/lib/", // Yours path route ( In the original resource file lib The location of the package in our project )
theme: "dark",// Toolbar theme
previewTheme: "dark",// Preview the theme
editorTheme: "pastel-on-dark",// Edit the theme
saveHTMLToTextarea: true,
emoji: false,
taskList: true,
tocm: true, // Using [TOCM]
tex: true, // Unlock the scientific formula TeX Language support , Off by default
flowChart: true, // Enable flow chart support , Off by default
sequenceDiagram: true, // Open the timing / Sequence diagram support , Off by default ,
toolbarIcons : function() { // Custom toolbar , More on that later
return editormd.toolbarModes['simple']; // full, simple, mini
},
});
// Just pick the useful ones on the top and write them
obtain Markdown Formatted text
document.querySelector('.editormd-markdown-textarea').value
obtain markdown Rendered articles
document.querySelector('.markdown-body').textContent,
Custom toolbar
Toolbars are divided into three groups ,full, simple, mini These three , You can choose , You can also set the toolbar freely , The free setting toolbar is written on the official website , Just introduce 3 Group .
t.toolbarModes={
full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],
simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],
mini:["undo","redo","|","watch","preview","|","help","info"]
}
Each tag represents a tool , You can also customize the toolbar by using the label above , Each tag specifically represents a tool that is not available on the official website , So you can only compare it with the toolbar
边栏推荐
- [kuangbin] topic 15 digit DP
- 9c09730c0eea36d495c3ff6efe3708d8
- 说一个软件创业项目,有谁愿意投资的吗?
- Compilation and linking of programs
- Explain Huawei's application market in detail, and gradually reduce 32-bit package applications and strategies in 2022
- 如何在图片的目标中添加目标的mask
- 联想混合云Lenovo xCloud:4大产品线+IT服务门户
- 数字三角形模型 AcWing 1027. 方格取数
- Input and output of floating point data (C language)
- 如何在快应用中实现滑动操作组件
猜你喜欢
Rapid integration of authentication services - harmonyos platform
[MySQL] detailed explanation of trigger content of database advanced
为什么要选择云原生数据库
[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
Greenplum 6.x build_ install
Greenplum6.x搭建_环境配置
NCS Chengdu New Electric interview Experience
平台化,强链补链的一个支点
What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
leetcode134. gas station
随机推荐
JS的操作
Required String parameter ‘XXX‘ is not present
Download and install orcale database11.2.0.4
What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
[Chongqing Guangdong education] organic electronics (Bilingual) reference materials of Nanjing University of Posts and Telecommunications
National SMS center number inquiry
Greenplum6.x监控软件搭建
Problems encountered in the use of go micro
NCS Chengdu New Electric interview Experience
Mock. JS usage details
Opencv converts 16 bit image data to 8 bits and 8 to 16
南京商品房买卖启用电子合同,君子签助力房屋交易在线网签备案
A bug using module project in idea
[wechat applet: cache operation]
[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
[machine learning] watermelon book data set_ data sharing
[step on the pit] Nacos registration has been connected to localhost:8848, no available server
[MySQL] detailed explanation of trigger content of database advanced
Routing information protocol rip
NCS Chengdu Xindian interview experience