app/assets/source/tinymce/tinymce.jquery.js in tinymce-rails-4.2.1 vs app/assets/source/tinymce/tinymce.jquery.js in tinymce-rails-4.2.2

- old
+ new

@@ -1,6 +1,6 @@ -// 4.2.1 (2015-06-29) +// 4.2.2 (2015-07-22) /** * Compiled inline version. (Library mode) */ @@ -10051,34 +10051,35 @@ var textNode, textNodeNext, textVal, sibling, blockElements = schema.getBlockElements(); for (textNode = node.prev; textNode && textNode.type === 3;) { textVal = textNode.value.replace(endWhiteSpaceRegExp, ''); + // Found a text node with non whitespace then trim that and break if (textVal.length > 0) { textNode.value = textVal; - textNode = textNode.prev; - } else { - textNodeNext = textNode.next; + return; + } - // Fix for bug #7543 where bogus nodes would produce empty - // text nodes and these would be removed if a nested list was before it - if (textNodeNext) { - if (textNodeNext.type == 3 && textNodeNext.value.length) { - textNode = textNode.prev; - continue; - } + textNodeNext = textNode.next; - if (!blockElements[textNodeNext.name] && textNodeNext.name != 'script' && textNodeNext.name != 'style') { - textNode = textNode.prev; - continue; - } + // Fix for bug #7543 where bogus nodes would produce empty + // text nodes and these would be removed if a nested list was before it + if (textNodeNext) { + if (textNodeNext.type == 3 && textNodeNext.value.length) { + textNode = textNode.prev; + continue; } - sibling = textNode.prev; - textNode.remove(); - textNode = sibling; + if (!blockElements[textNodeNext.name] && textNodeNext.name != 'script' && textNodeNext.name != 'style') { + textNode = textNode.prev; + continue; + } } + + sibling = textNode.prev; + textNode.remove(); + textNode = sibling; } } function cloneAndExcludeBlocks(input) { var name, output = {}; @@ -25003,11 +25004,11 @@ */ /** * This class is used to create MessageBoxes like alerts/confirms etc. * - * @class tinymce.ui.Window + * @class tinymce.ui.MessageBox * @extends tinymce.ui.FloatPanel */ define("tinymce/ui/MessageBox", [ "tinymce/ui/Window" ], function(Window) { @@ -30830,19 +30831,19 @@ * Minor version of TinyMCE build. * * @property minorVersion * @type String */ - minorVersion: '2.1', + minorVersion: '2.2', /** * Release date of TinyMCE build. * * @property releaseDate * @type String */ - releaseDate: '2015-06-29', + releaseDate: '2015-07-22', /** * Collection of editor instances. * * @property editors @@ -33259,15 +33260,31 @@ openBtnHtml + '</div>' ); }, + value: function(value) { + if (arguments.length) { + this.state.set('value', value); + return this; + } + + // Make sure the real state is in sync + if (this.state.get('rendered')) { + this.state.set('value', this.getEl('inp').value); + } + + return this.state.get('value'); + }, + bindStates: function() { var self = this; self.state.on('change:value', function(e) { - self.getEl('inp').value = e.value; + if (self.getEl('inp').value != e.value) { + self.getEl('inp').value = e.value; + } }); self.state.on('change:disabled', function(e) { self.getEl('inp').disabled = e.value; }); @@ -34219,11 +34236,11 @@ } if (editor.settings.elementpath !== false) { self.on('select', function(e) { editor.focus(); - editor.selection.select(this.data()[e.index].element); + editor.selection.select(this.row()[e.index].element); editor.nodeChanged(); }); editor.on('nodeChange', function(e) { var outParents = [], parents = e.parents, i = parents.length; @@ -36757,11 +36774,11 @@ var self = this; self.items().each(function(ctrl) { var settings = ctrl.settings; - if (settings.icon || settings.selectable) { + if (settings.icon || settings.image || settings.selectable) { self._hasIcons = true; return false; } }); @@ -37998,10 +38015,12 @@ bindStates: function() { var self = this; self.state.on('change:value', function(e) { - self.getEl().value = e.value; + if (self.getEl().value != e.value) { + self.getEl().value = e.value; + } }); self.state.on('change:disabled', function(e) { self.getEl().disabled = e.value; }); \ No newline at end of file