tinymce-rails 4.2.6 → 4.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // 4.2.6 (2015-09-28)
1
+ // 4.2.7 (2015-10-27)
2
2
 
3
3
  /**
4
4
  * Compiled inline version. (Library mode)
@@ -6392,7 +6392,7 @@ define("tinymce/html/Entities", [
6392
6392
 
6393
6393
  var Entities = {
6394
6394
  /**
6395
- * Encodes the specified string using raw entities. This means only the required XML base entities will be endoded.
6395
+ * Encodes the specified string using raw entities. This means only the required XML base entities will be encoded.
6396
6396
  *
6397
6397
  * @method encodeRaw
6398
6398
  * @param {String} text Text to encode.
@@ -6834,6 +6834,27 @@ define("tinymce/dom/DOMUtils", [
6834
6834
  $elm.attr('data-mce-style', value);
6835
6835
  }
6836
6836
 
6837
+ function nodeIndex(node, normalized) {
6838
+ var idx = 0, lastNodeType, nodeType;
6839
+
6840
+ if (node) {
6841
+ for (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) {
6842
+ nodeType = node.nodeType;
6843
+
6844
+ // Normalize text nodes
6845
+ if (normalized && nodeType == 3) {
6846
+ if (nodeType == lastNodeType || !node.nodeValue.length) {
6847
+ continue;
6848
+ }
6849
+ }
6850
+ idx++;
6851
+ lastNodeType = nodeType;
6852
+ }
6853
+ }
6854
+
6855
+ return idx;
6856
+ }
6857
+
6837
6858
  /**
6838
6859
  * Constructs a new DOMUtils instance. Consult the Wiki for more details on settings etc for this class.
6839
6860
  *
@@ -8250,26 +8271,7 @@ define("tinymce/dom/DOMUtils", [
8250
8271
  * @param {boolean} normalized Optional true/false state if the index is what it would be after a normalization.
8251
8272
  * @return {Number} Index of the specified node.
8252
8273
  */
8253
- nodeIndex: function(node, normalized) {
8254
- var idx = 0, lastNodeType, nodeType;
8255
-
8256
- if (node) {
8257
- for (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) {
8258
- nodeType = node.nodeType;
8259
-
8260
- // Normalize text nodes
8261
- if (normalized && nodeType == 3) {
8262
- if (nodeType == lastNodeType || !node.nodeValue.length) {
8263
- continue;
8264
- }
8265
- }
8266
- idx++;
8267
- lastNodeType = nodeType;
8268
- }
8269
- }
8270
-
8271
- return idx;
8272
- },
8274
+ nodeIndex: nodeIndex,
8273
8275
 
8274
8276
  /**
8275
8277
  * Splits an element into two new elements and places the specified split
@@ -8578,6 +8580,7 @@ define("tinymce/dom/DOMUtils", [
8578
8580
  * tinymce.DOM.addClass('someid', 'someclass');
8579
8581
  */
8580
8582
  DOMUtils.DOM = new DOMUtils(document);
8583
+ DOMUtils.nodeIndex = nodeIndex;
8581
8584
 
8582
8585
  return DOMUtils;
8583
8586
  });
