当前位置:网站首页>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
边栏推荐
- Image segmentation in opencv
- 年薪50w阿裏P8親自下場,教你如何從測試進階
- How to integrate app linking services in harmonyos applications
- Pointer advanced, string function
- [step on the pit] Nacos registration has been connected to localhost:8848, no available server
- Compilation and linking of programs
- NCS Chengdu Xindian interview experience
- Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
- Qt Charts使用(重写QChartView,实现一些自定义功能)
- 关于基于kangle和EP面板使用CDN
猜你喜欢
最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
[Yugong series] February 2022 U3D full stack class 005 unity engine view
What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
ncs成都新电面试经验
Greenplum 6.x build_ install
Arm GIC (IV) GIC V3 register class analysis notes.
AVL balanced binary search tree
Appeler l'interface du moteur de création du service multimédia de jeu Huawei renvoie le Code d'erreur 1002, le message d'erreur: les paramètres sont l'erreur
About using CDN based on Kangle and EP panel
A bug using module project in idea
随机推荐
说一个软件创业项目,有谁愿意投资的吗?
详解华为应用市场2022年逐步减少32位包体上架应用和策略
Golan idea IntelliJ cannot input Chinese characters
opencv之图像分割
数字三角形模型 AcWing 1027. 方格取数
What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
[step on the pit] Nacos registration has been connected to localhost:8848, no available server
How to integrate app linking services in harmonyos applications
Data analysis methodology and previous experience summary 2 [notes dry goods]
Why choose cloud native database
Qt Charts使用(重写QChartView,实现一些自定义功能)
Enterprise manager cannot connect to the database instance
Greenplum 6.x version change record common manual
Uniapp wechat applet monitoring network
ncs成都新电面试经验
Frequently Asked Coding Problems
go写一个在一定时间内运行的程序
POJ - 3784 running medium
ncs成都新電面試經驗