Skip to content

Commit

Permalink
Disabled text multi-select
Browse files Browse the repository at this point in the history
  • Loading branch information
Ionaru committed Jun 29, 2018
1 parent f4905ea commit 18c0398
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules/
*.iws
.idea/
.vscode/
dev_test/
2 changes: 1 addition & 1 deletion dist/easymde.min.js

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easymde",
"version": "2.1.0",
"version": "2.2.0",
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor that easy to use. Features include autosaving and spell checking.",
"keywords": [
"embeddable",
Expand All @@ -16,9 +16,9 @@
"url": "https://github.com/ionaru/easy-markdown-editor/issues"
},
"dependencies": {
"codemirror": "5.37.0",
"codemirror": "^5.39.0",
"codemirror-spell-checker": "1.1.2",
"marked": "0.3.19"
"marked": "^0.4.0"
},
"devDependencies": {
"browserify": "^16.2.2",
Expand Down
8 changes: 8 additions & 0 deletions src/js/easymde.js
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,13 @@ EasyMDE.prototype.render = function (el) {
mode.gitHubSpice = false;
}

// eslint-disable-next-line no-unused-vars
function configureMouse(cm, repeat, event) {
return {
addNew: false
};
}

this.codemirror = CodeMirror.fromTextArea(el, {
mode: mode,
backdrop: backdrop,
Expand All @@ -1585,6 +1592,7 @@ EasyMDE.prototype.render = function (el) {
allowDropFileTypes: ['text/plain'],
placeholder: options.placeholder || el.getAttribute('placeholder') || '',
styleSelectedText: (options.styleSelectedText != undefined) ? options.styleSelectedText : !isMobile(),
configureMouse: configureMouse
});

this.codemirror.getScrollerElement().style.minHeight = options.minHeight;
Expand Down

0 comments on commit 18c0398

Please sign in to comment.