【Markdown】Markdown编辑器怎么用

白色玫瑰 程序猿

时间: 2023-07-11 阅读: 1 字数:21382

{}
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:\nMarkdown和扩展Markdown简洁的语法\n代码块高亮\n图片链接和图片上传\nLaTex数学公式\nUML序列图和流程图\n离线写博客\n导入导出Markdown文件\n丰富的快捷键\n快捷键\n加粗 Ctrl + B \n斜体 Ctrl + I \n引用 Ctrl

欢迎使用Markdown编辑器写博客

Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键
<hr>

快捷键

加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl + Q 插入链接 Ctrl + L 插入代码 Ctrl + K 插入图片 Ctrl + G 提升标题 Ctrl + H 有序列表 Ctrl + O 无序列表 Ctrl + U 横线 Ctrl + R 撤销 Ctrl + Z 重做 Ctrl + Y

Markdown及扩展

Markdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档,然后转换成格式丰富的HTML页面。 —— <a href="https://zh.wikipedia.org/wiki/Markdown" target="_blank" rel="noopener noreferrer"> [ 维基百科 ]</a>

使用简单的符号标识不同的标题,将某些文字标记为粗体或者斜体,创建一个<a href="http://www.csdn.net">链接</a>等,详细语法参考帮助?。

本编辑器支持 Markdown Extra ,  扩展了很多好用的功能。具体请参考<a href="https://github.com/jmcmanus/pagedown-extra" title="Pagedown Extra">Github</a>.

表格

Markdown Extra 表格语法:

<table> <thead> <tr> <th>项目</th> <th>价格</th> </tr> </thead> <tbody> <tr> <td>Computer</td> <td>$1600</td> </tr> <tr> <td>Phone</td> <td>$12</td> </tr> <tr> <td>Pipe</td> <td>$1</td> </tr> </tbody> </table>nn 可以使用冒号来定义对齐方式:

<table> <thead> <tr> <th align="left">项目</th> <th align="right">价格</th> <th align="center">数量</th> </tr> </thead> <tbody> <tr> <td align="left">Computer</td> <td align="right">1600 元</td> <td align="center">5</td> </tr> <tr> <td align="left">Phone</td> <td align="right">12 元</td> <td align="center">12</td> </tr> <tr> <td align="left">Pipe</td> <td align="right">1 元</td> <td align="center">234</td> </tr> </tbody> </table>nn### 定义列表

<dl> Markdown Extra 定义列表语法: 项目1 项目2 <dd> 定义 A </dd> <dd> 定义 B </dd> 项目3 <dd> 定义 C </dd> <dd>

定义 D

定义D内容

</dd> </dl>

代码块

代码块语法遵循标准markdown代码,例如:

@requires_authorization
def somefunc(param1='', param2=0):
   '''A docstring'''
   if param1 > param2: # interesting
      print 'Greater'
   return (param2 - param1 + 1) or None
class SomeClass:
   pass
>>> message = '''interpreter
... prompt'''

脚注

生成一个脚注<a href="#fn:footnote" id="fnref:footnote" title="See footnote" class="footnote">1</a>.

目录

用 [TOC]来生成目录:

<a href="#欢迎使用markdown编辑器写博客">欢迎使用Markdown编辑器写博客</a>

 <a href="#快捷键">快捷键</a>     <a href="#markdown及扩展">Markdown及扩展</a> 
  
  <a href="#表格">表格</a>      <a href="#定义列表">定义列表</a>      <a href="#代码块">代码块</a>      <a href="#脚注">脚注</a>      <a href="#目录">目录</a>      <a href="#数学公式">数学公式</a>      <a href="#uml-图">UML 图:</a>           <a href="#离线写博客">离线写博客</a>     <a href="#浏览器兼容">浏览器兼容</a>        

数学公式

使用MathJax渲染LaTex 数学公式,详见<a href="http://math.stackexchange.com/">math.stackexchange.com</a>.

行内公式,数学公式为: Γ(n)=(n−1)!∀n∈N Γ ( n ) = ( n − 1 ) ! ∀ n ∈ N <script type="math/tex" id="MathJax-Element-1">\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N</script>。 块级公式:

x=−b±b2−4ac−−−−−−−√2a x = − b ± b 2 − 4 a c 2 a

<script type="math/tex; mode=display" id="MathJax-Element-2"> x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} </script>

更多LaTex语法请参考 <a href="http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference">这儿</a>.

UML 图:

可以渲染序列图:

<svg height="270" version="1.1" width="462.0859375" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative; left: -0.6px; top: -0.625px;"> <desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> Created with Raphaël 2.1.2 </desc> <defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">

