index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Editor.md examples</title>
  6. <link rel="stylesheet" href="css/style.css" />
  7. <link rel="stylesheet" href="../css/editormd.css" />
  8. <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon" />
  9. <style>
  10. #layout {
  11. padding-bottom: 100px;
  12. }
  13. #header {
  14. width: 100%;
  15. color: #fff;
  16. background: #2196F3;
  17. padding: 60px 0;
  18. text-align: center;
  19. margin-bottom: 30px;
  20. }
  21. a {
  22. color: #2196F3;
  23. text-decoration: none;
  24. }
  25. #header h1 {
  26. font-size: 45px;
  27. font-weight: normal;
  28. }
  29. ul {
  30. width: 90%;
  31. padding-bottom:30px;
  32. margin: 0 auto;
  33. list-style: none;
  34. }
  35. ul li {
  36. width: 24%;
  37. margin-bottom: 4px;
  38. display: inline-block;
  39. }
  40. ul li a {
  41. color: #2196F3;
  42. display: block;
  43. padding: 4px 15px;
  44. font-size: 14px;
  45. text-align: left;
  46. text-decoration: none;
  47. -webkit-transition: all 300ms ease-out;
  48. transition: all 300ms ease-out;
  49. }
  50. ul li a span {
  51. color: #999;
  52. display: block;
  53. padding-top: 3px;
  54. font-size: 80%;
  55. }
  56. ul li a:hover {
  57. color: #fff;
  58. background: #2196F3;
  59. border-radius: 8px;
  60. }
  61. ul li a:hover span {
  62. color: #fff;
  63. }
  64. .category, .footer {
  65. width: 90%;
  66. padding: 15px;
  67. font-size: 18px;
  68. margin: 15px auto 20px;
  69. border-bottom: 1px solid #eee;
  70. }
  71. .footer {
  72. border: none;
  73. border-top: 1px solid #eee;
  74. font-size: 12px;
  75. margin-top: 30px;
  76. padding-top: 35px;
  77. text-align: right;
  78. }
  79. .menu {
  80. margin-top: 20px;
  81. text-align: center;
  82. }
  83. .menu a {
  84. color: #fff;
  85. display: inline-block;
  86. text-decoration: none;
  87. padding: 8px 15px;
  88. border-radius: 5px;
  89. -webkit-transition: background-color 300ms ease-out;
  90. transition: background-color 300ms ease-out;
  91. }
  92. .menu a:hover {
  93. background-color: #1A8BE8;
  94. }
  95. [href="#top"] {
  96. color: #999;
  97. float: right;
  98. padding-top: 10px;
  99. display: block;
  100. text-decoration: none;
  101. font-size: 12px;
  102. font-weight: normal;
  103. }
  104. [href="#top"] .fa {
  105. margin-left: 8px;
  106. font-size: 1.4em;
  107. }
  108. </style>
  109. </head>
  110. <body>
  111. <a name="top"></a>
  112. <div id="layout">
  113. <div id="header">
  114. <h1><i class="editormd-logo editormd-logo-3x"></i></h1>
  115. <h1>Editor.md Examples</h1>
  116. <p>Open source online markdown editor.</p>
  117. <div class="menu">
  118. <a href="#basic">Basic</a>
  119. <a href="#customs">自定义 Customs</a>
  120. <a href="#markdown-extras">Markdown Extras</a>
  121. <a href="#image-upload">Image Upload</a>
  122. <a href="#events">事件处理 Events handle</a>
  123. </div>
  124. </div>
  125. <h1 class="category"><a name="basic"></a>Basic</h1>
  126. <ul>
  127. <li>
  128. <a href="./simple.html">简单示例 <span>Simple example</span></a>
  129. </li>
  130. <li>
  131. <a href="./full.html">完整示例 <span>Full example</span></a>
  132. </li>
  133. <li>
  134. <a href="./use-requirejs.html">使用 Require.js <span>Using Require.js</span></a>
  135. </li>
  136. <li>
  137. <a href="./use-seajs.html">使用 Sea.js <span>Using Seajs</span></a>
  138. </li>
  139. <li>
  140. <a href="./use-zepto.html">使用 Zepto.js <span>Using Zepto.js</span></a>
  141. </li>
  142. <li>
  143. <a href="./form-get-value.html">表单取值 <span>Get textarea value in form</span></a>
  144. </li>
  145. <li>
  146. <a href="./html-preview-markdown-to-html.html">非编辑时 Markdown 转 HTML 的显示处理 <span>Markdown to HTML for preview</span></a>
  147. </li>
  148. </ul>
  149. <h1 class="category">
  150. <a href="#top">TOP<i class="fa fa-angle-up"></i></a>
  151. <a name="customs"></a>自定义 Customs
  152. </h1>
  153. <ul>
  154. <li>
  155. <a href="./custom-toolbar.html">自定义工具栏 <span>Custom toolbar</span></a>
  156. </li>
  157. <li>
  158. <a href="./multi-languages.html">多语言 <span>Multi-languages for l18n</span></a>
  159. </li>
  160. <li>
  161. <a href="./auto-height.html">自动高度 <span>Auto height</span></a>
  162. </li>
  163. <li>
  164. <a href="./toolbar-auto-fixed.html">工具栏自动固定定位的开启与禁用 <span>Enable / disable toolbar auto fixed position.</span></a>
  165. </li>
  166. <li>
  167. <a href="./dynamic-create-editormd.html">动态创建 Editor.md <span>Dynamic create Editor.md</span></a>
  168. </li>
  169. <li>
  170. <a href="./delay-renderer-preview.html">延迟解析和预览 <span>Delay Rerender & Preview</span></a>
  171. </li>
  172. <li>
  173. <a href="./multi-editormd.html">多个 Editor.md 并存 <span>Multi Editor.md</span></a>
  174. </li>
  175. <li>
  176. <a href="./goto-line.html">跳转到指定的行 <span>Goto line</span></a>
  177. </li>
  178. <li>
  179. <a href="./readonly.html">只读模式 <span>Read only mode</span></a>
  180. </li>
  181. <li>
  182. <a href="./themes.html">自定义编辑器样式主题 <span>Setting / change editor style theme</span></a>
  183. </li>
  184. <li>
  185. <a href="./search-replace.html">搜索替换功能 <span>Search / Replace</span></a>
  186. </li>
  187. <li>
  188. <a href="./code-fold.html">代码折叠功能 <span>Code fold</span></a>
  189. </li>
  190. <li>
  191. <a href="./custom-keyboard-shortcuts.html">自定义键盘快捷键 <span>Custom keyboard shortcuts</span></a>
  192. </li>
  193. <li>
  194. <a href="./define-plugin.html">自定义插件 <span>Define extention plugins for Editor.md</span></a>
  195. </li>
  196. <li>
  197. <a href="./manually-load-modules.html">手动加载依赖模块文件 <span>Manually loading dependent module files.</span></a>
  198. </li>
  199. <li>
  200. <a href="./sync-scrolling.html">双向、单向或禁用同步滚动 <span>Bisync, Single, Disabled sync scrolling</span></a>
  201. <li>
  202. <li>
  203. <a href="./external-use.html">外部使用工具栏的操作方法和对话框 <span>External use of toolbar handlers / modal dialog</span></a>
  204. </li>
  205. <li>
  206. <a href="./resettings.html">加载完成且创建成功之后的重配置 <span>loaded resettings</span></a>
  207. </li>
  208. <li>
  209. <a href="./change-mode.html">变身为代码编辑器 <span>Change mode become to the code editor</span></a>
  210. </li>
  211. <li>
  212. <a href="./set-get-replace-selection.html">插入字符 / 设置和获取光标位置 / 设置、获取和替换选中的文本 <span>Insert value & Set / Get cursor & Set / Get / Replace selection</span></a>
  213. </li>
  214. <li>
  215. <a href="./extends.html">扩展成员方法和属性 <span>Expanded of member methods and properties</span></a>
  216. </li>
  217. </ul>
  218. <h1 class="category">
  219. <a href="#top">TOP<i class="fa fa-angle-up"></i></a>
  220. <a name="markdown-extras"></a>Markdown Extras
  221. </h1>
  222. <ul>
  223. <li>
  224. <a href="./html-tags-decode.html">识别和(过滤)解析 HTML 标签 <span>HTML tags (fliter) decode</span></a>
  225. </li>
  226. <li>
  227. <a href="./toc.html">自动生成目录(下拉菜单) ToC / ToCM <span>Table of Contents (ToC)</span></a>
  228. </li>
  229. <li>
  230. <a href="./task-lists.html">GFM 任务列表 <span>Github Flavored Markdown (GFM) Task Lists</span></a>
  231. </li>
  232. <li>
  233. <a href="./@links.html">@链接 <span>@links</span></a>
  234. </li>
  235. <li>
  236. <a href="./emoji.html">Emoji / Twemoji 表情 / Font Awesome 图标 <span>Emoji / Twemoji / Font Awesome icons</span></a>
  237. </li>
  238. <li>
  239. <a href="./katex.html">科学公式 TeX <span>TeX / LaTeX (Based on KaTeX)</span> </a>
  240. </li>
  241. <li>
  242. <a href="./flowchart.html">流程图 <span>FlowChart example</span></a>
  243. </li>
  244. <li>
  245. <a href="./sequence-diagram.html">时序图 / 序列图 <span>Sequence Diagram example</span></a>
  246. </li>
  247. <li>
  248. <a href="./page-break.html">分页符 <span>Page break</span></a>
  249. </li>
  250. </ul>
  251. <h1 class="category">
  252. <a href="#top">TOP<i class="fa fa-angle-up"></i></a>
  253. <a name="image-upload"></a>Image Upload
  254. </h1>
  255. <ul>
  256. <li>
  257. <a href="./image-upload.html">图片上传 <span>Image upload</span></a>
  258. </li>
  259. <li>
  260. <a href="./image-cross-domain-upload.html">图片跨域上传 <span>Image cross-domain upload</span></a>
  261. </li>
  262. </ul>
  263. <h1 class="category">
  264. <a href="#top">TOP<i class="fa fa-angle-up"></i></a>
  265. <a name="events"></a>事件处理 Events handle
  266. </h1>
  267. <ul>
  268. <li>
  269. <a href="./on-off.html">事件注册和解除方法 <span>On / Off (bind/unbind) event handle</span></a>
  270. </li>
  271. <li>
  272. <a href="./onload.html">加载完成事件处理 <span>Onload event handle example</span></a>
  273. </li>
  274. <li>
  275. <a href="./onchange.html">变化监听处理 <span>Onchange event handle example</span></a>
  276. </li>
  277. <li>
  278. <a href="./onfullscreen.html">全屏事件处理 <span>Onfullscreen / onfullscreenExit event handle example</span></a>
  279. </li>
  280. <li>
  281. <a href="./onresize.html">Onresize<span>Onresize event handle</span></a>
  282. </li>
  283. <li>
  284. <a href="./onpreviewing-onpreviewed.html">Onpreviewing / Onpreviewed<span>Onpreviewing / Onpreviewed event handle</span></a>
  285. </li>
  286. <li>
  287. <a href="./onwatch-onunwatch.html">Onwatch / Onunwatch<span>Onwatch / Onunwatch event handle</span></a>
  288. </li>
  289. <li>
  290. <a href="./onscroll-onpreviewscroll.html">Onscroll / Onpreviewscroll<span>Onscroll / Onpreviewscroll event handle</span></a>
  291. </li>
  292. </ul>
  293. <div class="clear"></div>
  294. <div class="footer">
  295. <p>
  296. <a href="https://pandao.github.io/editor.md/" target="_blank" title="Editor.md">
  297. <img src="https://pandao.github.io/editor.md/images/logos/editormd-logo-64x64.png"/>
  298. </a>
  299. </p>
  300. <p>Copyright &copy; 2015 <a href="https://pandao.github.io/editor.md/" target="_blank" title="Editor.md">Editor.md</a></p>
  301. <p>Open source online markdown editor. <a href="https://github.com/pandao/editor.md" class="fa fa-github fa-lg" target="_blank" title="Editor.md in Github"></a></p>
  302. <p>The <a href="https://github.com/pandao/editor.md/blob/master/LICENSE" target="_blank">MIT</a> license</p>
  303. </div>
  304. </div>
  305. <script src="js/jquery.min.js"></script>
  306. <script>
  307. var clickOrTouch = function(touchType) {
  308. touchType = touchType || "touchend";
  309. var eventType = "click";
  310. try {
  311. document.createEvent("TouchEvent");
  312. eventType = touchType;
  313. } catch(e) {}
  314. return eventType;
  315. };
  316. $(function() {
  317. $("a[href*=#]").bind(clickOrTouch(), function() {
  318. if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname)
  319. {
  320. var hash = this.hash;
  321. var target = $(hash);
  322. target = target.length && target || $("[name=" + hash.slice(1) + "]");
  323. if (target.length)
  324. {
  325. $("html, body").animate({
  326. scrollTop: target.offset().top
  327. }, 800);
  328. return false;
  329. }
  330. }
  331. });
  332. });
  333. </script>
  334. </body>
  335. </html>