Skip to content

Commit

Permalink
5.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nmielnik committed Jul 21, 2015
1 parent de369ca commit 7153d89
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
5.5.0 / 2015-07-21
==================
* Add setContent method into core API, which triggers editableInput


5.4.1 / 2015-07-20
==================
* Fix issue where custom anchor-preview extensions weren't overriding built-in anchor preview
Expand Down
15 changes: 14 additions & 1 deletion dist/js/medium-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2541,6 +2541,9 @@ var Events;
},

updateInput: function (target, eventObj) {
if (!this.contentCache) {
return;
}
// 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');
Expand Down Expand Up @@ -6186,6 +6189,16 @@ function MediumEditor(elements, options) {

pasteHTML: function (html, options) {
this.getExtensionByName('paste').pasteHTML(html, options);
},

setContent: function (html, index) {
index = index || 0;

if (this.elements[index]) {
var target = this.elements[index];
target.innerHTML = html;
this.events.updateInput(target, { target: target, currentTarget: target });
}
}
};
}());
Expand All @@ -6207,7 +6220,7 @@ MediumEditor.parseVersionString = function (release) {

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

return MediumEditor;
Expand Down
4 changes: 2 additions & 2 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.4.1",
"version": "5.5.0",
"author": "Davi Ferreira <hi@daviferreira.com>",
"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 @@ -17,5 +17,5 @@ MediumEditor.parseVersionString = function (release) {

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

0 comments on commit 7153d89

Please sign in to comment.