</path> <marker id="raphael-marker-endblock55-obj21" markerheight="5" markerwidth="5" orient="auto" refx="2.5" refy="2.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <use transform="rotate(180 2.5 2.5) scale(1,1)" stroke-width="1.0000" fill="#000" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></use> </marker> <marker id="raphael-marker-endblock55-obj27" markerheight="5" markerwidth="5" orient="auto" refx="2.5" refy="2.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <use transform="rotate(180 2.5 2.5) scale(1,1)" stroke-width="1.0000" fill="#000" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></use> </marker> </defs> <rect x="10" y="20" width="50.1875" height="40" rx="0" ry="0" fill="none" stroke="#000000" stroke-width="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <rect x="20.09375" y="30" width="30.1875" height="20" rx="0" ry="0" fill="#ffffff" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <text x="35.09375" y="40" text-anchor="middle" font-size="16px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: "Andale Mono", monospace; font-size: 16px;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 张三 </tspan> </text> <rect x="10" y="210" width="50.1875" height="40" rx="0" ry="0" fill="none" stroke="#000000" stroke-width="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <rect x="20.09375" y="220" width="30.1875" height="20" rx="0" ry="0" fill="#ffffff" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <text x="35.09375" y="230" text-anchor="middle" font-size="16px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: "Andale Mono", monospace; font-size: 16px;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 张三 </tspan> </text> </path> <rect x="195.4921875" y="20" width="50.796875" height="40" rx="0" ry="0" fill="none" stroke="#000000" stroke-width="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <rect x="205.078125" y="30" width="30.796875" height="20" rx="0" ry="0" fill="#ffffff" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <text x="220.890625" y="40" text-anchor="middle" font-size="16px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: "Andale Mono", monospace; font-size: 16px;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 李四 </tspan> </text> <rect x="195.4921875" y="210" width="50.796875" height="40" rx="0" ry="0" fill="none" stroke="#000000" stroke-width="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <rect x="205.078125" y="220" width="30.796875" height="20" rx="0" ry="0" fill="#ffffff" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <text x="220.890625" y="230" text-anchor="middle" font-size="16px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: "Andale Mono", monospace; font-size: 16px;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 李四 </tspan> </text> </path> <rect x="45.34375" y="75" width="165.28125" height="20" rx="0" ry="0" fill="#ffffff" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <text x="127.9921875" y="85" text-anchor="middle" font-size="16px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: "Andale Mono", monospace; font-size: 16px;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 嘿,小四儿, 写博客了没? </tspan> </text> </path> <rect x="240.890625" y="120" width="145.796875" height="30" rx="0" ry="0" fill="none" stroke="#000000" stroke-width="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <rect x="245.484375" y="125" width="135.796875" height="20" rx="0" ry="0" fill="#ffffff" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <text x="313.7890625" y="135" text-anchor="middle" font-size="16px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: "Andale Mono", monospace; font-size: 16px;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 李四愣了一下,说: </tspan> </text> <rect x="44.6875" y="165" width="165.796875" height="20" rx="0" ry="0" fill="#ffffff" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></rect> <text x="127.9921875" y="175" text-anchor="middle" font-size="16px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: middle; font-family: "Andale Mono", monospace; font-size: 16px;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 忙得吐血,哪有时间写。 </tspan> </text> </path> </svg>

或者流程图:

