tinymce-rails 4.2.7 → 4.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- // 4.2.7 (2015-10-27)
1
+ // 4.2.8 (2015-11-13)
2
2
 
3
3
  /**
4
4
  * Compiled inline version. (Library mode)
@@ -433,7 +433,7 @@ define("tinymce/dom/EventUtils", [], function() {
433
433
  }
434
434
  }
435
435
 
436
- // Fake bubbeling of focusin/focusout
436
+ // Fake bubbling of focusin/focusout
437
437
  if (!hasFocusIn && (name === "focusin" || name === "focusout")) {
438
438
  capture = true;
439
439
  fakeName = name === "focusin" ? "focus" : "blur";
@@ -618,7 +618,7 @@ define("tinymce/dom/EventUtils", [], function() {
618
618
  return self;
619
619
  }
620
620
 
621
- // Unbind any element on the specificed target
621
+ // Unbind any element on the specified target
622
622
  if (target[expando]) {
623
623
  unbind(target);
624
624
  }
@@ -3773,7 +3773,7 @@ define("tinymce/dom/DomQuery", [
3773
3773
  * Converts the current set to an array.
3774
3774
  *
3775
3775
  * @method toArray
3776
- * @param {Array} Array of all nodes in set.
3776
+ * @return {Array} Array of all nodes in set.
3777
3777
  */
