Skip to content

Commit

Permalink
5.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
linkesch committed Apr 5, 2016
1 parent 23f5999 commit d2fd976
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
5.15.1 / 2016-04-05
==================

* Fix link validation in anchor extension
* Improve performance when dealing with a lot of data
* Enable functions to be used as keyboard commands

5.15.0 / 2016-03-23
==================
* Use class instead of inline style for hiding/showing anchor form
Expand Down
18 changes: 12 additions & 6 deletions dist/js/medium-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2793,12 +2793,14 @@ MediumEditor.extensions = {};
}
// An event triggered which signifies that the user may have changed someting
// Look in our cache of input for the contenteditables to see if something changed
var index = target.getAttribute('medium-editor-index');
if (target.innerHTML !== this.contentCache[index]) {
var index = target.getAttribute('medium-editor-index'),
html = target.innerHTML;

if (html !== this.contentCache[index]) {
// The content has changed since the last time we checked, fire the event
this.triggerCustomEvent('editableInput', eventObj, target);
}
this.contentCache[index] = target.innerHTML;
this.contentCache[index] = html;
},

handleDocumentSelectionChange: function (event) {
Expand Down Expand Up @@ -3771,7 +3773,7 @@ MediumEditor.extensions = {};
return 'tel:' + value;
} else {
// Check for URL scheme and default to http:// if none found
return (urlSchemeRegex.test(value) ? '' : 'http://') + value;
return (urlSchemeRegex.test(value) ? '' : 'http://') + encodeURI(value);
}
},

Expand Down Expand Up @@ -4537,8 +4539,12 @@ MediumEditor.extensions = {};
event.preventDefault();
event.stopPropagation();

// command can be a function to execute
if (typeof data.command === 'function') {
data.command.apply(this);
}
// command can be false so the shortcut is just disabled
if (false !== data.command) {
else if (false !== data.command) {
this.execAction(data.command);
}
}
Expand Down Expand Up @@ -7154,7 +7160,7 @@ MediumEditor.parseVersionString = function (release) {

MediumEditor.version = MediumEditor.parseVersionString.call(this, ({
// grunt-bump looks for this:
'version': '5.15.0'
'version': '5.15.1'
}).version);

return MediumEditor;
Expand Down
6 changes: 3 additions & 3 deletions dist/js/medium-editor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medium-editor",
"version": "5.15.0",
"version": "5.15.1",
"author": "Davi Ferreira <[email protected]>",
"contributors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/js/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ MediumEditor.parseVersionString = function (release) {

MediumEditor.version = MediumEditor.parseVersionString.call(this, ({
// grunt-bump looks for this:
'version': '5.15.0'
'version': '5.15.1'
}).version);

0 comments on commit d2fd976

Please sign in to comment.