tinymce-rails 4.1.3 → 4.1.4
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.
- checksums.yaml +4 -4
- data/app/assets/source/tinymce/tinymce.jquery.js +141 -59
- data/app/assets/source/tinymce/tinymce.js +141 -59
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.jquery.js +10 -10
- data/vendor/assets/javascripts/tinymce/tinymce.js +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd66fea9a1e427a976f204236381836e8d9b43a5
|
4
|
+
data.tar.gz: 7d482f906a0324485ecb1d62ace6e68c348b62ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 060349ddf2b7d47d47f180cb777b5c62fb2801dcd597b9c5fb7ffb51c6aa5fa9096cb2992d583ceeff683b0ab56298843c11ae943fa56e323dd8ace5a6c446c2
|
7
|
+
data.tar.gz: a6541df63a955101ec3248ef0f4c62e1917393fc79e8f9b94d0f85f2b740d3fbd2111f8dd21a7da0b3442a399da8063a6f5712fb38cc533d595f9bc775486171
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// 4.1.
|
1
|
+
// 4.1.4 (2014-08-21)
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Compiled inline version. (Library mode)
|
@@ -192,11 +192,11 @@ define("tinymce/dom/EventUtils", [], function() {
|
|
192
192
|
var doc = eventDoc.documentElement;
|
193
193
|
var body = eventDoc.body;
|
194
194
|
|
195
|
-
event.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0
|
196
|
-
(
|
195
|
+
event.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) -
|
196
|
+
(doc && doc.clientLeft || body && body.clientLeft || 0);
|
197
197
|
|
198
|
-
event.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0
|
199
|
-
(
|
198
|
+
event.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -
|
199
|
+
(doc && doc.clientTop || body && body.clientTop || 0);
|
200
200
|
}
|
201
201
|
|
202
202
|
// Add preventDefault method
|
@@ -1921,7 +1921,7 @@ define("tinymce/dom/DomQuery", [
|
|
1921
1921
|
self[i].innerHTML = value;
|
1922
1922
|
}
|
1923
1923
|
} catch (ex) {
|
1924
|
-
// Workaround for "
|
1924
|
+
// Workaround for "Unknown runtime error" when DIV is added to P on IE
|
1925
1925
|
DomQuery(self[i]).empty().append(value);
|
1926
1926
|
}
|
1927
1927
|
|
@@ -2512,10 +2512,18 @@ define("tinymce/dom/DomQuery", [
|
|
2512
2512
|
text: Sizzle.getText,
|
2513
2513
|
contains: Sizzle.contains,
|
2514
2514
|
filter: function(expr, elems, not) {
|
2515
|
+
var i = elems.length;
|
2516
|
+
|
2515
2517
|
if (not) {
|
2516
2518
|
expr = ":not(" + expr + ")";
|
2517
2519
|
}
|
2518
2520
|
|
2521
|
+
while (i--) {
|
2522
|
+
if (elems[i].nodeType != 1) {
|
2523
|
+
elems.splice(i, 1);
|
2524
|
+
}
|
2525
|
+
}
|
2526
|
+
|
2519
2527
|
if (elems.length === 1) {
|
2520
2528
|
elems = DomQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [];
|
2521
2529
|
} else {
|
@@ -7508,8 +7516,8 @@ define("tinymce/NodeChange", [
|
|
7508
7516
|
editor.on('SelectionChange', function() {
|
7509
7517
|
var startElm = editor.selection.getStart(true);
|
7510
7518
|
|
7511
|
-
//
|
7512
|
-
if (!isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
|
7519
|
+
// Fire a nodechange only when the selection isn't collapsed since focusout will collapse and remove the selection
|
7520
|
+
if (!editor.selection.isCollapsed() && !isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
|
7513
7521
|
editor.nodeChanged({selectionChange: true});
|
7514
7522
|
}
|
7515
7523
|
});
|
@@ -7796,7 +7804,7 @@ define("tinymce/html/Node", [], function() {
|
|
7796
7804
|
unwrap: function() {
|
7797
7805
|
var self = this, node, next;
|
7798
7806
|
|
7799
|
-
for (node = self.firstChild; node;
|
7807
|
+
for (node = self.firstChild; node;) {
|
7800
7808
|
next = node.next;
|
7801
7809
|
self.insert(node, self, true);
|
7802
7810
|
node = next;
|
@@ -7998,11 +8006,11 @@ define("tinymce/html/Node", [], function() {
|
|
7998
8006
|
return false;
|
7999
8007
|
}
|
8000
8008
|
|
8001
|
-
// Keep
|
8009
|
+
// Keep bookmark nodes and name attribute like <a name="1"></a>
|
8002
8010
|
i = node.attributes.length;
|
8003
8011
|
while (i--) {
|
8004
8012
|
name = node.attributes[i].name;
|
8005
|
-
if (name === "name" || name.indexOf('data-mce-') === 0) {
|
8013
|
+
if (name === "name" || name.indexOf('data-mce-bookmark') === 0) {
|
8006
8014
|
return false;
|
8007
8015
|
}
|
8008
8016
|
}
|
@@ -9641,7 +9649,7 @@ define("tinymce/html/DomParser", [
|
|
9641
9649
|
tempNode = currentNode;
|
9642
9650
|
}
|
9643
9651
|
|
9644
|
-
for (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1];
|
9652
|
+
for (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1];) {
|
9645
9653
|
nextNode = childNode.next;
|
9646
9654
|
tempNode.append(childNode);
|
9647
9655
|
childNode = nextNode;
|
@@ -9890,7 +9898,7 @@ define("tinymce/html/DomParser", [
|
|
9890
9898
|
function removeWhitespaceBefore(node) {
|
9891
9899
|
var textNode, textVal, sibling;
|
9892
9900
|
|
9893
|
-
for (textNode = node.prev; textNode && textNode.type === 3;
|
9901
|
+
for (textNode = node.prev; textNode && textNode.type === 3;) {
|
9894
9902
|
textVal = textNode.value.replace(endWhiteSpaceRegExp, '');
|
9895
9903
|
|
9896
9904
|
if (textVal.length > 0) {
|
@@ -11717,8 +11725,8 @@ define("tinymce/dom/ControlSelection", [
|
|
11717
11725
|
'z-index: 10000' +
|
11718
11726
|
'}' +
|
11719
11727
|
rootClass + ' .mce-resize-helper {' +
|
11720
|
-
'background
|
11721
|
-
'background
|
11728
|
+
'background: #555;' +
|
11729
|
+
'background: rgba(0,0,0,0.75);' +
|
11722
11730
|
'border-radius: 3px;' +
|
11723
11731
|
'border: 1px;' +
|
11724
11732
|
'color: white;' +
|
@@ -12028,6 +12036,11 @@ define("tinymce/dom/ControlSelection", [
|
|
12028
12036
|
}
|
12029
12037
|
}
|
12030
12038
|
|
12039
|
+
// Ignore all events while resizing
|
12040
|
+
if (resizeStarted) {
|
12041
|
+
return;
|
12042
|
+
}
|
12043
|
+
|
12031
12044
|
// Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v
|
12032
12045
|
each(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function(img) {
|
12033
12046
|
img.removeAttribute('data-mce-selected');
|
@@ -13110,7 +13123,7 @@ define("tinymce/dom/Selection", [
|
|
13110
13123
|
getRng: function(w3c) {
|
13111
13124
|
var self = this, selection, rng, elm, doc = self.win.document, ieRng;
|
13112
13125
|
|
13113
|
-
function
|
13126
|
+
function tryCompareBoundaryPoints(how, sourceRange, destinationRange) {
|
13114
13127
|
try {
|
13115
13128
|
return sourceRange.compareBoundaryPoints(how, destinationRange);
|
13116
13129
|
} catch (ex) {
|
@@ -13190,8 +13203,8 @@ define("tinymce/dom/Selection", [
|
|
13190
13203
|
}
|
13191
13204
|
|
13192
13205
|
if (self.selectedRange && self.explicitRange) {
|
13193
|
-
if (
|
13194
|
-
|
13206
|
+
if (tryCompareBoundaryPoints(rng.START_TO_START, rng, self.selectedRange) === 0 &&
|
13207
|
+
tryCompareBoundaryPoints(rng.END_TO_END, rng, self.selectedRange) === 0) {
|
13195
13208
|
// Safari, Opera and Chrome only ever select text which causes the range to change.
|
13196
13209
|
// This lets us use the originally set range if the selection hasn't been changed by the user.
|
13197
13210
|
rng = self.explicitRange;
|
@@ -13532,6 +13545,30 @@ define("tinymce/dom/Selection", [
|
|
13532
13545
|
}
|
13533
13546
|
},
|
13534
13547
|
|
13548
|
+
placeCaretAt: function(clientX, clientY) {
|
13549
|
+
var doc = this.editor.getDoc(), rng, point;
|
13550
|
+
|
13551
|
+
if (doc.caretPositionFromPoint) {
|
13552
|
+
point = doc.caretPositionFromPoint(clientX, clientY);
|
13553
|
+
rng = doc.createRange();
|
13554
|
+
rng.setStart(point.offsetNode, point.offset);
|
13555
|
+
rng.collapse(true);
|
13556
|
+
} else if (doc.caretRangeFromPoint) {
|
13557
|
+
rng = doc.caretRangeFromPoint(clientX, clientY);
|
13558
|
+
} else if (doc.body.createTextRange) {
|
13559
|
+
rng = doc.body.createTextRange();
|
13560
|
+
|
13561
|
+
try {
|
13562
|
+
rng.moveToPoint(clientX, clientY);
|
13563
|
+
rng.collapse(true);
|
13564
|
+
} catch (ex) {
|
13565
|
+
rng.collapse(clientY < doc.body.clientHeight);
|
13566
|
+
}
|
13567
|
+
}
|
13568
|
+
|
13569
|
+
this.setRng(rng);
|
13570
|
+
},
|
13571
|
+
|
13535
13572
|
_moveEndPoint: function(rng, node, start) {
|
13536
13573
|
var root = node, walker = new TreeWalker(node, root);
|
13537
13574
|
var nonEmptyElementsMap = this.dom.schema.getNonEmptyElements();
|
@@ -15248,7 +15285,7 @@ define("tinymce/Formatter", [
|
|
15248
15285
|
offset = node.nodeType === 3 ? node.length : node.childNodes.length;
|
15249
15286
|
}
|
15250
15287
|
}
|
15251
|
-
return {
|
15288
|
+
return {node: node, offset: offset};
|
15252
15289
|
}
|
15253
15290
|
|
15254
15291
|
// If index based start position then resolve it
|
@@ -16212,7 +16249,7 @@ define("tinymce/UndoManager", [
|
|
16212
16249
|
* @return {String} HTML contents of the editor excluding some internal bogus elements.
|
16213
16250
|
*/
|
16214
16251
|
function getContent() {
|
16215
|
-
var content =
|
16252
|
+
var content = editor.getContent({format: 'raw', no_events: 1});
|
16216
16253
|
var bogusAllRegExp = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g;
|
16217
16254
|
var endTagIndex, index, matchLength, matches, shortEndedElements, schema = editor.schema;
|
16218
16255
|
|
@@ -16234,7 +16271,7 @@ define("tinymce/UndoManager", [
|
|
16234
16271
|
bogusAllRegExp.lastIndex = index - matchLength;
|
16235
16272
|
}
|
16236
16273
|
|
16237
|
-
return content;
|
16274
|
+
return trim(content);
|
16238
16275
|
}
|
16239
16276
|
|
16240
16277
|
function addNonTypingUndoLevel(e) {
|
@@ -17169,7 +17206,7 @@ define("tinymce/EnterKey", [
|
|
17169
17206
|
dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique
|
17170
17207
|
|
17171
17208
|
// Allow custom handling of new blocks
|
17172
|
-
editor.fire('NewBlock', {
|
17209
|
+
editor.fire('NewBlock', {newBlock: newBlock});
|
17173
17210
|
|
17174
17211
|
undoManager.add();
|
17175
17212
|
}
|
@@ -17709,7 +17746,7 @@ define("tinymce/EditorCommands", [
|
|
17709
17746
|
// Setup parser and serializer
|
17710
17747
|
parser = editor.parser;
|
17711
17748
|
serializer = new Serializer({}, editor.schema);
|
17712
|
-
bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#
|
17749
|
+
bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">​</span>';
|
17713
17750
|
|
17714
17751
|
// Run beforeSetContent handlers on the HTML to be inserted
|
17715
17752
|
args = {content: value, format: 'html', selection: true};
|
@@ -17757,7 +17794,9 @@ define("tinymce/EditorCommands", [
|
|
17757
17794
|
|
17758
17795
|
for (node = node.prev; node; node = node.walk(true)) {
|
17759
17796
|
if (node.type == 3 || !dom.isBlock(node.name)) {
|
17760
|
-
|
17797
|
+
if (editor.schema.isValidChild(node.parent.name, 'span')) {
|
17798
|
+
node.parent.insert(marker, node, node.name === 'br');
|
17799
|
+
}
|
17761
17800
|
break;
|
17762
17801
|
}
|
17763
17802
|
}
|
@@ -21672,7 +21711,7 @@ define("tinymce/ui/KeyboardNavigation", [
|
|
21672
21711
|
/**
|
21673
21712
|
* Returns the navigation root control for the specified control. The navigation root
|
21674
21713
|
* is the control that the keyboard navigation gets scoped to for example a menubar or toolbar group.
|
21675
|
-
* It will look for parents of the specified target control or the
|
21714
|
+
* It will look for parents of the specified target control or the currently focused control if this option is omitted.
|
21676
21715
|
*
|
21677
21716
|
* @private
|
21678
21717
|
* @param {tinymce.ui.Control} targetControl Optional target control to find root of.
|
@@ -24124,7 +24163,7 @@ define("tinymce/WindowManager", [
|
|
24124
24163
|
self.open = function(args, params) {
|
24125
24164
|
var win;
|
24126
24165
|
|
24127
|
-
editor.editorManager.
|
24166
|
+
editor.editorManager.setActive(editor);
|
24128
24167
|
|
24129
24168
|
args.title = args.title || ' ';
|
24130
24169
|
|
@@ -24781,17 +24820,19 @@ define("tinymce/util/Quirks", [
|
|
24781
24820
|
*/
|
24782
24821
|
function selectControlElements() {
|
24783
24822
|
editor.on('click', function(e) {
|
24784
|
-
|
24823
|
+
var target = e.target;
|
24785
24824
|
|
24786
24825
|
// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
|
24787
24826
|
// WebKit can't even do simple things like selecting an image
|
24788
24827
|
// Needs tobe the setBaseAndExtend or it will fail to select floated images
|
24789
|
-
if (/^(IMG|HR)$/.test(
|
24790
|
-
|
24828
|
+
if (/^(IMG|HR)$/.test(target.nodeName)) {
|
24829
|
+
e.preventDefault();
|
24830
|
+
selection.getSel().setBaseAndExtent(target, 0, target, 1);
|
24791
24831
|
}
|
24792
24832
|
|
24793
|
-
if (
|
24794
|
-
|
24833
|
+
if (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {
|
24834
|
+
e.preventDefault();
|
24835
|
+
selection.select(target);
|
24795
24836
|
}
|
24796
24837
|
});
|
24797
24838
|
}
|
@@ -25424,6 +25465,13 @@ define("tinymce/util/Quirks", [
|
|
25424
25465
|
});
|
25425
25466
|
|
25426
25467
|
args = editor.fire('click', args);
|
25468
|
+
|
25469
|
+
if (!args.isDefaultPrevented()) {
|
25470
|
+
// iOS WebKit can't place the caret properly once
|
25471
|
+
// you bind touch events so we need to do this manually
|
25472
|
+
// TODO: Expand to the closest word? Touble tap still works.
|
25473
|
+
editor.selection.placeCaretAt(endTouch.clientX, endTouch.clientY);
|
25474
|
+
}
|
25427
25475
|
});
|
25428
25476
|
});
|
25429
25477
|
}
|
@@ -26621,6 +26669,10 @@ define("tinymce/Editor", [
|
|
26621
26669
|
bodyClass = bodyClass[self.id] || '';
|
26622
26670
|
}
|
26623
26671
|
|
26672
|
+
if (settings.content_security_policy) {
|
26673
|
+
self.iframeHTML += '<meta http-equiv="Content-Security-Policy" content="' + settings.content_security_policy + '" />';
|
26674
|
+
}
|
26675
|
+
|
26624
26676
|
self.iframeHTML += '</head><body id="' + bodyId +
|
26625
26677
|
'" class="mce-content-body ' + bodyClass +
|
26626
26678
|
'" data-id="' + self.id + '"><br></body></html>';
|
@@ -26659,7 +26711,7 @@ define("tinymce/Editor", [
|
|
26659
26711
|
self.fire("load");
|
26660
26712
|
};
|
26661
26713
|
|
26662
|
-
DOM.setAttrib("src", url || 'javascript:""');
|
26714
|
+
DOM.setAttrib(ifr, "src", url || 'javascript:""');
|
26663
26715
|
|
26664
26716
|
self.contentAreaContainer = o.iframeContainer;
|
26665
26717
|
self.iframeElement = ifr;
|
@@ -27010,7 +27062,7 @@ define("tinymce/Editor", [
|
|
27010
27062
|
* @param {Boolean} skipFocus Skip DOM focus. Just set is as the active editor.
|
27011
27063
|
*/
|
27012
27064
|
focus: function(skipFocus) {
|
27013
|
-
var
|
27065
|
+
var self = this, selection = self.selection, contentEditable = self.settings.content_editable, rng;
|
27014
27066
|
var controlElm, doc = self.getDoc(), body;
|
27015
27067
|
|
27016
27068
|
if (!skipFocus) {
|
@@ -27064,15 +27116,7 @@ define("tinymce/Editor", [
|
|
27064
27116
|
}
|
27065
27117
|
}
|
27066
27118
|
|
27067
|
-
|
27068
|
-
if ((oed = self.editorManager.activeEditor)) {
|
27069
|
-
oed.fire('deactivate', {relatedTarget: self});
|
27070
|
-
}
|
27071
|
-
|
27072
|
-
self.fire('activate', {relatedTarget: oed});
|
27073
|
-
}
|
27074
|
-
|
27075
|
-
self.editorManager.activeEditor = self;
|
27119
|
+
self.editorManager.setActive(self);
|
27076
27120
|
},
|
27077
27121
|
|
27078
27122
|
/**
|
@@ -28328,7 +28372,11 @@ define("tinymce/FocusManager", [
|
|
28328
28372
|
if (editor.inline || Env.ie) {
|
28329
28373
|
// Use the onbeforedeactivate event when available since it works better see #7023
|
28330
28374
|
if ("onbeforedeactivate" in document && Env.ie < 9) {
|
28331
|
-
editor.dom.bind(editor.getBody(), 'beforedeactivate', function() {
|
28375
|
+
editor.dom.bind(editor.getBody(), 'beforedeactivate', function(e) {
|
28376
|
+
if (e.target != editor.getBody()) {
|
28377
|
+
return;
|
28378
|
+
}
|
28379
|
+
|
28332
28380
|
try {
|
28333
28381
|
editor.lastRng = editor.selection.getRng();
|
28334
28382
|
} catch (ex) {
|
@@ -28399,7 +28447,7 @@ define("tinymce/FocusManager", [
|
|
28399
28447
|
focusedEditor.fire('blur', {focusedEditor: editor});
|
28400
28448
|
}
|
28401
28449
|
|
28402
|
-
editorManager.
|
28450
|
+
editorManager.setActive(editor);
|
28403
28451
|
editorManager.focusedEditor = editor;
|
28404
28452
|
editor.fire('focus', {blurredEditor: focusedEditor});
|
28405
28453
|
editor.focus(true);
|
@@ -28439,7 +28487,7 @@ define("tinymce/FocusManager", [
|
|
28439
28487
|
}
|
28440
28488
|
|
28441
28489
|
// Fire a blur event if the element isn't a UI element
|
28442
|
-
if (!isUIElement(e.target) && editorManager.focusedEditor == activeEditor) {
|
28490
|
+
if (e.target != document.body && !isUIElement(e.target) && editorManager.focusedEditor == activeEditor) {
|
28443
28491
|
activeEditor.fire('blur', {focusedEditor: null});
|
28444
28492
|
editorManager.focusedEditor = null;
|
28445
28493
|
}
|
@@ -28599,7 +28647,7 @@ define("tinymce/EditorManager", [
|
|
28599
28647
|
* @property minorVersion
|
28600
28648
|
* @type String
|
28601
28649
|
*/
|
28602
|
-
minorVersion: '1.
|
28650
|
+
minorVersion: '1.4',
|
28603
28651
|
|
28604
28652
|
/**
|
28605
28653
|
* Release date of TinyMCE build.
|
@@ -28607,7 +28655,7 @@ define("tinymce/EditorManager", [
|
|
28607
28655
|
* @property releaseDate
|
28608
28656
|
* @type String
|
28609
28657
|
*/
|
28610
|
-
releaseDate: '2014-
|
28658
|
+
releaseDate: '2014-08-21',
|
28611
28659
|
|
28612
28660
|
/**
|
28613
28661
|
* Collection of editor instances.
|
@@ -28745,7 +28793,7 @@ define("tinymce/EditorManager", [
|
|
28745
28793
|
* });
|
28746
28794
|
*/
|
28747
28795
|
init: function(settings) {
|
28748
|
-
var self = this, editors = []
|
28796
|
+
var self = this, editors = [];
|
28749
28797
|
|
28750
28798
|
function createId(elm) {
|
28751
28799
|
var id = elm.id;
|
@@ -28770,6 +28818,7 @@ define("tinymce/EditorManager", [
|
|
28770
28818
|
function createEditor(id, settings, targetElm) {
|
28771
28819
|
if (!purgeDestroyedEditor(self.get(id))) {
|
28772
28820
|
var editor = new Editor(id, settings, self);
|
28821
|
+
|
28773
28822
|
editor.targetElm = editor.targetElm || targetElm;
|
28774
28823
|
editors.push(editor);
|
28775
28824
|
editor.render();
|
@@ -28823,18 +28872,18 @@ define("tinymce/EditorManager", [
|
|
28823
28872
|
l = settings.elements || '';
|
28824
28873
|
|
28825
28874
|
if (l.length > 0) {
|
28826
|
-
each(explode(l), function(
|
28827
|
-
|
28828
|
-
|
28829
|
-
|
28830
|
-
|
28875
|
+
each(explode(l), function(id) {
|
28876
|
+
var elm;
|
28877
|
+
|
28878
|
+
if ((elm = DOM.get(id))) {
|
28879
|
+
createEditor(id, settings, elm);
|
28831
28880
|
} else {
|
28832
28881
|
each(document.forms, function(f) {
|
28833
28882
|
each(f.elements, function(e) {
|
28834
|
-
if (e.name ===
|
28835
|
-
|
28836
|
-
DOM.setAttrib(e, 'id',
|
28837
|
-
createEditor(
|
28883
|
+
if (e.name === id) {
|
28884
|
+
id = 'mce_editor_' + instanceCounter++;
|
28885
|
+
DOM.setAttrib(e, 'id', id);
|
28886
|
+
createEditor(id, settings, e);
|
28838
28887
|
}
|
28839
28888
|
});
|
28840
28889
|
});
|
@@ -28930,6 +28979,8 @@ define("tinymce/EditorManager", [
|
|
28930
28979
|
editors[editor.id] = editor;
|
28931
28980
|
editors.push(editor);
|
28932
28981
|
|
28982
|
+
// Doesn't call setActive method since we don't want
|
28983
|
+
// to fire a bunch of activate/deactivate calls while initializing
|
28933
28984
|
self.activeEditor = editor;
|
28934
28985
|
|
28935
28986
|
/**
|
@@ -29122,6 +29173,26 @@ define("tinymce/EditorManager", [
|
|
29122
29173
|
*/
|
29123
29174
|
translate: function(text) {
|
29124
29175
|
return I18n.translate(text);
|
29176
|
+
},
|
29177
|
+
|
29178
|
+
/**
|
29179
|
+
* Sets the active editor instance and fires the deactivate/activate events.
|
29180
|
+
*
|
29181
|
+
* @method setActive
|
29182
|
+
* @param {tinymce.Editor} editor Editor instance to set as the active instance.
|
29183
|
+
*/
|
29184
|
+
setActive: function(editor) {
|
29185
|
+
var activeEditor = this.activeEditor;
|
29186
|
+
|
29187
|
+
if (this.activeEditor != editor) {
|
29188
|
+
if (activeEditor) {
|
29189
|
+
activeEditor.fire('deactivate', {relatedTarget: editor});
|
29190
|
+
}
|
29191
|
+
|
29192
|
+
editor.fire('activate', {relatedTarget: activeEditor});
|
29193
|
+
}
|
29194
|
+
|
29195
|
+
this.activeEditor = editor;
|
29125
29196
|
}
|
29126
29197
|
};
|
29127
29198
|
|
@@ -31048,7 +31119,10 @@ define("tinymce/ui/ColorBox", [
|
|
31048
31119
|
var self = this;
|
31049
31120
|
|
31050
31121
|
settings.spellcheck = false;
|
31051
|
-
|
31122
|
+
|
31123
|
+
if (settings.onaction) {
|
31124
|
+
settings.icon = 'none';
|
31125
|
+
}
|
31052
31126
|
|
31053
31127
|
self._super(settings);
|
31054
31128
|
|
@@ -31059,7 +31133,15 @@ define("tinymce/ui/ColorBox", [
|
|
31059
31133
|
},
|
31060
31134
|
|
31061
31135
|
repaintColor: function(value) {
|
31062
|
-
this.getEl().getElementsByTagName('i')[0]
|
31136
|
+
var elm = this.getEl().getElementsByTagName('i')[0];
|
31137
|
+
|
31138
|
+
if (elm) {
|
31139
|
+
try {
|
31140
|
+
elm.style.background = value;
|
31141
|
+
} catch (ex) {
|
31142
|
+
// Ignore
|
31143
|
+
}
|
31144
|
+
}
|
31063
31145
|
},
|
31064
31146
|
|
31065
31147
|
value: function(value) {
|