Skip to content

Commit

Permalink
Update version to v0.4.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Pulges committed Sep 17, 2014
1 parent 8893fad commit 45bec62
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/wysihtml5x/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Wysihtml5x
module Rails
VERSION = "0.4.14"
VERSION = "0.4.15"
end
end
38 changes: 29 additions & 9 deletions vendor/assets/javascripts/wysihtml5x-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if(!Array.isArray) {
return Object.prototype.toString.call(arg) === '[object Array]';
};
};/**
* @license wysihtml5x v0.4.14
* @license wysihtml5x v0.4.15
* https://github.com/Edicy/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
Expand All @@ -36,7 +36,7 @@ if(!Array.isArray) {
*
*/
var wysihtml5 = {
version: "0.4.14",
version: "0.4.15",

// namespaces
commands: {},
Expand Down Expand Up @@ -8325,15 +8325,15 @@ wysihtml5.dom.getPastedHtml = function(event) {
wysihtml5.dom.getPastedHtmlWithDiv = function (composer, f) {
var selBookmark = composer.selection.getBookmark(),
doc = composer.element.ownerDocument,
cleanerDiv = coc.createElement('DIV');
cleanerDiv = doc.createElement('DIV');

doc.body.appendChild(cleanerDiv);

cleanerDiv.style.width = "1px";
cleanerDiv.style.height = "1px";
cleanerDiv.style.visibility = "hidden";
cleanerDiv.style.overflow = "hidden";

cleanerDiv.setAttribute('contenteditable', 'true');
doc.body.appendChild(cleanerDiv);
cleanerDiv.focus();

setTimeout(function () {
Expand Down Expand Up @@ -9491,6 +9491,10 @@ wysihtml5.quirks.ensureProperClearing = (function() {
return this.getSelection().isCollapsed;
},

getHtml: function() {
return this.getSelection().toHtml();
},

isEndToEndInNode: function(nodeNames) {
var range = this.getRange(),
parentElement = range.commonAncestorContainer,
Expand Down Expand Up @@ -12863,11 +12867,22 @@ wysihtml5.views.View = Base.extend(
});

dom.observe(element, pasteEvents, function(event) {
//setTimeout(function() {
that.parent.fire(event.type, event).fire(event.type + ":composer", event);
//}, 0);
that.parent.fire(event.type, event).fire(event.type + ":composer", event);
});


if (this.config.copyedFromMarking) {
// If supported the copied source is based directly on selection
// Very useful for webkit based browsers where copy will otherwise contain a lot of code and styles based on whatever and not actually in selection.
dom.observe(element, "copy", function(event) {
if (event.clipboardData) {
event.clipboardData.setData("text/html", that.config.copyedFromMarking + that.selection.getHtml());
event.preventDefault();
}
that.parent.fire(event.type, event).fire(event.type + ":composer", event);
});
}

// --------- neword event ---------
dom.observe(element, "keyup", function(event) {
var keyCode = event.keyCode;
Expand Down Expand Up @@ -13248,7 +13263,12 @@ wysihtml5.views.View = Base.extend(
contentEditableMode: false,
// Classname of container that editor should not touch and pass through
// Pass false to disable
uneditableContainerClassname: "wysihtml5-uneditable-container"
uneditableContainerClassname: "wysihtml5-uneditable-container",
// Browsers that support copied source handling will get a marking of the origin of the copied source (for determinig code cleanup rules on paste)
// Also copied source is based directly on selection -
// (very useful for webkit based browsers where copy will otherwise contain a lot of code and styles based on whatever and not actually in selection).
// If falsy value is passed source override is also disabled
copyedFromMarking: '<meta name="copied-from" content="wysihtml5">'
};

wysihtml5.Editor = wysihtml5.lang.Dispatcher.extend(
Expand Down
38 changes: 29 additions & 9 deletions vendor/assets/javascripts/wysihtml5x.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if(!Array.isArray) {
return Object.prototype.toString.call(arg) === '[object Array]';
};
};/**
* @license wysihtml5x v0.4.14
* @license wysihtml5x v0.4.15
* https://github.com/Edicy/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
Expand All @@ -36,7 +36,7 @@ if(!Array.isArray) {
*
*/
var wysihtml5 = {
version: "0.4.14",
version: "0.4.15",

// namespaces
commands: {},
Expand Down Expand Up @@ -8325,15 +8325,15 @@ wysihtml5.dom.getPastedHtml = function(event) {
wysihtml5.dom.getPastedHtmlWithDiv = function (composer, f) {
var selBookmark = composer.selection.getBookmark(),
doc = composer.element.ownerDocument,
cleanerDiv = coc.createElement('DIV');
cleanerDiv = doc.createElement('DIV');

doc.body.appendChild(cleanerDiv);

cleanerDiv.style.width = "1px";
cleanerDiv.style.height = "1px";
cleanerDiv.style.visibility = "hidden";
cleanerDiv.style.overflow = "hidden";

cleanerDiv.setAttribute('contenteditable', 'true');
doc.body.appendChild(cleanerDiv);
cleanerDiv.focus();

setTimeout(function () {
Expand Down Expand Up @@ -9491,6 +9491,10 @@ wysihtml5.quirks.ensureProperClearing = (function() {
return this.getSelection().isCollapsed;
},

getHtml: function() {
return this.getSelection().toHtml();
},

isEndToEndInNode: function(nodeNames) {
var range = this.getRange(),
parentElement = range.commonAncestorContainer,
Expand Down Expand Up @@ -12863,11 +12867,22 @@ wysihtml5.views.View = Base.extend(
});

dom.observe(element, pasteEvents, function(event) {
//setTimeout(function() {
that.parent.fire(event.type, event).fire(event.type + ":composer", event);
//}, 0);
that.parent.fire(event.type, event).fire(event.type + ":composer", event);
});


if (this.config.copyedFromMarking) {
// If supported the copied source is based directly on selection
// Very useful for webkit based browsers where copy will otherwise contain a lot of code and styles based on whatever and not actually in selection.
dom.observe(element, "copy", function(event) {
if (event.clipboardData) {
event.clipboardData.setData("text/html", that.config.copyedFromMarking + that.selection.getHtml());
event.preventDefault();
}
that.parent.fire(event.type, event).fire(event.type + ":composer", event);
});
}

// --------- neword event ---------
dom.observe(element, "keyup", function(event) {
var keyCode = event.keyCode;
Expand Down Expand Up @@ -13248,7 +13263,12 @@ wysihtml5.views.View = Base.extend(
contentEditableMode: false,
// Classname of container that editor should not touch and pass through
// Pass false to disable
uneditableContainerClassname: "wysihtml5-uneditable-container"
uneditableContainerClassname: "wysihtml5-uneditable-container",
// Browsers that support copied source handling will get a marking of the origin of the copied source (for determinig code cleanup rules on paste)
// Also copied source is based directly on selection -
// (very useful for webkit based browsers where copy will otherwise contain a lot of code and styles based on whatever and not actually in selection).
// If falsy value is passed source override is also disabled
copyedFromMarking: '<meta name="copied-from" content="wysihtml5">'
};

wysihtml5.Editor = wysihtml5.lang.Dispatcher.extend(
Expand Down

0 comments on commit 45bec62

Please sign in to comment.