当前位置:网站首页>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
边栏推荐
- Gson转换实体类为json时报declares multiple JSON fields named
- leetcode135. Distribute candy
- Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot
- Novice entry SCM must understand those things
- [machine learning] watermelon book data set_ data sharing
- FPGA knowledge accumulation [6]
- Componentspace2022, assertions, protocols, bindings, and configuration files
- 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
- oracle一次性说清楚,多种分隔符的一个字段拆分多行,再多行多列多种分隔符拆多行,最终处理超亿亿。。亿级别数据量
- 数字三角形模型 AcWing 275. 传纸条
猜你喜欢
Routing information protocol rip
Greenplum 6.x monitoring software setup
23 Chengdu instrument customization undertaking_ Discussion on automatic wiring method of PCB in Protel DXP
Laravel8 uses passport login and JWT (generate token)
Greenplum 6.x build_ Environment configuration
Compilation and linking of programs
Introduction to data fragmentation
联想混合云Lenovo xCloud:4大产品线+IT服务门户
如何在快应用中实现滑动操作组件
Arm GIC (IV) GIC V3 register class analysis notes.
随机推荐
实现自定义内存分配器
xray的简单使用
Frequently Asked Coding Problems
[step on the pit] Nacos registration has been connected to localhost:8848, no available server
Mountaineering team (DFS)
Image segmentation in opencv
Quick sorting (detailed illustration of single way, double way, three way)
路由信息协议——RIP
How to realize sliding operation component in fast application
[MySQL] detailed explanation of trigger content of database advanced
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
Other 7 features of TCP [sliding window mechanism ▲]
Required String parameter ‘XXX‘ is not present
阿里p8手把手教你,自动化测试应该如何实现多线程?赶紧码住
Problems encountered in the use of go micro
Mock.js用法详解
如何在HarmonyOS应用中集成App Linking服务
Greenplum 6.x build_ install
注解@ConfigurationProperties的三种使用场景
【微信小程序:缓存操作】