Browse Source

Releases v1.1.8

v1.1.9 v1.1.8
Pandao 10 years ago
parent
commit
20240507f6
  1. 14
      CHANGE.md
  2. 2
      bower.json
  3. 2
      dist/css/editormd.css
  4. 2
      dist/css/editormd.css.map
  5. 2
      dist/css/editormd.css.min.map
  6. 2
      dist/css/editormd.logo.css
  7. 2
      dist/css/editormd.logo.css.map
  8. 2
      dist/css/editormd.logo.css.min.map
  9. 2
      dist/css/editormd.logo.min.css
  10. 2
      dist/css/editormd.min.css
  11. 2
      dist/css/editormd.preview.css
  12. 2
      dist/css/editormd.preview.css.map
  13. 2
      dist/css/editormd.preview.css.min.map
  14. 2
      dist/css/editormd.preview.min.css
  15. 21
      dist/js/editormd.js
  16. 4
      dist/js/editormd.min.js
  17. 2
      dist/js/languages/en.js
  18. 2
      dist/js/languages/en.min.js
  19. 2
      dist/js/languages/zh-tw.js
  20. 2
      dist/js/languages/zh-tw.min.js
  21. 2
      docs/html/index.html
  22. 2
      examples/custom-toolbar.html
  23. 2
      examples/dynamic-create-editormd.html
  24. 2
      examples/flowchart.html
  25. 2
      examples/form-get-value.html
  26. 2
      examples/full.html
  27. 2
      examples/html-preview-markdown-to-html.html
  28. 2
      examples/html-tags-decode.html
  29. 2
      examples/image-cross-domain-upload.html
  30. 2
      examples/image-upload.html
  31. 0
      examples/js/jquery.min.js
  32. 2
      examples/katex.html
  33. 2
      examples/multi-editormd.html
  34. 2
      examples/multi-languages.html
  35. 2
      examples/onchange.html
  36. 2
      examples/onfullscreen.html
  37. 3
      examples/onload.html
  38. 2
      examples/readonly.html
  39. 2
      examples/sequence-diagram.html
  40. 2
      examples/set-get-replace-selection.html
  41. 2
      examples/simple.html
  42. 2
      examples/toc.html
  43. 4
      examples/use-requirejs.html
  44. 4
      examples/use-seajs.html
  45. 2
      lib/codemirror/addons.min.js
  46. 2
      lib/codemirror/modes.min.js
  47. 4
      lib/font-awesome.min.css
  48. 664
      lib/github-markdown.css
  49. 2
      package.json
  50. 19
      src/js/editormd.js

14
CHANGE.md