3778
3778
  toArray: function() {
3779
3779
  return Tools.toArray(this);
@@ -3784,6 +3784,7 @@ define("tinymce/dom/DomQuery", [
3784
3784
  *
3785
3785
  * @method add
3786
3786
  * @param {Array/tinymce.dom.DomQuery} items Array of all nodes to add to set.
3787
+ * @param {Boolean} sort
3787
3788
  * @return {tinymce.dom.DomQuery} New instance with nodes added.
3788
3789
  */
3789
3790
  add: function(items, sort) {
@@ -4196,8 +4197,8 @@ define("tinymce/dom/DomQuery", [
4196
4197
  * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.
4197
4198
  * @return {tinymce.dom.DomQuery} Set with wrapped nodes.
4198
4199
  */
4199
- wrap: function(wrapper) {
4200
- return wrap(this, wrapper);
4200
+ wrap: function(content) {
4201
+ return wrap(this, content);
4201
4202
  },
4202
4203
 
4203
4204
  /**
@@ -4208,8 +4209,8 @@ define("tinymce/dom/DomQuery", [
4208
4209
  * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.
4209
4210
  * @return {tinymce.dom.DomQuery} Set with wrapped nodes.
4210
4211
  */
4211
- wrapAll: function(wrapper) {
4212
- return wrap(this, wrapper, true);
4212
+ wrapAll: function(content) {
4213
+ return wrap(this, content, true);
4213
4214
  },
4214
4215
 
4215
4216
  /**
@@ -4219,9 +4220,9 @@ define("tinymce/dom/DomQuery", [
4219
4220
  * @param {String/Element/Array/tinymce.dom.DomQuery} content Content to wrap nodes with.
4220
4221
  * @return {tinymce.dom.DomQuery} Set with wrapped nodes.
4221
4222
  */
4222
- wrapInner: function(wrapper) {
4223
+ wrapInner: function(content) {
4223
4224
  this.each(function() {
4224
- DomQuery(this).contents().wrapAll(wrapper);
4225
+ DomQuery(this).contents().wrapAll(content);
4225
4226
  });
4226
4227
 
4227
4228
  return this;
@@ -4410,7 +4411,7 @@ define("tinymce/dom/DomQuery", [
4410
4411
  *
4411
4412
  * @method slice
4412
4413
  * @param {Number} start Start index to slice at.
4413
- * @param {Number} end Optional ened index to end slice at.
4414
+ * @param {Number} end Optional end index to end slice at.
4414
4415
  * @return {tinymce.dom.DomQuery} Sliced set.
4415
4416
  */
4416
4417
  slice: function() {
@@ -4483,7 +4484,7 @@ define("tinymce/dom/DomQuery", [
4483
4484
  },
4484
4485
 
4485
4486
  /**
4486
- * Gets the current node or any partent matching the specified selector.
4487
+ * Gets the current node or any parent matching the specified selector.
4487
4488
  *
4488
4489
  * @method closest
4489
4490
  * @param {String/Element/tinymce.dom.DomQuery} selector Selector or element to find.
@@ -4571,14 +4572,14 @@ define("tinymce/dom/DomQuery", [
4571
4572
  * @static
4572
4573
  * @method makeArray
4573
4574
  * @param {Object} object Object to convert to array.
4574
- * @return {Arrau} Array produced from object.
4575
+ * @return {Array} Array produced from object.
4575
4576
  */
4576
- makeArray: function(array) {
4577
- if (isWindow(array) || array.nodeType) {
4578
- return [array];
4577
+ makeArray: function(object) {
4578
+ if (isWindow(object) || object.nodeType) {
4579
+ return [object];
4579
4580
  }
4580
4581
 
4581
- return Tools.toArray(array);
4582
+ return Tools.toArray(object);
4582
4583
  },
4583
4584
 
4584
4585
  /**
@@ -4738,7 +4739,7 @@ define("tinymce/dom/DomQuery", [
4738
4739
  * Returns a new collection with the parent of each item in current collection matching the optional selector.
4739
4740
  *
4740
4741
  * @method parent
4741
- * @param {String} selector Selector to match parents agains.
4742
+ * @param {Element/tinymce.dom.DomQuery} node Node to match parents against.
4742
4743
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.
4743
4744
  */
4744
4745
  parent: function(node) {
@@ -4751,7 +4752,7 @@ define("tinymce/dom/DomQuery", [
4751
4752
  * Returns a new collection with the all the parents of each item in current collection matching the optional selector.
4752
4753
  *
4753
4754
  * @method parents
4754
- * @param {String} selector Selector to match parents agains.
4755
+ * @param {Element/tinymce.dom.DomQuery} node Node to match parents against.
4755
4756
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.
4756
4757
  */
4757
4758
  parents: function(node) {
@@ -4762,7 +4763,7 @@ define("tinymce/dom/DomQuery", [
4762
4763
  * Returns a new collection with next sibling of each item in current collection matching the optional selector.
4763
4764
  *
4764
4765
  * @method next
4765
- * @param {String} selector Selector to match the next element against.
4766
+ * @param {Element/tinymce.dom.DomQuery} node Node to match the next element against.
4766
4767
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
4767
4768
  */
4768
4769
  next: function(node) {
@@ -4773,7 +4774,7 @@ define("tinymce/dom/DomQuery", [
4773
4774
  * Returns a new collection with previous sibling of each item in current collection matching the optional selector.
4774
4775
  *
4775
4776
  * @method prev
4776
- * @param {String} selector Selector to match the previous element against.
4777
+ * @param {Element/tinymce.dom.DomQuery} node Node to match the previous element against.
4777
4778
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
4778
4779
  */
4779
4780
  prev: function(node) {
@@ -4784,7 +4785,7 @@ define("tinymce/dom/DomQuery", [
4784
4785
  * Returns all child elements matching the optional selector.
4785
4786
  *
4786
4787
  * @method children
4787
- * @param {String} selector Selector to match the elements against.
4788
+ * @param {Element/tinymce.dom.DomQuery} node Node to match the elements against.
4788
4789
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
4789
4790
  */
4790
4791
  children: function(node) {
@@ -4795,6 +4796,7 @@ define("tinymce/dom/DomQuery", [
4795
4796
  * Returns all child nodes matching the optional selector.
4796
4797
  *
4797
4798
  * @method contents
4799
+ * @param {Element/tinymce.dom.DomQuery} node
4798
4800
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
4799
4801
  */
4800
4802
  contents: function(node) {
@@ -4843,6 +4845,7 @@ define("tinymce/dom/DomQuery", [
4843
4845
  * of each item in current collection matching the optional selector.
4844
4846
  *
4845
4847
  * @method parentsUntil
4848
+ * @param {Element/tinymce.dom.DomQuery} node
4846
4849
  * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.
4847
4850
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching parents.
4848
4851
  */
@@ -4854,6 +4857,7 @@ define("tinymce/dom/DomQuery", [
4854
4857
  * Returns a new collection with all next siblings of each item in current collection matching the optional selector.
4855
4858
  *
4856
4859
  * @method nextUntil
4860
+ * @param {Element/tinymce.dom.DomQuery} node
4857
4861
  * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.
4858
4862
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
4859
4863
  */
@@ -4865,6 +4869,7 @@ define("tinymce/dom/DomQuery", [
4865
4869
  * Returns a new collection with all previous siblings of each item in current collection matching the optional selector.
4866
4870
  *
4867
4871
  * @method prevUntil
4872
+ * @param {Element/tinymce.dom.DomQuery} node
4868
4873
  * @param {String/Element/tinymce.dom.DomQuery} until Until the matching selector or element.
4869
4874
  * @return {tinymce.dom.DomQuery} New DomQuery instance with all matching elements.
4870
4875
  */
@@ -5666,7 +5671,8 @@ define("tinymce/dom/Range", [
5666
5671
  function _getSelectedNode(container, offset) {
5667
5672
  var child;
5668
5673
 
5669
- if (container.nodeType == 3 /* TEXT_NODE */) {
5674
+ // TEXT_NODE
5675
+ if (container.nodeType == 3) {
5670
5676
  return container;
5671
5677
  }
5672
5678
 
@@ -5900,7 +5906,7 @@ define("tinymce/dom/Range", [
5900
5906
  }
5901
5907
 
5902
5908
  // Text node needs special case handling
5903
- if (self[START_CONTAINER].nodeType == 3 /* TEXT_NODE */) {
5909
+ if (self[START_CONTAINER].nodeType == 3) { // TEXT_NODE
5904
5910
  // get the substring
5905
5911
  s = self[START_CONTAINER].nodeValue;
5906
5912
  sub = s.substring(self[START_OFFSET], self[END_OFFSET]);
@@ -6177,7 +6183,8 @@ define("tinymce/dom/Range", [
6177
6183
  return _traverseFullySelected(n, how);
6178
6184
  }
6179
6185
 
6180
- if (n.nodeType == 3 /* TEXT_NODE */) {
6186
+ // TEXT_NODE
6187
+ if (n.nodeType == 3) {
6181
6188
  txtValue = n.nodeValue;
6182
6189
 
6183
6190
  if (isLeft) {
@@ -6860,8 +6867,8 @@ define("tinymce/dom/DOMUtils", [
6860
6867
  *
6861
6868
  * @constructor
6862
6869
  * @method DOMUtils
6863
- * @param {Document} d Document reference to bind the utility class to.
6864
- * @param {settings} s Optional settings collection.
6870
+ * @param {Document} doc Document reference to bind the utility class to.
6871
+ * @param {settings} settings Optional settings collection.
6865
6872
  */
6866
6873
  function DOMUtils(doc, settings) {
6867
6874
  var self = this, blockElementsMap;
@@ -7253,6 +7260,7 @@ define("tinymce/dom/DOMUtils", [
7253
7260
  * @param {String/Element} name Name of new element to add or existing element to add.
7254
7261
  * @param {Object} attrs Optional object collection with arguments to add to the new element(s).
7255
7262
  * @param {String} html Optional inner HTML contents to add for each element.
7263
+ * @param {Boolean} create
7256
7264
  * @return {Element/Array} Element that got created, or an array of created elements if multiple input elements
7257
7265
  * were passed in.
7258
7266
  * @example
@@ -7395,9 +7403,9 @@ define("tinymce/dom/DOMUtils", [
7395
7403
  * or the CSS style name like background-color.
7396
7404
  *
7397
7405
  * @method setStyle
7398
- * @param {String/Element/Array} n HTML element/Array of elements to set CSS style value on.
7399
- * @param {String} na Name of the style value to set.
7400
- * @param {String} v Value to set on the style.
7406
+ * @param {String/Element/Array} elm HTML element/Array of elements to set CSS style value on.
7407
+ * @param {String} name Name of the style value to set.
7408
+ * @param {String} value Value to set on the style.
7401
7409
  * @example
7402
7410
  * // Sets a style value on all paragraphs in the currently active editor
7403
7411
  * tinymce.activeEditor.dom.setStyle(tinymce.activeEditor.dom.select('p'), 'background-color', 'red');
@@ -7445,8 +7453,8 @@ define("tinymce/dom/DOMUtils", [
7445
7453
  * Sets multiple styles on the specified element(s).
7446
7454
  *
7447
7455
  * @method setStyles
7448
- * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set styles on.
7449
- * @param {Object} o Name/Value collection of style items to add to the element(s).
7456
+ * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set styles on.
7457
+ * @param {Object} styles Name/Value collection of style items to add to the element(s).
7450
7458
  * @example
7451
7459
  * // Sets styles on all paragraphs in the currently active editor
7452
7460
  * tinymce.activeEditor.dom.setStyles(tinymce.activeEditor.dom.select('p'), {'background-color': 'red', 'color': 'green'});
@@ -7481,9 +7489,10 @@ define("tinymce/dom/DOMUtils", [
7481
7489
  * Sets the specified attribute of an element or elements.
7482
7490
  *
7483
7491
  * @method setAttrib
7484
- * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set attribute on.
7485
- * @param {String} n Name of attribute to set.
7486
- * @param {String} v Value to set on the attribute - if this value is falsy like null, 0 or '' it will remove the attribute instead.
7492
+ * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set attribute on.
7493
+ * @param {String} name Name of attribute to set.
7494
+ * @param {String} value Value to set on the attribute - if this value is falsy like null, 0 or '' it will remove
7495
+ * the attribute instead.
7487
7496
  * @example
7488
7497
  * // Sets class attribute on all paragraphs in the active editor
7489
7498
  * tinymce.activeEditor.dom.setAttrib(tinymce.activeEditor.dom.select('p'), 'class', 'myclass');
@@ -7696,7 +7705,7 @@ define("tinymce/dom/DOMUtils", [
7696
7705
  * Imports/loads the specified CSS file into the document bound to the class.
7697
7706
  *
7698
7707
  * @method loadCSS
7699
- * @param {String} u URL to CSS file to load.
7708
+ * @param {String} url URL to CSS file to load.
7700
7709
  * @example
7701
7710
  * // Loads a CSS file dynamically into the current document
7702
7711
  * tinymce.DOM.loadCSS('somepath/some.css');
@@ -7795,8 +7804,8 @@ define("tinymce/dom/DOMUtils", [
7795
7804
  * Returns true if the specified element has the specified class.
7796
7805
  *
7797
7806
  * @method hasClass
7798
- * @param {String/Element} n HTML element or element id string to check CSS class on.
7799
- * @param {String} c CSS class to check for.
7807
+ * @param {String/Element} elm HTML element or element id string to check CSS class on.
7808
+ * @param {String} cls CSS class to check for.
7800
7809
  * @return {Boolean} true/false if the specified element has the specified class.
7801
7810
  */
7802
7811
  hasClass: function(elm, cls) {
@@ -7833,7 +7842,7 @@ define("tinymce/dom/DOMUtils", [
7833
7842
  * Hides the specified element(s) by ID by setting the "display" style.
7834
7843
  *
7835
7844
  * @method hide
7836
- * @param {String/Element/Array} e ID of DOM element or DOM element or array with elements or IDs to hide.
7845
+ * @param {String/Element/Array} elm ID of DOM element or DOM element or array with elements or IDs to hide.
7837
7846
  * @example
7838
7847
  * // Hides an element by id in the document
7839
7848
  * tinymce.DOM.hide('myid');
@@ -7846,7 +7855,7 @@ define("tinymce/dom/DOMUtils", [
7846
7855
  * Returns true/false if the element is hidden or not by checking the "display" style.
7847
7856
  *
7848
7857
  * @method isHidden
7849
- * @param {String/Element} e Id or element to check display state on.
7858
+ * @param {String/Element} elm Id or element to check display state on.
7850
7859
  * @return {Boolean} true/false if the element is hidden or not.
7851
7860
  */
7852
7861
  isHidden: function(elm) {
@@ -7871,7 +7880,7 @@ define("tinymce/dom/DOMUtils", [
7871
7880
  *
7872
7881
  * @method setHTML
7873
7882
  * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set HTML inside of.
7874
- * @param {String} h HTML content to set as inner HTML of the element.
7883
+ * @param {String} html HTML content to set as inner HTML of the element.
7875
7884
  * @example
7876
7885
  * // Sets the inner HTML of all paragraphs in the active editor
7877
7886
  * tinymce.activeEditor.dom.setHTML(tinymce.activeEditor.dom.select('p'), 'some inner html');
@@ -7933,7 +7942,6 @@ define("tinymce/dom/DOMUtils", [
7933
7942
  * @method setOuterHTML
7934
7943
  * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set outer HTML on.
7935
7944
  * @param {Object} html HTML code to set as outer value for the element.
7936
- * @param {Document} doc Optional document scope to use in this process - defaults to the document of the DOM class.
7937
7945
  * @example
7938
7946
  * // Sets the outer HTML of all paragraphs in the active editor
7939
7947
  * tinymce.activeEditor.dom.setOuterHTML(tinymce.activeEditor.dom.select('p'), '<div>some html</div>');
@@ -7946,7 +7954,7 @@ define("tinymce/dom/DOMUtils", [
7946
7954
 
7947
7955
  self.$$(elm).each(function() {
7948
7956
  try {
7949
- // Older FF doesn't have outerHTML 3.6 is still used by some orgaizations
7957
+ // Older FF doesn't have outerHTML 3.6 is still used by some organizations
7950
7958
  if ("outerHTML" in this) {
7951
7959
  this.outerHTML = html;
7952
7960
  return;
@@ -7983,7 +7991,7 @@ define("tinymce/dom/DOMUtils", [
7983
7991
  *
7984
7992
  * @method insertAfter
7985
7993
  * @param {Element} node Element to insert after the reference.
7986
- * @param {Element/String/Array} reference_node Reference element, element id or array of elements to insert after.
7994
+ * @param {Element/String/Array} referenceNode Reference element, element id or array of elements to insert after.
7987
7995
  * @return {Element/Array} Element that got added or an array with elements.
7988
7996
  */
7989
7997
  insertAfter: function(node, referenceNode) {
@@ -8011,8 +8019,9 @@ define("tinymce/dom/DOMUtils", [
8011
8019
  *
8012
8020
  * @method replace
8013
8021
  * @param {Element} newElm New element to replace old ones with.
8014
- * @param {Element/String/Array} oldELm Element DOM node, element id or array of elements or ids to replace.
8015
- * @param {Boolean} k Optional keep children state, if set to true child nodes from the old object will be added to new ones.
8022
+ * @param {Element/String/Array} oldElm Element DOM node, element id or array of elements or ids to replace.
8023
+ * @param {Boolean} keepChildren Optional keep children state, if set to true child nodes from the old object will be added
8024
+ * to new ones.
8016
8025
  */
8017
8026
  replace: function(newElm, oldElm, keepChildren) {
8018
8027
  var self = this;
@@ -8106,9 +8115,9 @@ define("tinymce/dom/DOMUtils", [
8106
8115
  * Executes the specified function on the element by id or dom element node or array of elements/id.
8107
8116
  *
8108
8117
  * @method run
8109
- * @param {String/Element/Array} Element ID or DOM element object or array with ids or elements.
8110
- * @param {function} f Function to execute for each item.
8111
- * @param {Object} s Optional scope to execute the function in.
8118
+ * @param {String/Element/Array} elm ID or DOM element object or array with ids or elements.
8119
+ * @param {function} func Function to execute for each item.
8120
+ * @param {Object} scope Optional scope to execute the function in.
8112
8121
  * @return {Object/Array} Single object, or an array of objects if multiple input elements were passed in.
8113
8122
  */
8114
8123
  run: function(elm, func, scope) {
@@ -8648,7 +8657,6 @@ define("tinymce/dom/ScriptLoader", [
8648
8657
  * @method load
8649
8658
  * @param {String} url Absolute URL to script to add.
8650
8659
  * @param {function} callback Optional callback function to execute ones this script gets loaded.
8651
- * @param {Object} scope Optional scope to execute callback in.
8652
8660
  */
8653
8661
  function loadScript(url, callback) {
8654
8662
  var dom = DOM, elm, id;
@@ -8720,7 +8728,7 @@ define("tinymce/dom/ScriptLoader", [
8720
8728
  * the script loader or to skip it from loading some script.
8721
8729
  *
8722
8730
  * @method markDone
8723
- * @param {string} u Absolute URL to the script to mark as loaded.
8731
+ * @param {string} url Absolute URL to the script to mark as loaded.
8724
8732
  */
8725
8733
  this.markDone = function(url) {
8726
8734
  states[url] = LOADED;
@@ -9207,6 +9215,7 @@ define("tinymce/dom/RangeUtils", [
9207
9215
  * @private
9208
9216
  * @param {Node} node Node to collect siblings from.
9209
9217
  * @param {String} name Name of the sibling to check for.
9218
+ * @param {Node} end_node
9210
9219
  * @return {Array} Array of collected siblings.
9211
9220
  */
9212
9221
  function collectSiblings(node, name, end_node) {
@@ -15010,6 +15019,7 @@ define("tinymce/dom/Selection", [
15010
15019
  * @method Selection
15011
15020
  * @param {tinymce.dom.DOMUtils} dom DOMUtils object reference.
15012
15021
  * @param {Window} win Window to bind the selection object to.
15022
+ * @param {tinymce.Editor} editor
15013
15023
  * @param {tinymce.dom.Serializer} serializer DOM serialization class to use for getContent.
15014
15024
  */
15015
15025
  function Selection(dom, win, serializer, editor) {
@@ -15055,7 +15065,7 @@ define("tinymce/dom/Selection", [
15055
15065
  * Returns the selected contents using the DOM serializer passed in to this class.
15056
15066
  *
15057
15067
  * @method getContent
15058
- * @param {Object} s Optional settings class with for example output format text or html.
15068
+ * @param {Object} args Optional settings class with for example output format text or html.
15059
15069
  * @return {String} Selected contents in for example HTML format.
15060
15070
  * @example
15061
15071
  * // Alerts the currently selected contents
@@ -15130,7 +15140,7 @@ define("tinymce/dom/Selection", [
15130
15140
  args = args || {format: 'html'};
15131
15141
  args.set = true;
15132
15142
  args.selection = true;
15133
- content = args.content = content;
15143
+ args.content = content;
15134
15144
 
15135
15145
  // Dispatch before set content event
15136
15146
  if (!args.no_events) {
@@ -15351,7 +15361,7 @@ define("tinymce/dom/Selection", [
15351
15361
  * Selects the specified element. This will place the start and end of the selection range around the element.
15352
15362
  *
15353
15363
  * @method select
15354
- * @param {Element} node HMTL DOM element to select.
15364
+ * @param {Element} node HTML DOM element to select.
15355
15365
  * @param {Boolean} content Optional bool state if the contents should be selected or not on non IE browser.
15356
15366
  * @return {Element} Selected element the same element as the one that got passed in.
15357
15367
  * @example
@@ -15549,6 +15559,7 @@ define("tinymce/dom/Selection", [
15549
15559
  *
15550
15560
  * @method setRng
15551
15561
  * @param {Range} rng Range to select.
15562
+ * @param {Boolean} forward
15552
15563
  */
15553
15564
  setRng: function(rng, forward) {
15554
15565
  var self = this, sel, node;
@@ -15607,7 +15618,6 @@ define("tinymce/dom/Selection", [
15607
15618
  if (rng.cloneRange) {
15608
15619
  try {
15609
15620
  self.tridentSel.addRange(rng);
15610
- return;
15611
15621
  } catch (ex) {
15612
15622
  //IE9 throws an error here if called before selection is placed in the editor
15613
15623
  }
@@ -16462,8 +16472,8 @@ define("tinymce/Formatter", [
16462
16472
  * Returns the format by name or all formats if no name is specified.
16463
16473
  *
16464
16474
  * @method get
16465
- * @param {String} name Optional name to retrive by.
16466
- * @return {Array/Object} Array/Object with all registred formats or a specific format.
16475
+ * @param {String} name Optional name to retrieve by.
16476
+ * @return {Array/Object} Array/Object with all registered formats or a specific format.
16467
16477
  */
16468
16478
  function get(name) {
16469
16479
  return name ? formats[name] : formats;
@@ -16803,7 +16813,7 @@ define("tinymce/Formatter", [
16803
16813
 
16804
16814
  // Remove empty nodes but only if there is multiple wrappers and they are not block
16805
16815
  // elements so never remove single <h1></h1> since that would remove the
16806
- // currrent empty block element where the caret is at
16816
+ // current empty block element where the caret is at
16807
16817
  if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) {
16808
16818
  dom.remove(node, 1);
16809
16819
  return;
@@ -17502,8 +17512,8 @@ define("tinymce/Formatter", [
17502
17512
  * Compares two string/nodes regardless of their case.
17503
17513
  *
17504
17514
  * @private
17505
- * @param {String/Node} Node or string to compare.
17506
- * @param {String/Node} Node or string to compare.
17515
+ * @param {String/Node} str1 Node or string to compare.
17516
+ * @param {String/Node} str2 Node or string to compare.
17507
17517
  * @return {boolean} True/false if they match.
17508
17518
  */
17509
17519
  function isEq(str1, str2) {
@@ -17534,7 +17544,7 @@ define("tinymce/Formatter", [
17534
17544
  * to make it more easy to match. This will resolve a few browser issues.
17535
17545
  *
17536
17546
  * @private
17537
- * @param {Node} node to get style from.
17547
+ * @param {String} value Value to get style from.
17538
17548
  * @param {String} name Style name to get.
17539
17549
  * @return {String} Style item value.
17540
17550
  */
@@ -17598,7 +17608,8 @@ define("tinymce/Formatter", [
17598
17608
  *
17599
17609
  * @private
17600
17610
  * @param {Object} rng Range like object.
17601
- * @param {Array} formats Array with formats to expand by.
17611
+ * @param {Array} format Array with formats to expand by.
17612
+ * @param {Boolean} remove
17602
17613
  * @return {Object} Expanded range like object.
17603
17614
  */
17604
17615
  function expandRng(rng, format, remove) {
@@ -18625,7 +18636,7 @@ define("tinymce/UndoManager", [
18625
18636
 
18626
18637
  trimContentRegExp = new RegExp([
18627
18638
  '<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\\/span>', // Trim bogus spans like caret containers
18628
- '\\s?data-mce-selected="[^"]+"' // Trim temporaty data-mce prefixed attributes like data-mce-selected
18639
+ '\\s?data-mce-selected="[^"]+"' // Trim temporary data-mce prefixed attributes like data-mce-selected
18629
18640
  ].join('|'), 'gi');
18630
18641
 
18631
18642
  return function(editor) {
@@ -18751,7 +18762,7 @@ define("tinymce/UndoManager", [
18751
18762
  return;
18752
18763
  }
18753
18764
 
18754
- // Is caracter positon keys left,right,up,down,home,end,pgdown,pgup,enter
18765
+ // Is character position keys left,right,up,down,home,end,pgdown,pgup,enter
18755
18766
  if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 45) {
18756
18767
  if (self.typing) {
18757
18768
  addNonTypingUndoLevel(e);
@@ -18788,7 +18799,7 @@ define("tinymce/UndoManager", [
18788
18799
 
18789
18800
  /*eslint consistent-this:0 */
18790
18801
  self = {
18791
- // Explose for debugging reasons
18802
+ // Explode for debugging reasons
18792
18803
  data: data,
18793
18804
 
18794
18805
  /**
@@ -18816,7 +18827,7 @@ define("tinymce/UndoManager", [
18816
18827
  *
18817
18828
  * @method add
18818
18829
  * @param {Object} level Optional undo level object to add.
18819
- * @param {DOMEvent} Event Optional event responsible for the creation of the undo level.
18830
+ * @param {DOMEvent} event Optional event responsible for the creation of the undo level.
18820
18831
  * @return {Object} Undo level that got added or null it a level wasn't needed.
18821
18832
  */
18822
18833
  add: function(level, event) {
@@ -18966,10 +18977,10 @@ define("tinymce/UndoManager", [
18966
18977
  },
18967
18978
 
18968
18979
  /**
18969
- * Executes the specified function in an undo transation. The selection
18980
+ * Executes the specified function in an undo translation. The selection
18970
18981
  * before the modification will be stored to the undo stack and if the DOM changes
18971
- * it will add a new undo level. Any methods within the transation that adds undo levels will
18972
- * be ignored. So a transation can include calls to execCommand or editor.insertContent.
18982
+ * it will add a new undo level. Any methods within the translation that adds undo levels will
18983
+ * be ignored. So a translation can include calls to execCommand or editor.insertContent.
18973
18984
  *
18974
18985
  * @method transact
18975
18986
  * @param {function} callback Function to execute dom manipulation logic in.
@@ -19543,7 +19554,7 @@ define("tinymce/EnterKey", [
19543
19554
  }
19544
19555
  }
19545
19556
 
19546
- // Get editable root node normaly the body element but sometimes a div or span
19557
+ // Get editable root node, normally the body element but sometimes a div or span
19547
19558
  editableRoot = getEditableRoot(container);
19548
19559
 
19549
19560
  // If there is no editable root then enter is done inside a contentEditable false element
@@ -19862,6 +19873,7 @@ define("tinymce/EditorCommands", [
19862
19873
  * @param {String} command Command to execute.
19863
19874
  * @param {Boolean} ui Optional user interface state.
19864
19875
  * @param {Object} value Optional value for command.
19876
+ * @param {Object} args
19865
19877
  * @return {Boolean} true/false if the command was found or not.
19866
19878
  */
19867
19879
  function execCommand(command, ui, value, args) {
@@ -19871,7 +19883,6 @@ define("tinymce/EditorCommands", [
19871
19883
  editor.focus();
19872
19884
  }
19873
19885
 
19874
- args = extend({}, args);
19875
19886
  args = editor.fire('BeforeExecCommand', {command: command, ui: ui, value: value});
19876
19887
  if (args.isDefaultPrevented()) {
19877
19888
  return false;
@@ -20004,7 +20015,7 @@ define("tinymce/EditorCommands", [
20004
20015
  * Returns true/false if the command is supported or not.
20005
20016
  *
20006
20017
  * @method queryCommandSupported
20007
- * @param {String} cmd Command that we check support for.
20018
+ * @param {String} command Command that we check support for.
20008
20019
  * @return {Boolean} true/false if the command is supported or not.
20009
20020
  */
20010
20021
  function queryCommandSupported(command) {
@@ -22304,8 +22315,8 @@ define("tinymce/ui/Selector", [
22304
22315
  add(compileAttrFilter(parts[4], parts[5], parts[6]));
22305
22316
  add(compilePsuedoFilter(parts[7]));
22306
22317
 
22307
- // Mark the filter with psuedo for performance
22308
- filters.psuedo = !!parts[7];
22318
+ // Mark the filter with pseudo for performance
22319
+ filters.pseudo = !!parts[7];
22309
22320
  filters.direct = direct;
22310
22321
 
22311
22322
  return filters;
@@ -22353,7 +22364,7 @@ define("tinymce/ui/Selector", [
22353
22364
  * Returns true/false if the selector matches the specified control.
22354
22365
  *
22355
22366
  * @method match
22356
- * @param {tinymce.ui.Control} control Control to match agains the selector.
22367
+ * @param {tinymce.ui.Control} control Control to match against the selector.
22357
22368
  * @param {Array} selectors Optional array of selectors, mostly used internally.
22358
22369
  * @return {Boolean} true/false state if the control matches or not.
22359
22370
  */
@@ -22371,8 +22382,8 @@ define("tinymce/ui/Selector", [
22371
22382
  filters = selector[si];
22372
22383
 
22373
22384
  while (item) {
22374
- // Find the index and length since a psuedo filter like :first needs it
22375
- if (filters.psuedo) {
22385
+ // Find the index and length since a pseudo filter like :first needs it
22386
+ if (filters.pseudo) {
22376
22387
  siblings = item.parent().items();
22377
22388
  index = length = siblings.length;
22378
22389
  while (index--) {
@@ -22429,7 +22440,7 @@ define("tinymce/ui/Selector", [
22429
22440
  for (i = 0, l = items.length; i < l; i++) {
22430
22441
  item = items[i];
22431
22442
 
22432
- // Run each filter agains the item
22443
+ // Run each filter against the item
22433
22444
  for (fi = 0, fl = filters.length; fi < fl; fi++) {
22434
22445
  if (!filters[fi](item, i, l)) {
22435
22446
  fi = fl + 1;
@@ -23047,7 +23058,7 @@ define("tinymce/ui/DomUtils", [
23047
23058
  */
23048
23059
 
23049
23060
  /**
23050
- * Utility class for box parsing and measuing.
23061
+ * Utility class for box parsing and measuring.
23051
23062
  *
23052
23063
  * @private
23053
23064
  * @class tinymce.ui.BoxUtils
@@ -23756,7 +23767,7 @@ define("tinymce/ui/Control", [
23756
23767
  */
23757
23768
  repaint: function() {
23758
23769
  var self = this, style, bodyStyle, bodyElm, rect, borderBox;
23759
- var borderW = 0, borderH = 0, lastRepaintRect, round, value;
23770
+ var borderW, borderH, lastRepaintRect, round, value;
23760
23771
 
23761
23772
  // Use Math.round on all values on IE < 9
23762
23773
  round = !document.createRange ? Math.round : function(value) {
@@ -23878,7 +23889,7 @@ define("tinymce/ui/Control", [
23878
23889
  * @method off
23879
23890
  * @param {String} [name] Name for the event to unbind.
23880
23891
  * @param {function} [callback] Callback function to unbind.
23881
- * @return {mxex.ui.Control} Current control object.
23892
+ * @return {tinymce.ui.Control} Current control object.
23882
23893
  */
23883
23894
  off: function(name, callback) {
23884
23895
  getEventDispatcher(this).off(name, callback);
@@ -23892,7 +23903,7 @@ define("tinymce/ui/Control", [
23892
23903
  * @method fire
23893
23904
  * @param {String} name Name of the event to fire.
23894
23905
  * @param {Object} [args] Arguments to pass to the event.
23895
- * @param {Boolean} [bubble] Value to control bubbeling. Defaults to true.
23906
+ * @param {Boolean} [bubble] Value to control bubbling. Defaults to true.
23896
23907
  * @return {Object} Current arguments object.
23897
23908
  */
23898
23909
  fire: function(name, args, bubble) {
@@ -27491,6 +27502,7 @@ define("tinymce/WindowManager", [
27491
27502
  *
27492
27503
  * @method open
27493
27504
  * @param {Object} args Optional name/value settings collection contains things like width/height/url etc.
27505
+ * @param {Object} params
27494
27506
  * @option {String} title Window title.
27495
27507
  * @option {String} file URL of the file to open in the window.
27496
27508
  * @option {Number} width Width in pixels.
@@ -27602,7 +27614,7 @@ define("tinymce/WindowManager", [
27602
27614
  * native version use the callback method instead then it can be extended.
27603
27615
  *
27604
27616
  * @method confirm
27605
- * @param {String} messageText to display in the new confirm dialog.
27617
+ * @param {String} message Text to display in the new confirm dialog.
27606
27618
  * @param {function} callback Callback function to be executed after the user has selected ok or cancel.
27607
27619
  * @param {Object} scope Optional scope to execute the callback in.
27608
27620
  * @example
@@ -27671,55 +27683,55 @@ define("tinymce/WindowManager", [
27671
27683
 
27672
27684
  // Included from: js/tinymce/classes/dom/NodePath.js
27673
27685
 
27674
- /**
27675
- * NodePath.js
27676
- *
27677
- * Released under LGPL License.
27678
- * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
27679
- *
27680
- * License: http://www.tinymce.com/license
27681
- * Contributing: http://www.tinymce.com/contributing
27682
- */
27683
-
27684
- /**
27685
- * Handles paths of nodes within an element.
27686
- *
27687
- * @private
27688
- * @class tinymce.dom.NodePath
27689
- */
27690
- define("tinymce/dom/NodePath", [
27691
- "tinymce/dom/DOMUtils"
27692
- ], function(DOMUtils) {
27693
- function create(rootNode, targetNode, normalized) {
27694
- var path = [];
27695
-
27696
- for (; targetNode && targetNode != rootNode; targetNode = targetNode.parentNode) {
27697
- path.push(DOMUtils.nodeIndex(targetNode, normalized));
27698
- }
27699
-
27700
- return path;
27701
- }
27702
-
27703
- function resolve(rootNode, path) {
27704
- var i, node, children;
27705
-
27706
- for (node = rootNode, i = path.length - 1; i >= 0; i--) {
27707
- children = node.childNodes;
27708
-
27709
- if (path[i] > children.length - 1) {
27710
- return null;
27711
- }
27712
-
27713
- node = children[path[i]];
27714
- }
27715
-
27716
- return node;
27717
- }
27718
-
27719
- return {
27720
- create: create,
27721
- resolve: resolve
27722
- };
27686
+ /**
27687
+ * NodePath.js
27688
+ *
27689
+ * Released under LGPL License.
27690
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
27691
+ *
27692
+ * License: http://www.tinymce.com/license
27693
+ * Contributing: http://www.tinymce.com/contributing
27694
+ */
27695
+
27696
+ /**
27697
+ * Handles paths of nodes within an element.
27698
+ *
27699
+ * @private
27700
+ * @class tinymce.dom.NodePath
27701
+ */
27702
+ define("tinymce/dom/NodePath", [
27703
+ "tinymce/dom/DOMUtils"
27704
+ ], function(DOMUtils) {
27705
+ function create(rootNode, targetNode, normalized) {
27706
+ var path = [];
27707
+
27708
+ for (; targetNode && targetNode != rootNode; targetNode = targetNode.parentNode) {
27709
+ path.push(DOMUtils.nodeIndex(targetNode, normalized));
27710
+ }
27711
+
27712
+ return path;
27713
+ }
27714
+
27715
+ function resolve(rootNode, path) {
27716
+ var i, node, children;
27717
+
27718
+ for (node = rootNode, i = path.length - 1; i >= 0; i--) {
27719
+ children = node.childNodes;
27720
+
27721
+ if (path[i] > children.length - 1) {
27722
+ return null;
27723
+ }
27724
+
27725
+ node = children[path[i]];
27726
+ }
27727
+
27728
+ return node;
27729
+ }
27730
+
27731
+ return {
27732
+ create: create,
27733
+ resolve: resolve
27734
+ };
27723
27735
  });
27724
27736
 
27725
27737
  // Included from: js/tinymce/classes/util/Quirks.js
@@ -29758,7 +29770,7 @@ define("tinymce/Shortcuts", [
29758
29770
  * @param {String} pattern Shortcut pattern. Like for example: ctrl+alt+o.
29759
29771
  * @param {String} desc Text description for the command.
29760
29772
  * @param {String/Function} cmdFunc Command name string or function to execute when the key is pressed.
29761
- * @param {Object} sc Optional scope to execute the function in.
29773
+ * @param {Object} scope Optional scope to execute the function in.
29762
29774
  * @return {Boolean} true/false state if the shortcut was added or not.
29763
29775
  */
29764
29776
  self.add = function(pattern, desc, cmdFunc, scope) {
@@ -30890,7 +30902,7 @@ define("tinymce/Editor", [
30890
30902
  self.isNotDirty = true;
30891
30903
 
30892
30904
  /**
30893
- * Name/Value object containting plugin instances.
30905
+ * Name/Value object containing plugin instances.
30894
30906
  *
30895
30907
  * @property plugins
30896
30908
  * @type Object
@@ -30990,7 +31002,7 @@ define("tinymce/Editor", [
30990
31002
 
30991
31003
  Editor.prototype = {
30992
31004
  /**
30993
- * Renderes the editor/adds it to the page.
31005
+ * Renders the editor/adds it to the page.
30994
31006
  *
30995
31007
  * @method render
30996
31008
  */
@@ -33357,7 +33369,7 @@ define("tinymce/EditorManager", [
33357
33369
  * @property minorVersion
33358
33370
  * @type String
33359
33371
  */
33360
- minorVersion: '2.7',
33372
+ minorVersion: '2.8',
33361
33373
 
33362
33374
  /**
33363
33375
  * Release date of TinyMCE build.
@@ -33365,7 +33377,7 @@ define("tinymce/EditorManager", [
33365
33377
  * @property releaseDate
33366
33378
  * @type String
33367
33379
  */
33368
- releaseDate: '2015-10-27',
33380
+ releaseDate: '2015-11-13',
33369
33381
 
33370
33382
  /**
33371
33383
  * Collection of editor instances.
@@ -33807,9 +33819,9 @@ define("tinymce/EditorManager", [
33807
33819
  * Executes a specific command on the currently active editor.
33808
33820
  *
33809
33821
  * @method execCommand
33810
- * @param {String} c Command to perform for example Bold.
33811
- * @param {Boolean} u Optional boolean state if a UI should be presented for the command or not.
33812
- * @param {String} v Optional value parameter like for example an URL to a link.
33822
+ * @param {String} cmd Command to perform for example Bold.
33823
+ * @param {Boolean} ui Optional boolean state if a UI should be presented for the command or not.
33824
+ * @param {String} value Optional value parameter like for example an URL to a link.
33813
33825
  * @return {Boolean} true/false if the command was executed or not.
33814
33826
  */
33815
33827
  execCommand: function(cmd, ui, value) {
@@ -34657,7 +34669,7 @@ define("tinymce/Compat", [
34657
34669
  // Describe the different namespaces
34658
34670
 
34659
34671
  /**
34660
- * Root level namespace this contains classes directly releated to the TinyMCE editor.
34672
+ * Root level namespace this contains classes directly related to the TinyMCE editor.
34661
34673
  *
34662
34674
  * @namespace tinymce
34663
34675
  */
@@ -37769,21 +37781,23 @@ define("tinymce/ui/FormatControls", [
37769
37781
 
37770
37782
  formatMenu = createFormatMenu();
37771
37783
 
37772
- function initOnPostRender() {
37773
- var self = this;
37784
+ function initOnPostRender(name) {
37785
+ return function() {
37786
+ var self = this;
37774
37787
 
37775
- // TODO: Fix this
37776
- if (editor.formatter) {
37777
- editor.formatter.formatChanged(name, function(state) {
37778
- self.active(state);
37779
- });
37780
- } else {
37781
- editor.on('init', function() {
37788
+ // TODO: Fix this
37789
+ if (editor.formatter) {
37782
37790
  editor.formatter.formatChanged(name, function(state) {
37783
37791
  self.active(state);
37784
37792
  });
37785
- });
37786
- }
37793
+ } else {
37794
+ editor.on('init', function() {
37795
+ editor.formatter.formatChanged(name, function(state) {
37796
+ self.active(state);
37797
+ });
37798
+ });
37799
+ }
37800
+ };
37787
37801
  }
37788
37802
 
37789
37803
  // Simple format controls <control/format>:<UI text>
@@ -37797,9 +37811,7 @@ define("tinymce/ui/FormatControls", [
37797
37811
  }, function(text, name) {
37798
37812
  editor.addButton(name, {
37799
37813
  tooltip: text,
37800
- onPostRender: function() {
37801
- initOnPostRender();
37802
- },
37814
+ onPostRender: initOnPostRender(name),
37803
37815
  onclick: function() {
37804
37816
  toggleFormat(name);
37805
37817
  }
@@ -37841,9 +37853,7 @@ define("tinymce/ui/FormatControls", [
37841
37853
  editor.addButton(name, {
37842
37854
  tooltip: item[0],
37843
37855
  cmd: item[1],
37844
- onPostRender: function() {
37845
- initOnPostRender();
37846
- }
37856
+ onPostRender: initOnPostRender(name)
37847
37857
  });
37848
37858
  });
37849
37859
 
@@ -38115,7 +38125,7 @@ define("tinymce/ui/GridLayout", [
38115
38125
  * @param {tinymce.ui.Container} container Container instance to recalc.
38116
38126
  */
38117
38127
  recalc: function(container) {
38118
- var settings = container.settings, rows, cols, items, contLayoutRect, width, height, rect,
38128
+ var settings, rows, cols, items, contLayoutRect, width, height, rect,
38119
38129
  ctrlLayoutRect, ctrl, x, y, posX, posY, ctrlSettings, contPaddingBox, align, spacingH, spacingV, alignH, alignV, maxX, maxY,
38120
38130
  colWidths = [], rowHeights = [], ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight, reverseRows, idx;
38121
38131
 
@@ -38356,7 +38366,7 @@ define("tinymce/ui/Iframe", [
38356
38366
  /*eslint no-script-url:0 */
38357
38367
  return (
38358
38368
  '<iframe id="' + self._id + '" class="' + self.classes + '" tabindex="-1" src="' +
38359
- (self.settings.url || "javascript:\'\'") + '" frameborder="0"></iframe>'
38369
+ (self.settings.url || "javascript:''") + '" frameborder="0"></iframe>'
38360
38370
  );
38361
38371
  },
38362
38372
 
@@ -38431,7 +38441,7 @@ define("tinymce/ui/Label", [
38431
38441
  *
38432
38442
  * @constructor
38433
38443
  * @param {Object} settings Name/value object with settings.
38434
- * @param {Boolean} multiline Multiline label.
38444
+ * @setting {Boolean} multiline Multiline label.
38435
38445
  */
38436
38446
  init: function(settings) {
38437
38447
  var self = this;
@@ -39119,7 +39129,6 @@ define("tinymce/ui/MenuItem", [
39119
39129
  }
39120
39130
 
39121
39131
  if (settings.image) {
39122
- icon = 'none';
39123
39132
  image = ' style="background-image: url(\'' + settings.image + '\')"';
39124
39133
  }
39125
39134
 
@@ -39228,7 +39237,7 @@ define("tinymce/ui/Menu", [
39228
39237
  ], function(FloatPanel, MenuItem, Tools) {
39229
39238
  "use strict";
39230
39239
 
39231
- var Menu = FloatPanel.extend({
39240
+ return FloatPanel.extend({
39232
39241
  Defaults: {
39233
39242
  defaultType: 'menuitem',
39234
39243
  border: 1,
@@ -39323,8 +39332,6 @@ define("tinymce/ui/Menu", [
39323
39332
  return self._super();
39324
39333
  }
39325
39334
  });
39326
-
39327
- return Menu;
39328
39335
  });
39329
39336
 
39330
39337
  // Included from: js/tinymce/classes/ui/ListBox.js
@@ -39597,10 +39604,10 @@ define("tinymce/ui/Rect", [
39597
39604
  * Tests various positions to get the most suitable one.
39598
39605
  *
39599
39606
  * @method findBestRelativePosition
39600
- * @param {Rect} Rect Rect to use as source.
39607
+ * @param {Rect} rect Rect to use as source.
39601
39608
  * @param {Rect} targetRect Rect to move relative to.
39602
39609
  * @param {Rect} constrainRect Rect to constrain within.
39603
- * @param {Array} Array of relative positions to test against.
39610
+ * @param {Array} rels Array of relative positions to test against.
39604
39611
  */
39605
39612
  function findBestRelativePosition(rect, targetRect, constrainRect, rels) {
39606
39613
  var pos, i;
@@ -39641,13 +39648,13 @@ define("tinymce/ui/Rect", [
39641
39648
  * @param {Rect} cropRect The second rectangle to compare.
39642
39649
  * @return {Rect} The intersection of the two rectangles or null if they don't intersect.
39643
39650
  */
39644
- function intersect(rect1, rect2) {
39651
+ function intersect(rect, cropRect) {
39645
39652
  var x1, y1, x2, y2;
39646
39653
 
39647
- x1 = max(rect1.x, rect2.x);
39648
- y1 = max(rect1.y, rect2.y);
39649
- x2 = min(rect1.x + rect1.w, rect2.x + rect2.w);
39650
- y2 = min(rect1.y + rect1.h, rect2.y + rect2.h);
39654
+ x1 = max(rect.x, cropRect.x);
39655
+ y1 = max(rect.y, cropRect.y);
39656
+ x2 = min(rect.x + rect.w, cropRect.x + cropRect.w);
39657
+ y2 = min(rect.y + rect.h, cropRect.y + cropRect.h);
39651
39658
 
39652
39659
  if (x2 - x1 < 0 || y2 - y1 < 0) {
39653
39660
  return null;
@@ -40438,7 +40445,7 @@ define("tinymce/ui/TextBox", [
40438
40445
  * @method repaint
40439
40446
  */
40440
40447
  repaint: function() {
40441
- var self = this, style, rect, borderBox, borderW = 0, borderH = 0, lastRepaintRect;
40448
+ var self = this, style, rect, borderBox, borderW, borderH = 0, lastRepaintRect;
40442
40449
 
40443
40450
  style = self.getEl().style;
40444
40451
  rect = self._layoutRect;