Skip to content

Commit

Permalink
Generates manifests for 1.1.3, formats code
Browse files Browse the repository at this point in the history
  • Loading branch information
daviferreira committed Oct 8, 2013
1 parent 48f49cc commit c8f4a4a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.1.3 / 2013-10-08
==================

* Pasted text is now wrapped into P elements

1.1.2 / 2013-10-06
==================

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medium-editor",
"version": "1.1.2",
"version": "1.1.3",
"homepage": "http://daviferreira.github.io/medium-editor/",
"authors": [
"Davi Ferreira <hi@daviferreira.com>"
Expand Down
9 changes: 5 additions & 4 deletions dist/js/medium-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,16 +491,17 @@ function MediumEditor(elements, options) {
}
var i,
pasteWrapper = function (e) {
var paragraphs, formattedText, p;
var paragraphs,
html = '',
p;
e.target.classList.remove('medium-editor-placeholder');
if (e.clipboardData && e.clipboardData.getData) {
e.preventDefault();
paragraphs = e.clipboardData.getData('text/plain').split(/[\r\n]/g);
formattedText = "";
for (p = 0; p < paragraphs.length; p += 1) {
formattedText += "<p>" + paragraphs[p] + "</p>";
html += '<p>' + paragraphs[p] + '</p>';
}
document.execCommand('insertHTML', false, formattedText);
document.execCommand('insertHTML', false, html);
}
};
for (i = 0; i < this.elements.length; i += 1) {
Expand Down
2 changes: 1 addition & 1 deletion 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": "1.1.2",
"version": "1.1.3",
"repository": "https://github.com/daviferreira/medium-editor",
"devDependencies": {
"grunt": "~0.4.1",
Expand Down
9 changes: 5 additions & 4 deletions src/js/medium-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,17 @@ function MediumEditor(elements, options) {
}
var i,
pasteWrapper = function (e) {
var paragraphs, formattedText, p;
var paragraphs,
html = '',
p;
e.target.classList.remove('medium-editor-placeholder');
if (e.clipboardData && e.clipboardData.getData) {
e.preventDefault();
paragraphs = e.clipboardData.getData('text/plain').split(/[\r\n]/g);
formattedText = "";
for (p = 0; p < paragraphs.length; p += 1) {
formattedText += "<p>" + paragraphs[p] + "</p>";
html += '<p>' + paragraphs[p] + '</p>';
}
document.execCommand('insertHTML', false, formattedText);
document.execCommand('insertHTML', false, html);
}
};
for (i = 0; i < this.elements.length; i += 1) {
Expand Down

0 comments on commit c8f4a4a

Please sign in to comment.