当前位置:网站首页>Markdown编辑器Editor.md插件的使用
Markdown编辑器Editor.md插件的使用
2022-07-07 06:11:00 【HHYZBC】
官网:
Editor.md - 开源在线 Markdown 编辑器 (pandao.github.io)
https://pandao.github.io/editor.md/index.html配置项:
var testEditor;
testEditor = editormd("test-editormd", {
placeholder:'本编辑器支持Markdown编辑,左边编写,右边预览', //默认显示的文字,这里就不解释了
width: "90%",
height: 640,
syncScrolling: "single",
path: "lib/js/editor.md-master/lib/", //你的path路径(原资源文件中lib包在我们项目中所放的位置)
theme: "dark",//工具栏主题
previewTheme: "dark",//预览主题
editorTheme: "pastel-on-dark",//编辑主题
saveHTMLToTextarea: true,
emoji: false,
taskList: true,
tocm: true, // Using [TOCM]
tex: true, // 开启科学公式TeX语言支持,默认关闭
flowChart: true, // 开启流程图支持,默认关闭
sequenceDiagram: true, // 开启时序/序列图支持,默认关闭,
toolbarIcons : function() { //自定义工具栏,后面有详细介绍
return editormd.toolbarModes['simple']; // full, simple, mini
},
});
//上面的挑有用的写上去就行获取Markdown格式的文本
document.querySelector('.editormd-markdown-textarea').value 获取markdown渲染过的文章
document.querySelector('.markdown-body').textContent,自定义工具栏
工具栏分为三组,full, simple, mini这三个,可以选择,也可以自由的设置工具栏,自由的设置工具栏在官网中有写,在这里就只介绍3组。
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"]
}每一个标签表示一个工具,也可以随意使用上面的标签自定义工具栏,每个标签具体表示的工具官网上没有,所以只能与工具栏对照一下才行了
边栏推荐
- iptables 之 state模块(ftp服务练习)
- 2-3查找樹
- [step on the pit] Nacos registration has been connected to localhost:8848, no available server
- [Yugong series] February 2022 U3D full stack class 005 unity engine view
- [南京大学]-[软件分析]课程学习笔记(一)-introduction
- Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
- Image segmentation in opencv
- 【微信小程序:缓存操作】
- Input and output of floating point data (C language)
- 指针进阶,字符串函数
猜你喜欢

Greenplum6.x-版本变化记录-常用手册

Input of mathematical formula of obsidan
![Other 7 features of TCP [sliding window mechanism ▲]](/img/ff/c3f52a7b89804acfd0c4f3b78bc4a0.jpg)
Other 7 features of TCP [sliding window mechanism ▲]
![Data analysis methodology and previous experience summary 2 [notes dry goods]](/img/e1/643e847a777e1effcbd39f8b009e2b.png)
Data analysis methodology and previous experience summary 2 [notes dry goods]

leetcode135. Distribute candy

Oracle makes it clear at one time that a field with multiple separators will be split into multiple rows, and then multiple rows and columns. Multiple separators will be split into multiple rows, and

MySQL introduction - crud Foundation (establishment of the prototype of the idea of adding, deleting, changing and searching)

Exercise arrangement 2.10, 11

Greenplum6.x监控软件搭建

下载和安装orcale database11.2.0.4
随机推荐
Gson converts the entity class to JSON times declare multiple JSON fields named
What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
AVL balanced binary search tree
Image segmentation in opencv
Database storage - table partition
[hard core science popularization] working principle of dynamic loop monitoring system
Required String parameter ‘XXX‘ is not present
[南京大学]-[软件分析]课程学习笔记(一)-introduction
let const
Arm GIC (IV) GIC V3 register class analysis notes.
Calling the creation engine interface of Huawei game multimedia service returns error code 1002, error message: the params is error
MySQL introduction - crud Foundation (establishment of the prototype of the idea of adding, deleting, changing and searching)
調用華為遊戲多媒體服務的創建引擎接口返回錯誤碼1002,錯誤信息:the params is error
Greenplum 6.x monitoring software setup
Three series of BOM elements
Sign and authenticate API interface or H5 interface
Download and install orcale database11.2.0.4
POJ - 3616 Milking Time(DP+LIS)
What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
Routing information protocol rip