@ -184,4 +184,16 @@
- 修改了`saveToTextareas()`方法;
- 新增`state.loaded`和`state.watching`两个属性;
- 修改了以上Bug相关示例文件;
- 修改了以上Bug相关示例文件;
#####v1.1.8
改进功能,具体如下:
- 改进[#27](https://github.com/pandao/editor.md/issues/27);
- 新增配置项`matchWordHighlight`,可选值有:`true, false, "onselected"`,默认值为`true`,即开启自动匹配和标示相同单词;
- 改进[#28](https://github.com/pandao/editor.md/issues/28);
- 将`jquery.min.js`、`font-awesome.min.css`、`github-markdown.css`移除(这是一个疏忽,它们不是动态加载的依赖模块或者不需要的,避免不必要的硬盘空间占用);
- 修改了所有相关的示例文件;

2
bower.json

@ -1,6 +1,6 @@
{
"name": "editor.md",
"version": "1.1.7",
"version": "1.1.8",
"homepage": "https://github.com/pandao/editor.md",
"authors": [
"Pandao <pandao@vip.qq.com>"

2
dist/css/editormd.css

@ -1,7 +1,7 @@
/*
* Editor.md
* @file editormd.css
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/css/editormd.css.map

@ -1,7 +1,7 @@
/*
* Editor.md
* @file editormd.css.map
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/css/editormd.css.min.map

File diff suppressed because one or more lines are too long

2
dist/css/editormd.logo.css

@ -1,7 +1,7 @@
/*
* Editor.md
* @file editormd.logo.css
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/css/editormd.logo.css.map

@ -1,7 +1,7 @@
/*
* Editor.md
* @file editormd.logo.css.map
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/css/editormd.logo.css.min.map

@ -1,2 +1,2 @@
/*! Editor.md v1.1.7 | editormd.logo.css.min.map | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
/*! Editor.md v1.1.8 | editormd.logo.css.min.map | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
{"version":3,"mappings":"AAKA,UASC;EARA,WAAW,EAAE,eAAe;EAC5B,GAAG,EAAC,yCAAyC;EAC7C,GAAG,EAAC,sQAA4E;EAIhF,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;;AAGnB,cAAe;EACd,WAAW,EAAE,eAAe;EAC5B,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACjB,SAAS,EAAE,OAAO;EACrB,WAAW,EAAE,CAAC;EACX,OAAO,EAAE,YAAY;EACrB,cAAc,EAAE,IAAI;EACpB,cAAc,EAAE,OAAO;EAG1B,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;;AAE/B,qBAAS;EACL,OAAO,EAAE,QAAQ;;;;;;;AAQzB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,iBAAkB;EACd,SAAS,EAAE,KAAK;;;AAGpB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,iBAAkB;EACd,SAAS,EAAE,GAAG;;;AAGlB,oBAAqB;EACjB,KAAK,ECxEO,OAAU","sources"["../editormd.logo.scss","file:///D:/APMServ/www/htdocs/editor.md/src/scss/lib/variables.scss"],"names"[],"file":"editormd.logo.css"}

2
dist/css/editormd.logo.min.css

@ -1,2 +1,2 @@
/*! Editor.md v1.1.7 | editormd.logo.min.css | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
/*! Editor.md v1.1.8 | editormd.logo.min.css | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h) format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h) format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h) format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon) format("svg");font-weight:400;font-style:normal}.editormd-logo{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3}

2
dist/css/editormd.min.css

@ -1,4 +1,4 @@
/*! Editor.md v1.1.7 | editormd.min.css | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
/*! Editor.md v1.1.8 | editormd.min.css | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
@charset "UTF-8";/*!
* Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)

2
dist/css/editormd.preview.css

@ -1,7 +1,7 @@
/*
* Editor.md
* @file editormd.preview.css
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/css/editormd.preview.css.map

@ -1,7 +1,7 @@
/*
* Editor.md
* @file editormd.preview.css.map
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/css/editormd.preview.css.min.map

File diff suppressed because one or more lines are too long

2
dist/css/editormd.preview.min.css

File diff suppressed because one or more lines are too long

21
dist/js/editormd.js

@ -1,7 +1,7 @@
/*
* Editor.md
* @file editormd.js
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao
@ -12,7 +12,7 @@
/**
* @fileOverview Editor.md
* @author pandao
* @version 1.1.7
* @version 1.1.8
*/
;(function(factory) {
@ -55,7 +55,7 @@
};
editormd.title = editormd.$name = "Editor.md";
editormd.version = "1.1.7";
editormd.version = "1.1.8";
editormd.homePage = "https://pandao.github.io/editor.md/";
editormd.classPrefix = "editormd-";
@ -69,7 +69,8 @@
placeholder : "now coding markdown...",
readOnly : false,
lineNumbers : true,
styleActiveLine : true, // 高亮显示当前行
matchWordHighlight : true, // options: true, false, "onselected"
styleActiveLine : true, // Highlight the current line
dialogLockScreen : true,
dialogShowMask : true,
dialogDraggable : true,
@ -86,9 +87,9 @@
uploadCallbackURL : "",
saveHTMLToTextarea : false,
toc : true,
tocStartLevel : 1, // 表示从H1开始生成ToC
tocStartLevel : 1, // Said from H1 to create ToC
fontSize : "13px",
htmlDecode : false, // 是否开启HTML标签识别
htmlDecode : false, // Open the HTML tag identification
tex : false,
flowChart : false, // flowChart.js only support IE9+
sequenceDiagram : false, // sequenceDiagram.js only support IE9+
@ -107,7 +108,7 @@
]
},
toolbarTitles : {},
toolbarHandlers : {}, // 工具栏按钮的点击后事件处理
toolbarHandlers : {},
toolbarIconsClass : {
undo : "fa-undo",
@ -442,9 +443,9 @@
styleSelectedText : true,
autoCloseBrackets : true,
showTrailingSpace : true,
highlightSelectionMatches : {
showToken: /\w/
}
highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : {
showToken: (settings.matchWordHighlight == "onselected") ? false : /\w/
})
};
this.codeEditor = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig);

4
dist/js/editormd.min.js

File diff suppressed because one or more lines are too long

2
dist/js/languages/en.js

@ -1,7 +1,7 @@
/*
* Editor.md
* @file languages\en.js
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/js/languages/en.min.js

@ -1,2 +1,2 @@
/*! Editor.md v1.1.7 | languages\en.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
/*! Editor.md v1.1.8 | languages\en.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
!function(){var e=function(e){var t={name:"en",description:"A simple markdown doucment online editor.",toolbar:{undo:"Undo(Ctrl+Z)",redo:"Redo(Ctrl+Y)",bold:"Bold",del:"Strikethrough",italic:"Italic",quote:"Block quote",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6","list-ul":"Unordered list","list-ol":"Ordered list",hr:"Horizontal line",link:"Link",anchor:"Anchor",image:"Image",code:"Code inline","code-block-tab":"Preformatted text / Code block (Tab indent)","code-block":"Code block (Multi-languages)",datetime:"Datetime",watch:"Unwatch",unwatch:"Watch",preview:"HTML Preview (Enter ESC exit)",fullscreen:"Fullscreen (Enter ESC exit)",clear:"Clear",info:"About "+e.title},buttons:{enter:"Enter",cancel:"Cancel"},dialog:{link:{title:"Link",url:"Address",urlTitle:"Title",urlEmpty:"Error: Please fill in the link address.",titleEmpty:"Error: Please fill in the link title."},anchor:{title:"Anchor link",name:"Name",url:"Address",urlTitle:"Title",nameEmpty:"Error: anchor name can't be empty.",titleEmpty:"Error: Please fill in anchor link title.",urlEmpty:"Error: Please fill in anchor link."},image:{title:"Image",url:"Address",link:"Link",alt:"Title",uploadButton:"Upload",imageURLEmpty:"Error: picture url address can't be empty.",uploadFileEmpty:"Error: upload pictures cannot be empty!",formatNotAllowed:"Error: only allows to upload pictures file, upload allowed image file format:"},tabCodeBlock:{title:"Preformatted text / Codes",codeEmptyAlert:"Error: Please fill in the Preformatted text or content of the codes."},codeBlock:{title:"Code block",selectLabel:"Languages: ",selectDefaultText:"select a code language...",otherLanguage:"Other languages",unselectedLanguageAlert:"Error: Please select the code language.",codeEmptyAlert:"Error: Please fill in the code content."}}};e.defaults.lang=t};"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define?define.amd?define(["editormd"],function(t){e(t)}):define(function(t){var l=t("../editormd");e(l)}):e(window.editormd)}();

2
dist/js/languages/zh-tw.js

@ -1,7 +1,7 @@
/*
* Editor.md
* @file languages\zh-tw.js
* @version v1.1.7
* @version v1.1.8
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao

2
dist/js/languages/zh-tw.min.js

@ -1,2 +1,2 @@
/*! Editor.md v1.1.7 | languages\zh-tw.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
/*! Editor.md v1.1.8 | languages\zh-tw.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-03-03 */
!function(){var e=function(e){var t={name:"zh-tw",description:"開源在線Markdown編輯器<br/>A simple markdown doucment online editor.",toolbar:{undo:"撤銷(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗體",del:"刪除線",italic:"斜體",quote:"引用",h1:"標題1",h2:"標題2",h3:"標題3",h4:"標題4",h5:"標題5",h6:"標題6","list-ul":"無序列表","list-ol":"有序列表",hr:"横线",link:"链接",anchor:"錨點",image:"圖片",code:"行內代碼","code-block-tab":"預格式文本 / 代碼塊(縮進風格)","code-block":"代碼塊(多語言風格)",datetime:"日期時間",watch:"關閉實時預覽",unwatch:"開啟實時預覽",preview:"全窗口預覽HTML(可按ESC還原)",fullscreen:"全屏(可按ESC還原)",clear:"清空",info:"關於"+e.title},buttons:{enter:"確定",cancel:"取消"},dialog:{link:{title:"添加鏈接",url:"鏈接地址",urlTitle:"鏈接標題",urlEmpty:"錯誤:請填寫鏈接地址。",titleEmpty:"錯誤:請填寫鏈接標題。"},anchor:{title:"添加錨點鏈接",name:"錨點名稱",url:"鏈接地址",urlTitle:"鏈接標題",nameEmpty:"錯誤:錨點名稱不能為空。",titleEmpty:"錯誤:請填寫錨點鏈接標題。",urlEmpty:"錯誤:請填寫錨點鏈接地址。"},image:{title:"添加圖片",url:"圖片地址",link:"圖片鏈接",alt:"圖片描述",uploadButton:"本地上傳",imageURLEmpty:"錯誤:圖片地址不能為空。",uploadFileEmpty:"錯誤:上傳的圖片不能為空!",formatNotAllowed:"錯誤:只允許上傳圖片文件,允許上傳的圖片文件格式有:"},tabCodeBlock:{title:"添加預格式文本或代碼塊",codeEmptyAlert:"錯誤:請填寫預格式文本或代碼的內容。"},codeBlock:{title:"添加代碼塊",selectLabel:"代碼語言:",selectDefaultText:"請語言代碼語言",otherLanguage:"其他語言",unselectedLanguageAlert:"錯誤:請選擇代碼所屬的語言類型。",codeEmptyAlert:"錯誤:請填寫代碼內容。"}}};e.defaults.lang=t};"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define?define.amd?define(["editormd"],function(t){e(t)}):define(function(t){var l=t("../editormd");e(l)}):e(window.editormd)}();

2
docs/html/index.html

@ -121,7 +121,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Tue Mar 03 2015 20:12:50 GMT+0800 (中国标准时间)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Tue Mar 03 2015 21:29:49 GMT+0800 (中国标准时间)
</footer>
<script> prettyPrint(); </script>

2
examples/custom-toolbar.html

@ -75,7 +75,7 @@ $(function() {
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<!-- 多语言和自定义工具栏的整合测试 -->
<script src="../src/js/languages/en.js"></script>

2
examples/dynamic-create-editormd.html

@ -19,7 +19,7 @@
</header>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script type="text/javascript">
var testEditormd;

2
examples/flowchart.html

@ -36,7 +36,7 @@ cond(no)->op
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

2
examples/form-get-value.html

@ -65,7 +65,7 @@ testEditor.getPreviewedHTML(); // 获取预览窗口里的HTML,在开启watch
</div>
</form>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

2
examples/full.html

@ -26,7 +26,7 @@
</div>
<div id="test-editormd"></div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
var testEditor;

2
examples/html-preview-markdown-to-html.html

@ -26,7 +26,7 @@
<script>
var jQuery = Zepto; // 为了避免修改flowChart.js和sequence-diagram.js的源码,所以想支持flowChart/sequenceDiagram就得加上这一句
</script> -->
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../lib/marked.min.js"></script>
<script src="../lib/prettify.min.js"></script>

2
examples/html-tags-decode.html

@ -41,7 +41,7 @@
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

2
examples/image-cross-domain-upload.html

@ -63,7 +63,7 @@ exit;
```</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

2
examples/image-upload.html

@ -13,7 +13,7 @@
</header>
<div id="test-editormd"></div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

0
lib/jquery.min.js → examples/js/jquery.min.js

2
examples/katex.html

@ -46,7 +46,7 @@ editormd.katexURL = {
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

2
examples/multi-editormd.html

@ -29,7 +29,7 @@
<div id="test-editormd2"></div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
var testEditormd, testEditormd2;

2
examples/multi-languages.html

@ -38,7 +38,7 @@ body{background:red;}
</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<!--<script src="../src/js/languages/en.js"></script>
<script src="../src/js/languages/zh-tw.js"></script> -->

2
examples/onchange.html

@ -16,7 +16,7 @@
<textarea style="display:none;">###Hello world!</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
var testEditor;

2
examples/onfullscreen.html

@ -16,7 +16,7 @@
<textarea style="display:none;">###Hello world!</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

3
examples/onload.html

@ -16,7 +16,7 @@
<textarea style="display:none;">###Hello world!</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {
@ -24,6 +24,7 @@
width : "90%",
height : 720,
//watch : false,
//matchWordHighlight : "onselected",
path : '../lib/',
onload : function() {
//this.watch();

2
examples/readonly.html

@ -33,7 +33,7 @@ $(function() {
</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
var testEditor;

2
examples/sequence-diagram.html

@ -36,7 +36,7 @@ Andrew->>China: I am good thanks!
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

2
examples/set-get-replace-selection.html

@ -60,7 +60,7 @@ $("#btn6").click(function(){
</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
var testEditormd;

2
examples/simple.html

@ -22,7 +22,7 @@
</textarea>
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
var testEditor;

2
examples/toc.html

@ -99,7 +99,7 @@ WebKit 是一个开源的浏览器引擎,与之相应的引擎有Gecko(Mozil
</div>
</div>
<script src="../lib/jquery.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="../src/js/editormd.js"></script>
<script type="text/javascript">
$(function() {

4
examples/use-requirejs.html

@ -31,7 +31,7 @@
requirejs.config({
baseUrl: "../lib/",
paths: {
jquery : "jquery.min",
jquery : "../examples/js/jquery.min",
marked : "marked.min",
prettify : "prettify.min",
raphael : "raphael.min",
@ -59,7 +59,7 @@
htmlDecode : true, // 开启HTML标签解析,为了安全性,默认不开启
tex : true,
previewCodeHighlight : true,
inRequirejs : true,
inRequirejs : true, // must set true
flowChart : true,
sequenceDiagram : true,
//dialogLockScreen : false, // 设置弹出层对话框不锁屏,全局通用,默认为true

4
examples/use-seajs.html

@ -42,9 +42,9 @@
<script src="js/sea.js"></script>
<script type="text/javascript">
seajs.config({
base : "../lib",
//base : "../lib",
alias : {
jquery : "jquery.min",
jquery : "./js/jquery.min",
editormd : "../src/js/editormd"
}
});

2
lib/codemirror/addons.min.js

File diff suppressed because one or more lines are too long

2
lib/codemirror/modes.min.js

File diff suppressed because one or more lines are too long

4
lib/font-awesome.min.css

File diff suppressed because one or more lines are too long

664
lib/github-markdown.css

@ -1,664 +0,0 @@
@charset "UTF-8";
/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */
@font-face {
font-family: octicons-anchor;
src: url(data:font/woff;charset=utf-8;base64,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) format('woff');
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body hr {
height: 4px;
padding: 0;
margin: 16px 0;
background-color: #e7e7e7;
border: 0 none;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote>:first-child {
margin-top: 0;
}
.markdown-body blockquote>:last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0,0,0,0.04);
border-radius: 3px;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}

2
package.json

@ -1,6 +1,6 @@
{
"name": "editor.md",
"version": "1.1.7",
"version": "1.1.8",
"description": "A simple online markdown editor.",
"directories": {
"doc": "docs",

19
src/js/editormd.js

@ -1,7 +1,7 @@
/**
* @fileOverview Editor.md
* @author pandao
* @version 1.1.7
* @version 1.1.8
*/
;(function(factory) {
@ -44,7 +44,7 @@
};
editormd.title = editormd.$name = "Editor.md";
editormd.version = "1.1.7";
editormd.version = "1.1.8";
editormd.homePage = "https://pandao.github.io/editor.md/";
editormd.classPrefix = "editormd-";
@ -58,7 +58,8 @@
placeholder : "now coding markdown...",
readOnly : false,
lineNumbers : true,
styleActiveLine : true, // 高亮显示当前行
matchWordHighlight : true, // options: true, false, "onselected"
styleActiveLine : true, // Highlight the current line
dialogLockScreen : true,
dialogShowMask : true,
dialogDraggable : true,
@ -75,9 +76,9 @@
uploadCallbackURL : "",
saveHTMLToTextarea : false,
toc : true,
tocStartLevel : 1, // 表示从H1开始生成ToC
tocStartLevel : 1, // Said from H1 to create ToC
fontSize : "13px",
htmlDecode : false, // 是否开启HTML标签识别
htmlDecode : false, // Open the HTML tag identification
tex : false,
flowChart : false, // flowChart.js only support IE9+
sequenceDiagram : false, // sequenceDiagram.js only support IE9+
@ -96,7 +97,7 @@
]
},
toolbarTitles : {},
toolbarHandlers : {}, // 工具栏按钮的点击后事件处理
toolbarHandlers : {},
toolbarIconsClass : {
undo : "fa-undo",
@ -431,9 +432,9 @@
styleSelectedText : true,
autoCloseBrackets : true,
showTrailingSpace : true,
highlightSelectionMatches : {
showToken: /\w/
}
highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : {
showToken: (settings.matchWordHighlight == "onselected") ? false : /\w/
})
};
this.codeEditor = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig);

Loading…
Cancel
Save