<svg height="378" version="1.1" width="144.6953125" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative; top: -0.825px;"> <desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> Created with Raphaël 2.1.2 </desc> <defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <marker id="raphael-marker-endblock33-obj36" markerheight="3" markerwidth="3" orient="auto" refx="1.5" refy="1.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <use transform="rotate(180 1.5 1.5) scale(0.6,0.6)" stroke-width="1.6667" fill="black" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></use> </marker> <marker id="raphael-marker-endblock33-obj37" markerheight="3" markerwidth="3" orient="auto" refx="1.5" refy="1.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <use transform="rotate(180 1.5 1.5) scale(0.6,0.6)" stroke-width="1.6667" fill="black" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></use> </marker> <marker id="raphael-marker-endblock33-obj38" markerheight="3" markerwidth="3" orient="auto" refx="1.5" refy="1.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <use transform="rotate(180 1.5 1.5) scale(0.6,0.6)" stroke-width="1.6667" fill="black" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></use> </marker> <marker id="raphael-marker-endblock33-obj40" markerheight="3" markerwidth="3" orient="auto" refx="1.5" refy="1.5" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> <use transform="rotate(180 1.5 1.5) scale(0.6,0.6)" stroke-width="1.6667" fill="black" stroke="none" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></use> </marker> </defs> <rect x="0" y="0" width="51.796875" height="40" rx="20" ry="20" fill="#ffffff" stroke="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="2" class="flowchart" id="st" transform="matrix(1,0,0,1,34.9492,14)"></rect> <text x="10" y="20" text-anchor="start" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-family: sans-serif; font-size: 14px; font-weight: normal;" id="stt" class="flowchartt" transform="matrix(1,0,0,1,34.9492,14)"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 开始 </tspan> </text> <rect x="0" y="0" width="81" height="40" rx="0" ry="0" fill="#ffffff" stroke="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="2" class="flowchart" id="op" transform="matrix(1,0,0,1,20.3477,118)"></rect> <text x="10" y="20" text-anchor="start" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-family: sans-serif; font-size: 14px; font-weight: normal;" id="opt" class="flowchartt" transform="matrix(1,0,0,1,20.3477,118)"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 我的操作 </tspan> </text> </path> <text x="33.423828125" y="30" text-anchor="start" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-family: sans-serif; font-size: 14px; font-weight: normal;" id="condt" class="flowchartt" transform="matrix(1,0,0,1,4,212)"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 确认? </tspan> <tspan dy="18" x="33.423828125" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></tspan> </text> <rect x="0" y="0" width="51" height="40" rx="20" ry="20" fill="#ffffff" stroke="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);" stroke-width="2" class="flowchart" id="e" transform="matrix(1,0,0,1,35.3477,336)"></rect> <text x="10" y="20" text-anchor="start" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-family: sans-serif; font-size: 14px; font-weight: normal;" id="et" class="flowchartt" transform="matrix(1,0,0,1,35.3477,336)"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> 结束 </tspan> </text> </path> </path> </path> <text x="65.84765625" y="282" text-anchor="start" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-family: sans-serif; font-size: 14px; font-weight: normal;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> yes </tspan> </text> </path> <text x="122.6953125" y="232" text-anchor="start" font-size="14px" stroke="none" fill="#000000" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-anchor: start; font-family: sans-serif; font-size: 14px; font-weight: normal;"> <tspan dy="6" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> no </tspan> </text> </svg>

关于 序列图 语法,参考 <a href="http://bramp.github.io/js-sequence-diagrams/">这儿</a>, 关于 流程图 语法,参考 <a href="http://adrai.github.io/flowchart.js/">这儿</a>.

离线写博客

即使用户在没有网络的情况下,也可以通过本编辑器离线写博客(直接在曾经使用过的浏览器中输入<a href="http://write.blog.csdn.net/mdeditor">write.blog.csdn.net/mdeditor</a>即可。Markdown编辑器使用浏览器离线存储将内容保存在本地。

用户写博客的过程中,内容实时保存在浏览器缓存中,在用户关闭浏览器或者其它异常情况下,内容不会丢失。用户再次打开浏览器时,会显示上次用户正在编辑的没有发表的内容。

博客发表后,本地缓存将被删除。 

用户可以选择 <i class="icon-disk"></i> 把正在写的博客保存到服务器草稿箱,即使换浏览器或者清除缓存,内容也不会丢失。

注意:虽然浏览器存储大部分时候都比较可靠,但为了您的数据安全,在联网后,请务必及时发表或者保存到服务器草稿箱。

浏览器兼容

目前,本编辑器对Chrome浏览器支持最为完整。建议大家使用较新版本的Chrome。 IE9以下不支持 IE9,10,11存在以下问题

不支持离线功能 IE9不支持文件导入导出 IE10不支持拖拽文件导入
<hr>

<hr>

这里是 脚注 的 内容. <a href="#fnref:footnote" title="Return to article" class="reversefootnote">↩</a>

原文地址:https://blog.csdn.net/liu_jiachen/article/details/76349931?ops_request_misc=&request_id=4950579111a547a3adacde0967d66392&biz_id=&utm_medium=distribute.pc_search_result.none-task-blog-2~all~koosearch~default-12-76349931-null-null.142^v88^insert_down28v1,239^v2^insert_chatgpt&utm_term=markdown

本文章网址:https://www.sjxi.cn/detil/8968218765174faf8d69d96d36f1124d

最新评论

当前未登陆哦
登陆后才可评论哦

湘ICP备2021009447号

×

(穷逼博主)在线接单

QQ: 1164453243

邮箱: abcdsjx@126.com

前端项目代做
前后端分离
Python 爬虫脚本
Java 后台开发
各种脚本编写
服务器搭建
个人博客搭建
Web 应用开发
Chrome 插件编写
Bug 修复