Browse Source

Releases v1.1.3

v1.1.9
Pandao 10 years ago
parent
commit
1f6c07df95
  1. 6
      CHANGE.md
  2. 7
      Gulpfile.js
  3. 2
      bower.json
  4. 5
      dist/css/editormd.css
  5. 6
      dist/css/editormd.css.map
  6. 4
      dist/css/editormd.css.min.map
  7. 4
      dist/css/editormd.min.css
  8. 4
      dist/css/editormd.preview.css
  9. 4
      dist/css/editormd.preview.css.map
  10. 2
      dist/css/editormd.preview.css.min.map
  11. 2
      dist/css/editormd.preview.min.css
  12. 12
      dist/js/editormd.js
  13. 4
      dist/js/editormd.min.js
  14. 6
      dist/js/languages/en.js
  15. 2
      dist/js/languages/en.min.js
  16. 6
      dist/js/languages/zh-tw.js
  17. 2
      dist/js/languages/zh-tw.min.js
  18. 27
      docs/html/index.html
  19. BIN
      examples/uploads/选区_002.png
  20. 2
      package.json
  21. 8
      src/js/editormd.js
  22. 1
      src/scss/editormd.codemirror.scss

6
CHANGE.md

@ -133,3 +133,9 @@
#####v1.1.2
- 修复Bug[#10](https://github.com/pandao/editor.md/issues/10);
- 修复Bug[#12](https://github.com/pandao/editor.md/issues/12);
#####v1.1.3
- 修复Bug[#14](https://github.com/pandao/editor.md/issues/14);
- 修复Bug[#15](https://github.com/pandao/editor.md/issues/15);

7
Gulpfile.js

@ -40,7 +40,6 @@ var scssTask = function(fileName, path) {
return gulp.src(path + fileName + ".scss")
.pipe(sass({ style: 'expanded' })) //nested,compact,expanded,compressed
//.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
.pipe(gulp.dest('dist/css'))
.pipe(header(headerComment, {pkg : pkg, fileName : function(file) {
var name = file.path.split(file.base);
@ -71,18 +70,16 @@ gulp.task('js', function() {
return gulp.src('src/js/**/*.js')
.pipe(jshint('./.jshintrc'))
.pipe(jshint.reporter('default'))
//.pipe(concat('all.js'))
//.pipe(gulp.dest('dist/js'))
.pipe(header(headerComment, {pkg : pkg, fileName : function(file) {
var name = file.path.split(file.base);
return name[1].replace('\\', '');
return name[1].replace(/[\\\/]?/, '');
}}))
.pipe(gulp.dest('dist/js'))
.pipe(rename({ suffix: '.min' }))
.pipe(uglify())
.pipe(gulp.dest('dist/js'))
.pipe(header(headerMiniComment, {pkg : pkg, fileName : function(file) {
var name = file.path.split(file.base + (os.platform() === "linux") ? "/" : "\\");
var name = file.path.split(file.base + ( (os.platform() === "win32") ? "\\" : "/") );
return name[1].replace(/[\\\/]?/, '');
}}))
.pipe(gulp.dest('dist/js'))

2
bower.json

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

5
dist/css/editormd.css

@ -1,12 +1,12 @@
/*
* Editor.md
* @file editormd.css
* @version v1.1.0
* @version v1.1.3
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao
* {@link https://github.com/pandao/editor.md}
* @updateTime 2015-02-15
* @updateTime 2015-02-23
*/
@charset "UTF-8";
@ -2886,7 +2886,6 @@
top: 35px;
right: 0;
right: -1px\0;
float: right;
overflow: auto;
line-height: 1.6;
display: none;

6
dist/css/editormd.css.map

File diff suppressed because one or more lines are too long

4
dist/css/editormd.css.min.map

File diff suppressed because one or more lines are too long

4
dist/css/editormd.min.css

File diff suppressed because one or more lines are too long

4
dist/css/editormd.preview.css

@ -1,12 +1,12 @@
/*
* Editor.md
* @file editormd.preview.css
* @version v1.1.0
* @version v1.1.3
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao
* {@link https://github.com/pandao/editor.md}
* @updateTime 2015-02-15
* @updateTime 2015-02-23
*/
/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */

4
dist/css/editormd.preview.css.map

@ -1,12 +1,12 @@
/*
* Editor.md
* @file editormd.preview.css.map
* @version v1.1.0
* @version v1.1.3
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao
* {@link https://github.com/pandao/editor.md}
* @updateTime 2015-02-15
* @updateTime 2015-02-23
*/
{

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

12
dist/js/editormd.js

@ -1,18 +1,18 @@
/*
* Editor.md
* @file editormd.js
* @version v1.1.2
* @version v1.1.3
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao
* {@link https://github.com/pandao/editor.md}
* @updateTime 2015-02-19
* @updateTime 2015-02-23
*/
/**
* @fileOverview Editor.md
* @author pandao
* @version 1.1.2
* @version 1.1.3
*/
;(function(factory) {
@ -55,7 +55,7 @@
};
editormd.title = editormd.$name = "Editor.md";
editormd.version = "1.1.2";
editormd.version = "1.1.3";
editormd.homePage = "https://pandao.github.io/editor.md/";
editormd.classPrefix = "editormd-";
@ -1851,7 +1851,7 @@
if(settings.watch)
{
codeMirror.width(editor.width() / 2);
preview.width(editor.width() / 2);
preview.width((!this.state.preview) ? editor.width() / 2 : editor.width());
if (settings.toolbar && !settings.readOnly) {
preview.css("top", toolbar.height()).height(editor.height() - toolbar.height());
@ -2193,6 +2193,7 @@
}
preview.show().css({
position : "static",
top : 0,
width : editor.width(),
height : editor.height()
@ -2242,6 +2243,7 @@
preview.css({
background : null,
position : "absolute",
width : editor.width() / 2,
height : editor.height() - toolbar.height(),
top : (settings.toolbar) ? toolbar.height() : 0

4
dist/js/editormd.min.js

File diff suppressed because one or more lines are too long

6
dist/js/languages/en.js

@ -1,12 +1,12 @@
/*
* Editor.md
* @file languages/en.js
* @version v1.1.2
* @file languages\en.js
* @version v1.1.3
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao
* {@link https://github.com/pandao/editor.md}
* @updateTime 2015-02-19
* @updateTime 2015-02-23
*/
(function(){

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

@ -1,2 +1,2 @@
/*! Editor.md v1.1.2 | media | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-02-19 */
/*! Editor.md v1.1.3 | languages\en.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-02-23 */
!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)}();

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

@ -1,12 +1,12 @@
/*
* Editor.md
* @file languages/zh-tw.js
* @version v1.1.2
* @file languages\zh-tw.js
* @version v1.1.3
* @description A simple online markdown editor.
* @license MIT License
* @author Pandao
* {@link https://github.com/pandao/editor.md}
* @updateTime 2015-02-19
* @updateTime 2015-02-23
*/
(function(){

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

@ -1,2 +1,2 @@
/*! Editor.md v1.1.2 | media | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-02-19 */
/*! Editor.md v1.1.3 | languages\zh-tw.min.js | A simple online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-02-23 */
!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)}();

27
docs/html/index.html

@ -42,15 +42,17 @@
<section>
<article><h1 id="editor-md">Editor.md</h1>
<p><img src="https://pandao.github.io/editor.md/dist/images/logos/editormd-logo-180x180.png" alt=""></p>
<p>A simple online markdown editor.</p>
<p><strong>Editor.md</strong> 是一个基于jQuery和CodeMirror构建的在线Markdown文档编辑器。</p>
<p><strong>Editor.md</strong> 是一个基于jQuery和CodeMirror构建的在线Markdown编辑器。</p>
<p><img src="https://pandao.github.io/editor.md/examples/images/editormd-screenshot.png" alt="editormd-screenshot" title="editormd-screenshot"></p>
<h4 id="-">主要特性</h4>
<ul>
<li>支持Markdown标准和Github风格;</li>
<li>支持实时预览和多语言语法高亮;</li>
<li>支持实时预览、图片(跨域)上传和多语言语法高亮;</li>
<li>兼容主流的浏览器(IE8+)和Zepto.js,且支持iPad等平板设备;</li>
<li>支持<a href="https://pandao.github.io/editor.md/examples/toc.html">ToC(Table of Contents)</a></li>
<li>兼容主流的浏览器(IE8+),且支持iPad等平板设备</li>
<li>支持识别和解析HTML标签,具有几乎无限的扩展性</li>
<li>支持TeX科学公式(基于<a href="https://pandao.github.io/editor.md/examples/katex.html">KaTeX</a>);</li>
<li>支持流程图 <code>flowchart</code> 和时序图 <code>sequenceDiagram</code>;</li>
<li>支持AMD/CMD模块化加载(支持 <a href="https://pandao.github.io/editor.md/examples/use-requirejs.html">Require.js</a> &amp; <a href="https://pandao.github.io/editor.md/examples/use-seajs.html">Sea.js</a>);</li>
@ -62,18 +64,21 @@
<pre><code>bower install editor.md
</code></pre><h4 id="-">使用方法</h4>
<p>HTML:</p>
<pre><code>&lt;div class=&quot;editormd&quot; id=&quot;test-editormd&quot;&gt;
&lt;script type=&quot;text/markdown&quot;&gt;###Hello world!&lt;/script&gt;
&lt;/div&gt;
</code></pre><p>javascript:</p>
<pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;../dist/css/editormd.css&quot; /&gt;
&lt;script src=&quot;../lib/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;div id=&quot;test-editormd&quot;&gt;
&lt;textarea&gt;###Hello world!&lt;/textarea&gt;
&lt;/div&gt;
</code></pre><blockquote>
<p>提示1:如果没有Markdown源内容或者通过Ajax异步加载Markdown源文档等,可以不添加<code>&lt;textarea&gt;</code>,会自动添加;</p>
<p>提示2:如果不想出现textarea闪现,则在textarea加上 style=&quot;display:none;&quot;</p>
</blockquote>
<p>javascript:</p>
<pre><code>&lt;script src=&quot;../lib/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;../src/js/editormd.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function() {
var testEditor = editormd(&quot;test-editormd&quot;, {
path : &#39;../lib/&#39;
});
path : &#39;../lib/&#39; // codemirror、marked等依赖的库的路径
});
});
&lt;/script&gt;
@ -116,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 Feb 10 2015 00:44:02 GMT+0800 (中国标准时间)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Mon Feb 23 2015 13:48:47 GMT+0800 (中国标准时间)
</footer>
<script> prettyPrint(); </script>

BIN
examples/uploads/选区_002.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

2
package.json

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

8
src/js/editormd.js

@ -1,7 +1,7 @@
/**
* @fileOverview Editor.md
* @author pandao
* @version 1.1.2
* @version 1.1.3
*/
;(function(factory) {
@ -44,7 +44,7 @@
};
editormd.title = editormd.$name = "Editor.md";
editormd.version = "1.1.2";
editormd.version = "1.1.3";
editormd.homePage = "https://pandao.github.io/editor.md/";
editormd.classPrefix = "editormd-";
@ -1840,7 +1840,7 @@
if(settings.watch)
{
codeMirror.width(editor.width() / 2);
preview.width(editor.width() / 2);
preview.width((!this.state.preview) ? editor.width() / 2 : editor.width());
if (settings.toolbar && !settings.readOnly) {
preview.css("top", toolbar.height()).height(editor.height() - toolbar.height());
@ -2182,6 +2182,7 @@
}
preview.show().css({
position : "static",
top : 0,
width : editor.width(),
height : editor.height()
@ -2231,6 +2232,7 @@
preview.css({
background : null,
position : "absolute",
width : editor.width() / 2,
height : editor.height() - toolbar.height(),
top : (settings.toolbar) ? toolbar.height() : 0

1
src/scss/editormd.codemirror.scss

@ -14,7 +14,6 @@
top: 35px;
right: 0;
right: -1px\0;
float: right;
overflow: auto;
line-height: 1.6;
display: none;

Loading…
Cancel
Save