@@ -9381,6 +9384,10 @@ define("tinymce/dom/RangeUtils", [
9381
9384
  var container, offset, walker, body = dom.getRoot(), node, nonEmptyElementsMap;
9382
9385
  var directionLeft, isAfterNode;
9383
9386
 
9387
+ function isTableCell(node) {
9388
+ return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
9389
+ }
9390
+
9384
9391
  function hasBrBeforeAfter(node, left) {
9385
9392
  var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body);
9386
9393
 
@@ -9494,7 +9501,7 @@ define("tinymce/dom/RangeUtils", [
9494
9501
  }
9495
9502
 
9496
9503
  // Found a BR/IMG element that we can place the caret before
9497
- if (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
9504
+ if (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !isTableCell(node)) {
9498
9505
  offset = dom.nodeIndex(node);
9499
9506
  container = node.parentNode;
9500
9507
 
@@ -12926,27 +12933,29 @@ define("tinymce/html/Serializer", [
12926
12933
  sortedAttrs.map = {};
12927
12934
 
12928
12935
  elementRule = schema.getElementRule(node.name);
12929
- for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) {
12930
- attrName = elementRule.attributesOrder[i];
12931
-
12932
- if (attrName in attrs.map) {
12933
- attrValue = attrs.map[attrName];
12934
- sortedAttrs.map[attrName] = attrValue;
12935
- sortedAttrs.push({name: attrName, value: attrValue});
12936
+ if (elementRule) {
12937
+ for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) {
12938
+ attrName = elementRule.attributesOrder[i];
12939
+
12940
+ if (attrName in attrs.map) {
12941
+ attrValue = attrs.map[attrName];
12942
+ sortedAttrs.map[attrName] = attrValue;
12943
+ sortedAttrs.push({name: attrName, value: attrValue});
12944
+ }
12936
12945
  }
12937
- }
12938
12946
 
12939
- for (i = 0, l = attrs.length; i < l; i++) {
12940
- attrName = attrs[i].name;
12947
+ for (i = 0, l = attrs.length; i < l; i++) {
12948
+ attrName = attrs[i].name;
12941
12949
 
12942
- if (!(attrName in sortedAttrs.map)) {
12943
- attrValue = attrs.map[attrName];
12944
- sortedAttrs.map[attrName] = attrValue;
12945
- sortedAttrs.push({name: attrName, value: attrValue});
12950
+ if (!(attrName in sortedAttrs.map)) {
12951
+ attrValue = attrs.map[attrName];
12952
+ sortedAttrs.map[attrName] = attrValue;
12953
+ sortedAttrs.push({name: attrName, value: attrValue});
12954
+ }
12946
12955
  }
12947
- }
12948
12956
 
12949
- attrs = sortedAttrs;
12957
+ attrs = sortedAttrs;
12958
+ }
12950
12959
  }
12951
12960
 
12952
12961
  writer.start(node.name, attrs, isEmpty);
@@ -14061,6 +14070,10 @@ define("tinymce/dom/ControlSelection", [
14061
14070
  return false;
14062
14071
  }
14063
14072
 
14073
+ if (elm == editor.getBody()) {
14074
+ return false;
14075
+ }
14076
+
14064
14077
  return editor.dom.is(elm, selector);
14065
14078
  }
14066
14079
 
@@ -18502,9 +18515,13 @@ define("tinymce/Formatter", [
18502
18515
 
18503
18516
  removeCaretContainer();
18504
18517
 
18505
- // Remove caret container on keydown and it's a backspace, enter or left/right arrow keys
18506
- // Backspace key needs to check if the range is collapsed due to bug #6780
18507
- if ((keyCode == 8 && selection.isCollapsed()) || keyCode == 37 || keyCode == 39) {
18518
+ // Remove caret container if it's empty
18519
+ if (keyCode == 8 && selection.isCollapsed() && selection.getStart().innerHTML == INVISIBLE_CHAR) {
18520
+ removeCaretContainer(getParentCaretContainer(selection.getStart()));
18521
+ }
18522
+
18523
+ // Remove caret container on keydown and it's left/right arrow keys
18524
+ if (keyCode == 37 || keyCode == 39) {
18508
18525
  removeCaretContainer(getParentCaretContainer(selection.getStart()));
18509
18526
  }
18510
18527
 
@@ -19018,6 +19035,10 @@ define("tinymce/EnterKey", [
19018
19035
  dom.getContentEditable(node) !== "true";
19019
19036
  }
19020
19037
 
19038
+ function isTableCell(node) {
19039
+ return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
19040
+ }
19041
+
19021
19042
  // Renders empty block on IE
19022
19043
  function renderBlockOnIE(block) {
19023
19044
  var oldRng;
@@ -19284,10 +19305,15 @@ define("tinymce/EnterKey", [
19284
19305
 
19285
19306
  // Not in a block element or in a table cell or caption
19286
19307
  parentBlock = dom.getParent(container, dom.isBlock);
19287
- rootBlockName = editor.getBody().nodeName.toLowerCase();
19288
19308
  if (!parentBlock || !canSplitBlock(parentBlock)) {
19289
19309
  parentBlock = parentBlock || editableRoot;
19290
19310
 
19311
+ if (parentBlock == editor.getBody() || isTableCell(parentBlock)) {
19312
+ rootBlockName = parentBlock.nodeName.toLowerCase();
19313
+ } else {
19314
+ rootBlockName = parentBlock.parentNode.nodeName.toLowerCase();
19315
+ }
19316
+
19291
19317
  if (!parentBlock.hasChildNodes()) {
19292
19318
  newBlock = dom.create(blockName);
19293
19319
  setForcedBlockAttrs(newBlock);
@@ -19358,6 +19384,10 @@ define("tinymce/EnterKey", [
19358
19384
  return containerBlock;
19359
19385
  }
19360
19386
 
19387
+ if (containerBlock == editor.getBody()) {
19388
+ return;
19389
+ }
19390
+
19361
19391
  // Check if we are in an nested list
19362
19392
  var containerBlockParentName = containerBlock.parentNode.nodeName;
19363
19393
  if (/^(OL|UL|LI)$/.test(containerBlockParentName)) {
@@ -20321,7 +20351,9 @@ define("tinymce/EditorCommands", [
20321
20351
 
20322
20352
  // Setup parser and serializer
20323
20353
  parser = editor.parser;
20324
- serializer = new Serializer({}, editor.schema);
20354
+ serializer = new Serializer({
20355
+ validate: settings.validate
20356
+ }, editor.schema);
20325
20357
  bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>';
20326
20358
 
20327
20359
  // Run beforeSetContent handlers on the HTML to be inserted
@@ -27637,6 +27669,59 @@ define("tinymce/WindowManager", [
27637
27669
  };
27638
27670
  });
27639
27671
 
27672
+ // Included from: js/tinymce/classes/dom/NodePath.js
27673
+
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
+ };
27723
+ });
27724
+
27640
27725
  // Included from: js/tinymce/classes/util/Quirks.js
27641
27726
 
27642
27727
  /**
@@ -27661,11 +27746,12 @@ define("tinymce/util/Quirks", [
27661
27746
  "tinymce/util/VK",
27662
27747
  "tinymce/dom/RangeUtils",
27663
27748
  "tinymce/dom/TreeWalker",
27749
+ "tinymce/dom/NodePath",
27664
27750
  "tinymce/html/Node",
27665
27751
  "tinymce/html/Entities",
27666
27752
  "tinymce/Env",
27667
27753
  "tinymce/util/Tools"
27668
- ], function(VK, RangeUtils, TreeWalker, Node, Entities, Env, Tools) {
27754
+ ], function(VK, RangeUtils, TreeWalker, NodePath, Node, Entities, Env, Tools) {
27669
27755
  return function(editor) {
27670
27756
  var each = Tools.each, $ = editor.$;
27671
27757
  var BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection,
@@ -28044,6 +28130,111 @@ define("tinymce/util/Quirks", [
28044
28130
  }
28045
28131
  }
28046
28132
 
28133
+ /**
28134
+ * This retains the formatting if the last character is to be deleted.
28135
+ *
28136
+ * Backspace on this: <p><b><i>a|</i></b></p> would become <p>|</p> in WebKit.
28137
+ * With this patch: <p><b><i>|<br></i></b></p>
28138
+ */
28139
+ function handleLastBlockCharacterDelete(isForward, rng) {
28140
+ var path, blockElm, newBlockElm, clonedBlockElm, sibling,
28141
+ container, offset, br, currentFormatNodes;
28142
+
28143
+ function cloneTextBlockWithFormats(blockElm, node) {
28144
+ currentFormatNodes = $(node).parents().filter(function(idx, node) {
28145
+ return !!editor.schema.getTextInlineElements()[node.nodeName];
28146
+ });
28147
+
28148
+ newBlockElm = blockElm.cloneNode(false);
28149
+
28150
+ currentFormatNodes = Tools.map(currentFormatNodes, function(formatNode) {
28151
+ formatNode = formatNode.cloneNode(false);
28152
+
28153
+ if (newBlockElm.hasChildNodes()) {
28154
+ formatNode.appendChild(newBlockElm.firstChild);
28155
+ newBlockElm.appendChild(formatNode);
28156
+ } else {
28157
+ newBlockElm.appendChild(formatNode);
28158
+ }
28159
+
28160
+ newBlockElm.appendChild(formatNode);
28161
+
28162
+ return formatNode;
28163
+ });
28164
+
28165
+ if (currentFormatNodes.length) {
28166
+ br = dom.create('br');
28167
+ currentFormatNodes[0].appendChild(br);
28168
+ dom.replace(newBlockElm, blockElm);
28169
+
28170
+ rng.setStartBefore(br);
28171
+ rng.setEndBefore(br);
28172
+ editor.selection.setRng(rng);
28173
+
28174
+ return br;
28175
+ }
28176
+
28177
+ return null;
28178
+ }
28179
+
28180
+ function isTextBlock(node) {
28181
+ return node && editor.schema.getTextBlockElements()[node.tagName];
28182
+ }
28183
+
28184
+ if (!rng.collapsed) {
28185
+ return;
28186
+ }
28187
+
28188
+ container = rng.startContainer;
28189
+ offset = rng.startOffset;
28190
+ blockElm = dom.getParent(container, dom.isBlock);
28191
+ if (!isTextBlock(blockElm)) {
28192
+ return;
28193
+ }
28194
+
28195
+ if (container.nodeType == 1) {
28196
+ container = container.childNodes[offset];
28197
+ if (container && container.tagName != 'BR') {
28198
+ return;
28199
+ }
28200
+
28201
+ if (isForward) {
28202
+ sibling = blockElm.nextSibling;
28203
+ } else {
28204
+ sibling = blockElm.previousSibling;
28205
+ }
28206
+
28207
+ if (dom.isEmpty(blockElm) && isTextBlock(sibling) && dom.isEmpty(sibling)) {
28208
+ if (cloneTextBlockWithFormats(blockElm, container)) {
28209
+ dom.remove(sibling);
28210
+ return true;
28211
+ }
28212
+ }
28213
+ } else if (container.nodeType == 3) {
28214
+ path = NodePath.create(blockElm, container);
28215
+ clonedBlockElm = blockElm.cloneNode(true);
28216
+ container = NodePath.resolve(clonedBlockElm, path);
28217
+
28218
+ if (isForward) {
28219
+ if (offset >= container.data.length) {
28220
+ return;
28221
+ }
28222
+
28223
+ container.deleteData(offset, 1);
28224
+ } else {
28225
+ if (offset <= 0) {
28226
+ return;
28227
+ }
28228
+
28229
+ container.deleteData(offset - 1, 1);
28230
+ }
28231
+
28232
+ if (dom.isEmpty(clonedBlockElm)) {
28233
+ return cloneTextBlockWithFormats(blockElm, container);
28234
+ }
28235
+ }
28236
+ }
28237
+
28047
28238
  function customDelete(isForward) {
28048
28239
  var mutationObserver, rng, caretElement;
28049
28240
 
@@ -28133,6 +28324,11 @@ define("tinymce/util/Quirks", [
28133
28324
  return;
28134
28325
  }
28135
28326
 
28327
+ if (handleLastBlockCharacterDelete(isForward, rng)) {
28328
+ e.preventDefault();
28329
+ return;
28330
+ }
28331
+
28136
28332
  // Ignore non meta delete in the where there is text before/after the caret
28137
28333
  if (!isMetaOrCtrl && rng.collapsed && container.nodeType == 3) {
28138
28334
  if (isForward ? offset < container.data.length : offset > 0) {
@@ -28152,7 +28348,7 @@ define("tinymce/util/Quirks", [
28152
28348
 
28153
28349
  // Handle case where text is deleted by typing over
28154
28350
  editor.on('keypress', function(e) {
28155
- if (!isDefaultPrevented(e) && !selection.isCollapsed() && e.charCode && !VK.metaKeyPressed(e)) {
28351
+ if (!isDefaultPrevented(e) && !selection.isCollapsed() && e.charCode > 31 && !VK.metaKeyPressed(e)) {
28156
28352
  var rng, currentFormatNodes, fragmentNode, blockParent, caretNode, charText;
28157
28353
 
28158
28354
  rng = editor.selection.getRng();
@@ -31371,11 +31567,14 @@ define("tinymce/Editor", [
31371
31567
 
31372
31568
  // Keep scripts from executing
31373
31569
  self.parser.addNodeFilter('script', function(nodes) {
31374
- var i = nodes.length, node;
31570
+ var i = nodes.length, node, type;
31375
31571
 
31376
31572
  while (i--) {
31377
31573
  node = nodes[i];
31378
- node.attr('type', 'mce-' + (node.attr('type') || 'no/type'));
31574
+ type = node.attr('type') || 'no/type';
31575
+ if (type.indexOf('mce-') !== 0) {
31576
+ node.attr('type', 'mce-' + type);
31577
+ }
31379
31578
  }
31380
31579
  });
31381
31580
 
@@ -32178,7 +32377,7 @@ define("tinymce/Editor", [
32178
32377
  * tinymce.activeEditor.setContent('[b]some[/b] html', {format: 'bbcode'});
32179
32378
  */
32180
32379
  setContent: function(content, args) {
32181
- var self = this, body = self.getBody(), forcedRootBlockName;
32380
+ var self = this, body = self.getBody(), forcedRootBlockName, padd;
32182
32381
 
32183
32382
  // Setup args object
32184
32383
  args = args || {};
@@ -32196,14 +32395,24 @@ define("tinymce/Editor", [
32196
32395
  // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content
32197
32396
  // It will also be impossible to place the caret in the editor unless there is a BR element present
32198
32397
  if (content.length === 0 || /^\s+$/.test(content)) {
32398
+ padd = ie && ie < 11 ? '' : '<br data-mce-bogus="1">';
32399
+
32400
+ // Todo: There is a lot more root elements that need special padding
32401
+ // so separate this and add all of them at some point.
32402
+ if (body.nodeName == 'TABLE') {
32403
+ content = '<tr><td>' + padd + '</td></tr>';
32404
+ } else if (/^(UL|OL)$/.test(body.nodeName)) {
32405
+ content = '<li>' + padd + '</li>';
32406
+ }
32407
+
32199
32408
  forcedRootBlockName = self.settings.forced_root_block;
32200
32409
 
32201
32410
  // Check if forcedRootBlock is configured and that the block is a valid child of the body
32202
32411
  if (forcedRootBlockName && self.schema.isValidChild(body.nodeName.toLowerCase(), forcedRootBlockName.toLowerCase())) {
32203
32412
  // Padd with bogus BR elements on modern browsers and IE 7 and 8 since they don't render empty P tags properly
32204
- content = ie && ie < 11 ? '' : '<br data-mce-bogus="1">';
32413
+ content = padd;
32205
32414
  content = self.dom.createHTML(forcedRootBlockName, self.settings.forced_root_block_attrs, content);
32206
- } else if (!ie) {
32415
+ } else if (!ie && !content) {
32207
32416
  // We need to add a BR when forced_root_block is disabled on non IE browsers to place the caret
32208
32417
  content = '<br data-mce-bogus="1">';
32209
32418
  }
@@ -32214,7 +32423,9 @@ define("tinymce/Editor", [
32214
32423
  } else {
32215
32424
  // Parse and serialize the html
32216
32425
  if (args.format !== 'raw') {
32217
- content = new Serializer({}, self.schema).serialize(
32426
+ content = new Serializer({
32427
+ validate: self.validate
32428
+ }, self.schema).serialize(
32218
32429
  self.parser.parse(content, {isRootContent: true})
32219
32430
  );
32220
32431
  }
@@ -33146,7 +33357,7 @@ define("tinymce/EditorManager", [
33146
33357
  * @property minorVersion
33147
33358
  * @type String
33148
33359
  */
33149
- minorVersion: '2.6',
33360
+ minorVersion: '2.7',
33150
33361
 
33151
33362
  /**
33152
33363
  * Release date of TinyMCE build.
@@ -33154,7 +33365,7 @@ define("tinymce/EditorManager", [
33154
33365
  * @property releaseDate
33155
33366
  * @type String
33156
33367
  */
33157
- releaseDate: '2015-09-28',
33368
+ releaseDate: '2015-10-27',
33158
33369
 
33159
33370
  /**
33160
33371
  * Collection of editor instances.
@@ -37558,6 +37769,23 @@ define("tinymce/ui/FormatControls", [
37558
37769
 
37559
37770
  formatMenu = createFormatMenu();
37560
37771
 
37772
+ function initOnPostRender() {
37773
+ var self = this;
37774
+
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() {
37782
+ editor.formatter.formatChanged(name, function(state) {
37783
+ self.active(state);
37784
+ });
37785
+ });
37786
+ }
37787
+ }
37788
+
37561
37789
  // Simple format controls <control/format>:<UI text>
37562
37790
  each({
37563
37791
  bold: 'Bold',
@@ -37570,20 +37798,7 @@ define("tinymce/ui/FormatControls", [
37570
37798
  editor.addButton(name, {
37571
37799
  tooltip: text,
37572
37800
  onPostRender: function() {
37573
- var self = this;
37574
-
37575
- // TODO: Fix this
37576
- if (editor.formatter) {
37577
- editor.formatter.formatChanged(name, function(state) {
37578
- self.active(state);
37579
- });
37580
- } else {
37581
- editor.on('init', function() {
37582
- editor.formatter.formatChanged(name, function(state) {
37583
- self.active(state);
37584
- });
37585
- });
37586
- }
37801
+ initOnPostRender();
37587
37802
  },
37588
37803
  onclick: function() {
37589
37804
  toggleFormat(name);
@@ -37627,20 +37842,7 @@ define("tinymce/ui/FormatControls", [
37627
37842
  tooltip: item[0],
37628
37843
  cmd: item[1],
37629
37844
  onPostRender: function() {
37630
- var self = this;
37631
-
37632
- // TODO: Fix this
37633
- if (editor.formatter) {
37634
- editor.formatter.formatChanged(name, function(state) {
37635
- self.active(state);
37636
- });
37637
- } else {
37638
- editor.on('init', function() {
37639
- editor.formatter.formatChanged(name, function(state) {
37640
- self.active(state);
37641
- });
37642
- });
37643
- }
37845
+ initOnPostRender();
37644
37846
  }
37645
37847
  });
37646
37848
  });