mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 15:44:28 -06:00
Complete rename to EasyMDE
This commit is contained in:
parent
c30569edb3
commit
0786961de3
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -1,5 +1,5 @@
|
|||||||
### Overview
|
### Overview
|
||||||
First of all, thanks for your interest in helping make SimpleMDE even better. Contributions help resolve rare bugs, accomplish neat new features, polish the code, and improve the documentation.
|
First of all, thanks for your interest in helping make EasyMDE even better. Contributions help resolve rare bugs, accomplish neat new features, polish the code, and improve the documentation.
|
||||||
|
|
||||||
### Guidelines for contributing
|
### Guidelines for contributing
|
||||||
- The *most important* guideline for contributing is to compare against the `development` branch when creating a pull request. This allows time to test and modify code changes before merging them into the stable master branch with the next release.
|
- The *most important* guideline for contributing is to compare against the `development` branch when creating a pull request. This allows time to test and modify code changes before merging them into the stable master branch with the next release.
|
||||||
|
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@ -10,4 +10,4 @@
|
|||||||
|
|
||||||
### Version information
|
### Version information
|
||||||
Browser type and version:
|
Browser type and version:
|
||||||
SimpleMDE version:
|
EasyMDE version:
|
||||||
|
10
README.md
10
README.md
@ -1,4 +1,4 @@
|
|||||||
# Fork of SimpleMDE
|
# EasyMDE is a fork of SimpleMDE
|
||||||
This repository is a fork of [SimpleMDE, made by Sparksuite](https://github.com/sparksuite/simplemde-markdown-editor/).
|
This repository is a fork of [SimpleMDE, made by Sparksuite](https://github.com/sparksuite/simplemde-markdown-editor/).
|
||||||
|
|
||||||
I originally made this fork to implement FontAwesome 5 compatibility into SimpleMDE. When that was done I submitted a [pull request](https://github.com/sparksuite/simplemde-markdown-editor/pull/666), which has not been accepted yet. This, and the project being inactive since May 2017, triggered me to make more changes and try to put new life into the project.
|
I originally made this fork to implement FontAwesome 5 compatibility into SimpleMDE. When that was done I submitted a [pull request](https://github.com/sparksuite/simplemde-markdown-editor/pull/666), which has not been accepted yet. This, and the project being inactive since May 2017, triggered me to make more changes and try to put new life into the project.
|
||||||
@ -13,7 +13,13 @@ Changes include:
|
|||||||
|
|
||||||
My intention is to continue development on this project, improving it and keeping it alive.
|
My intention is to continue development on this project, improving it and keeping it alive.
|
||||||
|
|
||||||
Below is the original [README](https://github.com/sparksuite/simplemde-markdown-editor/)
|
## Install EasyMDE
|
||||||
|
Via [npm](https://www.npmjs.com/package/easymde).
|
||||||
|
```
|
||||||
|
npm install easymde --save
|
||||||
|
```
|
||||||
|
|
||||||
|
Below is the original [README](https://github.com/sparksuite/simplemde-markdown-editor/), rewrite for EasyMDE pending.
|
||||||
|
|
||||||
# SimpleMDE - Markdown Editor
|
# SimpleMDE - Markdown Editor
|
||||||
A drop-in JavaScript textarea replacement for writing beautiful and understandable Markdown. The WYSIWYG-esque editor allows users who may be less experienced with Markdown to use familiar toolbar buttons and shortcuts. In addition, the syntax is rendered while editing to clearly show the expected result. Headings are larger, emphasized words are italicized, links are underlined, etc. SimpleMDE is one of the first editors to feature both built-in autosaving and spell checking.
|
A drop-in JavaScript textarea replacement for writing beautiful and understandable Markdown. The WYSIWYG-esque editor allows users who may be less experienced with Markdown to use familiar toolbar buttons and shortcuts. In addition, the syntax is rendered while editing to clearly show the expected result. Headings are larger, emphasized words are italicized, links are underlined, etc. SimpleMDE is one of the first editors to feature both built-in autosaving and spell checking.
|
||||||
|
File diff suppressed because one or more lines are too long
7
dist/easymde.min.js
vendored
Normal file
7
dist/easymde.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
dist/simplemde.min.js
vendored
7
dist/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
@ -28,8 +28,8 @@ gulp.task('lint', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('scripts', ['lint'], function () {
|
gulp.task('scripts', ['lint'], function () {
|
||||||
return browserify({entries: './src/js/simplemde.js', standalone: 'SimpleMDE'}).bundle()
|
return browserify({entries: './src/js/easymde.js', standalone: 'EasyMDE'}).bundle()
|
||||||
.pipe(source('simplemde.min.js'))
|
.pipe(source('easymde.min.js'))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
@ -44,9 +44,9 @@ gulp.task('styles', function () {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return gulp.src(css_files)
|
return gulp.src(css_files)
|
||||||
.pipe(concat('simplemde.css'))
|
.pipe(concat('easymde.css'))
|
||||||
.pipe(minifycss())
|
.pipe(minifycss())
|
||||||
.pipe(rename('simplemde.min.css'))
|
.pipe(rename('easymde.min.css'))
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
.pipe(gulp.dest('./dist/'));
|
.pipe(gulp.dest('./dist/'));
|
||||||
|
1033
package-lock.json
generated
1033
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "simplemde",
|
"name": "easymde",
|
||||||
"version": "1.11.2",
|
"version": "1.0.0",
|
||||||
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor. Features autosaving and spell checking.",
|
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor that easy to use. Features include autosaving and spell checking.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"embeddable",
|
"embeddable",
|
||||||
"markdown",
|
"markdown",
|
||||||
@ -13,27 +13,27 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Jeroen Akkerman",
|
"author": "Jeroen Akkerman",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/ionaru/simplemde-markdown-editor/issues"
|
"url": "https://github.com/ionaru/easy-markdown-editor/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"codemirror": "5.36.0",
|
"codemirror": "^5.37.0",
|
||||||
"codemirror-spell-checker": "1.1.2",
|
"codemirror-spell-checker": "1.1.2",
|
||||||
"marked": "0.3.19"
|
"marked": "0.3.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^14.5.0",
|
"browserify": "^16.2.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"gulp-clean-css": "^3.9.0",
|
"gulp-clean-css": "^3.9.0",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-eslint": "^4.0.0",
|
"gulp-eslint": "^4.0.0",
|
||||||
"gulp-header": "^1.8.9",
|
"gulp-header": "^2.0.5",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "^1.2.2",
|
||||||
"gulp-uglify": "^3.0.0",
|
"gulp-uglify": "^3.0.0",
|
||||||
"vinyl-buffer": "^1.0.0",
|
"vinyl-buffer": "^1.0.0",
|
||||||
"vinyl-source-stream": "^1.1.0"
|
"vinyl-source-stream": "^2.0.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/ionaru/simplemde-markdown-editor"
|
"url": "https://github.com/ionaru/easy-markdown-editor"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ function toggleCodeBlock(editor) {
|
|||||||
var block_start, block_end, lineCount;
|
var block_start, block_end, lineCount;
|
||||||
|
|
||||||
if (is_code === 'single') {
|
if (is_code === 'single') {
|
||||||
// similar to some SimpleMDE _toggleBlock logic
|
// similar to some EasyMDE _toggleBlock logic
|
||||||
var start = line.text.slice(0, cur_start.ch).replace('`', ''),
|
var start = line.text.slice(0, cur_start.ch).replace('`', ''),
|
||||||
end = line.text.slice(cur_start.ch).replace('`', '');
|
end = line.text.slice(cur_start.ch).replace('`', '');
|
||||||
cm.replaceRange(start + end, {
|
cm.replaceRange(start + end, {
|
||||||
@ -1315,9 +1315,9 @@ var blockStyles = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface of SimpleMDE.
|
* Interface of EasyMDE.
|
||||||
*/
|
*/
|
||||||
function SimpleMDE(options) {
|
function EasyMDE(options) {
|
||||||
// Handle options parameter
|
// Handle options parameter
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
@ -1358,7 +1358,7 @@ function SimpleMDE(options) {
|
|||||||
this.element = options.element;
|
this.element = options.element;
|
||||||
} else if (options.element === null) {
|
} else if (options.element === null) {
|
||||||
// This means that the element option was specified, but no element was found
|
// This means that the element option was specified, but no element was found
|
||||||
console.log('SimpleMDE: Error. No element was found.');
|
console.log('EasyMDE: Error. No element was found.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1447,7 +1447,7 @@ function SimpleMDE(options) {
|
|||||||
/**
|
/**
|
||||||
* Default markdown render.
|
* Default markdown render.
|
||||||
*/
|
*/
|
||||||
SimpleMDE.prototype.markdown = function (text) {
|
EasyMDE.prototype.markdown = function (text) {
|
||||||
if (marked) {
|
if (marked) {
|
||||||
// Initialize
|
// Initialize
|
||||||
var markedOptions;
|
var markedOptions;
|
||||||
@ -1490,7 +1490,7 @@ SimpleMDE.prototype.markdown = function (text) {
|
|||||||
/**
|
/**
|
||||||
* Render editor to the given element.
|
* Render editor to the given element.
|
||||||
*/
|
*/
|
||||||
SimpleMDE.prototype.render = function (el) {
|
EasyMDE.prototype.render = function (el) {
|
||||||
if (!el) {
|
if (!el) {
|
||||||
el = this.element || document.getElementsByTagName('textarea')[0];
|
el = this.element || document.getElementsByTagName('textarea')[0];
|
||||||
}
|
}
|
||||||
@ -1613,18 +1613,18 @@ function isLocalStorageAvailable() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleMDE.prototype.autosave = function () {
|
EasyMDE.prototype.autosave = function () {
|
||||||
if (isLocalStorageAvailable()) {
|
if (isLocalStorageAvailable()) {
|
||||||
var simplemde = this;
|
var easyMDE = this;
|
||||||
|
|
||||||
if (this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == '') {
|
if (this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == '') {
|
||||||
console.log('SimpleMDE: You must set a uniqueId to use the autosave feature');
|
console.log('EasyMDE: You must set a uniqueId to use the autosave feature');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (simplemde.element.form != null && simplemde.element.form != undefined) {
|
if (easyMDE.element.form != null && easyMDE.element.form != undefined) {
|
||||||
simplemde.element.form.addEventListener('submit', function () {
|
easyMDE.element.form.addEventListener('submit', function () {
|
||||||
localStorage.removeItem('smde_' + simplemde.options.autosave.uniqueId);
|
localStorage.removeItem('smde_' + easyMDE.options.autosave.uniqueId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1637,7 +1637,7 @@ SimpleMDE.prototype.autosave = function () {
|
|||||||
this.options.autosave.loaded = true;
|
this.options.autosave.loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
localStorage.setItem('smde_' + this.options.autosave.uniqueId, simplemde.value());
|
localStorage.setItem('smde_' + this.options.autosave.uniqueId, easyMDE.value());
|
||||||
|
|
||||||
var el = document.getElementById('autosaved');
|
var el = document.getElementById('autosaved');
|
||||||
if (el != null && el != undefined && el != '') {
|
if (el != null && el != undefined && el != '') {
|
||||||
@ -1659,27 +1659,27 @@ SimpleMDE.prototype.autosave = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.autosaveTimeoutId = setTimeout(function () {
|
this.autosaveTimeoutId = setTimeout(function () {
|
||||||
simplemde.autosave();
|
easyMDE.autosave();
|
||||||
}, this.options.autosave.delay || 10000);
|
}, this.options.autosave.delay || 10000);
|
||||||
} else {
|
} else {
|
||||||
console.log('SimpleMDE: localStorage not available, cannot autosave');
|
console.log('EasyMDE: localStorage not available, cannot autosave');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.clearAutosavedValue = function () {
|
EasyMDE.prototype.clearAutosavedValue = function () {
|
||||||
if (isLocalStorageAvailable()) {
|
if (isLocalStorageAvailable()) {
|
||||||
if (this.options.autosave == undefined || this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == '') {
|
if (this.options.autosave == undefined || this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == '') {
|
||||||
console.log('SimpleMDE: You must set a uniqueId to clear the autosave value');
|
console.log('EasyMDE: You must set a uniqueId to clear the autosave value');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
localStorage.removeItem('smde_' + this.options.autosave.uniqueId);
|
localStorage.removeItem('smde_' + this.options.autosave.uniqueId);
|
||||||
} else {
|
} else {
|
||||||
console.log('SimpleMDE: localStorage not available, cannot autosave');
|
console.log('EasyMDE: localStorage not available, cannot autosave');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.createSideBySide = function () {
|
EasyMDE.prototype.createSideBySide = function () {
|
||||||
var cm = this.codemirror;
|
var cm = this.codemirror;
|
||||||
var wrapper = cm.getWrapperElement();
|
var wrapper = cm.getWrapperElement();
|
||||||
var preview = wrapper.nextSibling;
|
var preview = wrapper.nextSibling;
|
||||||
@ -1721,7 +1721,7 @@ SimpleMDE.prototype.createSideBySide = function () {
|
|||||||
return preview;
|
return preview;
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.createToolbar = function (items) {
|
EasyMDE.prototype.createToolbar = function (items) {
|
||||||
items = items || this.options.toolbar;
|
items = items || this.options.toolbar;
|
||||||
|
|
||||||
if (!items || items.length === 0) {
|
if (!items || items.length === 0) {
|
||||||
@ -1822,7 +1822,7 @@ SimpleMDE.prototype.createToolbar = function (items) {
|
|||||||
return bar;
|
return bar;
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.createStatusbar = function (status) {
|
EasyMDE.prototype.createStatusbar = function (status) {
|
||||||
// Initialize
|
// Initialize
|
||||||
status = status || this.options.status;
|
status = status || this.options.status;
|
||||||
var options = this.options;
|
var options = this.options;
|
||||||
@ -1940,7 +1940,7 @@ SimpleMDE.prototype.createStatusbar = function (status) {
|
|||||||
/**
|
/**
|
||||||
* Get or set the text content.
|
* Get or set the text content.
|
||||||
*/
|
*/
|
||||||
SimpleMDE.prototype.value = function (val) {
|
EasyMDE.prototype.value = function (val) {
|
||||||
var cm = this.codemirror;
|
var cm = this.codemirror;
|
||||||
if (val === undefined) {
|
if (val === undefined) {
|
||||||
return cm.getValue();
|
return cm.getValue();
|
||||||
@ -1959,100 +1959,100 @@ SimpleMDE.prototype.value = function (val) {
|
|||||||
/**
|
/**
|
||||||
* Bind static methods for exports.
|
* Bind static methods for exports.
|
||||||
*/
|
*/
|
||||||
SimpleMDE.toggleBold = toggleBold;
|
EasyMDE.toggleBold = toggleBold;
|
||||||
SimpleMDE.toggleItalic = toggleItalic;
|
EasyMDE.toggleItalic = toggleItalic;
|
||||||
SimpleMDE.toggleStrikethrough = toggleStrikethrough;
|
EasyMDE.toggleStrikethrough = toggleStrikethrough;
|
||||||
SimpleMDE.toggleBlockquote = toggleBlockquote;
|
EasyMDE.toggleBlockquote = toggleBlockquote;
|
||||||
SimpleMDE.toggleHeadingSmaller = toggleHeadingSmaller;
|
EasyMDE.toggleHeadingSmaller = toggleHeadingSmaller;
|
||||||
SimpleMDE.toggleHeadingBigger = toggleHeadingBigger;
|
EasyMDE.toggleHeadingBigger = toggleHeadingBigger;
|
||||||
SimpleMDE.toggleHeading1 = toggleHeading1;
|
EasyMDE.toggleHeading1 = toggleHeading1;
|
||||||
SimpleMDE.toggleHeading2 = toggleHeading2;
|
EasyMDE.toggleHeading2 = toggleHeading2;
|
||||||
SimpleMDE.toggleHeading3 = toggleHeading3;
|
EasyMDE.toggleHeading3 = toggleHeading3;
|
||||||
SimpleMDE.toggleCodeBlock = toggleCodeBlock;
|
EasyMDE.toggleCodeBlock = toggleCodeBlock;
|
||||||
SimpleMDE.toggleUnorderedList = toggleUnorderedList;
|
EasyMDE.toggleUnorderedList = toggleUnorderedList;
|
||||||
SimpleMDE.toggleOrderedList = toggleOrderedList;
|
EasyMDE.toggleOrderedList = toggleOrderedList;
|
||||||
SimpleMDE.cleanBlock = cleanBlock;
|
EasyMDE.cleanBlock = cleanBlock;
|
||||||
SimpleMDE.drawLink = drawLink;
|
EasyMDE.drawLink = drawLink;
|
||||||
SimpleMDE.drawImage = drawImage;
|
EasyMDE.drawImage = drawImage;
|
||||||
SimpleMDE.drawTable = drawTable;
|
EasyMDE.drawTable = drawTable;
|
||||||
SimpleMDE.drawHorizontalRule = drawHorizontalRule;
|
EasyMDE.drawHorizontalRule = drawHorizontalRule;
|
||||||
SimpleMDE.undo = undo;
|
EasyMDE.undo = undo;
|
||||||
SimpleMDE.redo = redo;
|
EasyMDE.redo = redo;
|
||||||
SimpleMDE.togglePreview = togglePreview;
|
EasyMDE.togglePreview = togglePreview;
|
||||||
SimpleMDE.toggleSideBySide = toggleSideBySide;
|
EasyMDE.toggleSideBySide = toggleSideBySide;
|
||||||
SimpleMDE.toggleFullScreen = toggleFullScreen;
|
EasyMDE.toggleFullScreen = toggleFullScreen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bind instance methods for exports.
|
* Bind instance methods for exports.
|
||||||
*/
|
*/
|
||||||
SimpleMDE.prototype.toggleBold = function () {
|
EasyMDE.prototype.toggleBold = function () {
|
||||||
toggleBold(this);
|
toggleBold(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleItalic = function () {
|
EasyMDE.prototype.toggleItalic = function () {
|
||||||
toggleItalic(this);
|
toggleItalic(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleStrikethrough = function () {
|
EasyMDE.prototype.toggleStrikethrough = function () {
|
||||||
toggleStrikethrough(this);
|
toggleStrikethrough(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleBlockquote = function () {
|
EasyMDE.prototype.toggleBlockquote = function () {
|
||||||
toggleBlockquote(this);
|
toggleBlockquote(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleHeadingSmaller = function () {
|
EasyMDE.prototype.toggleHeadingSmaller = function () {
|
||||||
toggleHeadingSmaller(this);
|
toggleHeadingSmaller(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleHeadingBigger = function () {
|
EasyMDE.prototype.toggleHeadingBigger = function () {
|
||||||
toggleHeadingBigger(this);
|
toggleHeadingBigger(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleHeading1 = function () {
|
EasyMDE.prototype.toggleHeading1 = function () {
|
||||||
toggleHeading1(this);
|
toggleHeading1(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleHeading2 = function () {
|
EasyMDE.prototype.toggleHeading2 = function () {
|
||||||
toggleHeading2(this);
|
toggleHeading2(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleHeading3 = function () {
|
EasyMDE.prototype.toggleHeading3 = function () {
|
||||||
toggleHeading3(this);
|
toggleHeading3(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleCodeBlock = function () {
|
EasyMDE.prototype.toggleCodeBlock = function () {
|
||||||
toggleCodeBlock(this);
|
toggleCodeBlock(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleUnorderedList = function () {
|
EasyMDE.prototype.toggleUnorderedList = function () {
|
||||||
toggleUnorderedList(this);
|
toggleUnorderedList(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleOrderedList = function () {
|
EasyMDE.prototype.toggleOrderedList = function () {
|
||||||
toggleOrderedList(this);
|
toggleOrderedList(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.cleanBlock = function () {
|
EasyMDE.prototype.cleanBlock = function () {
|
||||||
cleanBlock(this);
|
cleanBlock(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.drawLink = function () {
|
EasyMDE.prototype.drawLink = function () {
|
||||||
drawLink(this);
|
drawLink(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.drawImage = function () {
|
EasyMDE.prototype.drawImage = function () {
|
||||||
drawImage(this);
|
drawImage(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.drawTable = function () {
|
EasyMDE.prototype.drawTable = function () {
|
||||||
drawTable(this);
|
drawTable(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.drawHorizontalRule = function () {
|
EasyMDE.prototype.drawHorizontalRule = function () {
|
||||||
drawHorizontalRule(this);
|
drawHorizontalRule(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.undo = function () {
|
EasyMDE.prototype.undo = function () {
|
||||||
undo(this);
|
undo(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.redo = function () {
|
EasyMDE.prototype.redo = function () {
|
||||||
redo(this);
|
redo(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.togglePreview = function () {
|
EasyMDE.prototype.togglePreview = function () {
|
||||||
togglePreview(this);
|
togglePreview(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleSideBySide = function () {
|
EasyMDE.prototype.toggleSideBySide = function () {
|
||||||
toggleSideBySide(this);
|
toggleSideBySide(this);
|
||||||
};
|
};
|
||||||
SimpleMDE.prototype.toggleFullScreen = function () {
|
EasyMDE.prototype.toggleFullScreen = function () {
|
||||||
toggleFullScreen(this);
|
toggleFullScreen(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.isPreviewActive = function () {
|
EasyMDE.prototype.isPreviewActive = function () {
|
||||||
var cm = this.codemirror;
|
var cm = this.codemirror;
|
||||||
var wrapper = cm.getWrapperElement();
|
var wrapper = cm.getWrapperElement();
|
||||||
var preview = wrapper.lastChild;
|
var preview = wrapper.lastChild;
|
||||||
@ -2060,7 +2060,7 @@ SimpleMDE.prototype.isPreviewActive = function () {
|
|||||||
return /editor-preview-active/.test(preview.className);
|
return /editor-preview-active/.test(preview.className);
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.isSideBySideActive = function () {
|
EasyMDE.prototype.isSideBySideActive = function () {
|
||||||
var cm = this.codemirror;
|
var cm = this.codemirror;
|
||||||
var wrapper = cm.getWrapperElement();
|
var wrapper = cm.getWrapperElement();
|
||||||
var preview = wrapper.nextSibling;
|
var preview = wrapper.nextSibling;
|
||||||
@ -2068,19 +2068,19 @@ SimpleMDE.prototype.isSideBySideActive = function () {
|
|||||||
return /editor-preview-active-side/.test(preview.className);
|
return /editor-preview-active-side/.test(preview.className);
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.isFullscreenActive = function () {
|
EasyMDE.prototype.isFullscreenActive = function () {
|
||||||
var cm = this.codemirror;
|
var cm = this.codemirror;
|
||||||
|
|
||||||
return cm.getOption('fullScreen');
|
return cm.getOption('fullScreen');
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.getState = function () {
|
EasyMDE.prototype.getState = function () {
|
||||||
var cm = this.codemirror;
|
var cm = this.codemirror;
|
||||||
|
|
||||||
return getState(cm);
|
return getState(cm);
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleMDE.prototype.toTextArea = function () {
|
EasyMDE.prototype.toTextArea = function () {
|
||||||
var cm = this.codemirror;
|
var cm = this.codemirror;
|
||||||
var wrapper = cm.getWrapperElement();
|
var wrapper = cm.getWrapperElement();
|
||||||
|
|
||||||
@ -2105,4 +2105,4 @@ SimpleMDE.prototype.toTextArea = function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = SimpleMDE;
|
module.exports = EasyMDE;
|
Loading…
x
Reference in New Issue
Block a user