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
@@ -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)
|
@@ -166,11 +166,11 @@ define("tinymce/dom/EventUtils", [], function() {
|
|
166
166
|
var doc = eventDoc.documentElement;
|
167
167
|
var body = eventDoc.body;
|
168
168
|
|
169
|
-
event.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0
|
170
|
-
(
|
169
|
+
event.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) -
|
170
|
+
(doc && doc.clientLeft || body && body.clientLeft || 0);
|
171
171
|
|
172
|
-
event.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0
|
173
|
-
(
|
172
|
+
event.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -
|
173
|
+
(doc && doc.clientTop || body && body.clientTop || 0);
|
174
174
|
}
|
175
175
|
|
176
176
|
// Add preventDefault method
|
@@ -3936,7 +3936,7 @@ define("tinymce/dom/DomQuery", [
|
|
3936
3936
|
self[i].innerHTML = value;
|
3937
3937
|
}
|
3938
3938
|
} catch (ex) {
|
3939
|
-
// Workaround for "
|
3939
|
+
// Workaround for "Unknown runtime error" when DIV is added to P on IE
|
3940
3940
|
DomQuery(self[i]).empty().append(value);
|
3941
3941
|
}
|
3942
3942
|
|
@@ -4527,10 +4527,18 @@ define("tinymce/dom/DomQuery", [
|
|
4527
4527
|
text: Sizzle.getText,
|
4528
4528
|
contains: Sizzle.contains,
|
4529
4529
|
filter: function(expr, elems, not) {
|
4530
|
+
var i = elems.length;
|
4531
|
+
|
4530
4532
|
if (not) {
|
4531
4533
|
expr = ":not(" + expr + ")";
|
4532
4534
|
}
|
4533
4535
|
|
4536
|
+
while (i--) {
|
4537
|
+
if (elems[i].nodeType != 1) {
|
4538
|
+
elems.splice(i, 1);
|
4539
|
+
}
|
4540
|
+
}
|
4541
|
+
|
4534
4542
|
if (elems.length === 1) {
|
4535
4543
|
elems = DomQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [];
|
4536
4544
|
} else {
|
@@ -9523,8 +9531,8 @@ define("tinymce/NodeChange", [
|
|
9523
9531
|
editor.on('SelectionChange', function() {
|
9524
9532
|
var startElm = editor.selection.getStart(true);
|
9525
9533
|
|
9526
|
-
//
|
9527
|
-
if (!isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
|
9534
|
+
// Fire a nodechange only when the selection isn't collapsed since focusout will collapse and remove the selection
|
9535
|
+
if (!editor.selection.isCollapsed() && !isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
|
9528
9536
|
editor.nodeChanged({selectionChange: true});
|
9529
9537
|
}
|
9530
9538
|
});
|
@@ -9811,7 +9819,7 @@ define("tinymce/html/Node", [], function() {
|
|
9811
9819
|
unwrap: function() {
|
9812
9820
|
var self = this, node, next;
|
9813
9821
|
|
9814
|
-
for (node = self.firstChild; node;
|
9822
|
+
for (node = self.firstChild; node;) {
|
9815
9823
|
next = node.next;
|
9816
9824
|
self.insert(node, self, true);
|
9817
9825
|
node = next;
|
@@ -10013,11 +10021,11 @@ define("tinymce/html/Node", [], function() {
|
|
10013
10021
|
return false;
|
10014
10022
|
}
|
10015
10023
|
|
10016
|
-
// Keep
|
10024
|
+
// Keep bookmark nodes and name attribute like <a name="1"></a>
|
10017
10025
|
i = node.attributes.length;
|
10018
10026
|
while (i--) {
|
10019
10027
|
name = node.attributes[i].name;
|
10020
|
-
if (name === "name" || name.indexOf('data-mce-') === 0) {
|
10028
|
+
if (name === "name" || name.indexOf('data-mce-bookmark') === 0) {
|
10021
10029
|
return false;
|
10022
10030
|
}
|
10023
10031
|
}
|
@@ -11656,7 +11664,7 @@ define("tinymce/html/DomParser", [
|
|
11656
11664
|
tempNode = currentNode;
|
11657
11665
|
}
|
11658
11666
|
|
11659
|
-
for (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1];
|
11667
|
+
for (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1];) {
|
11660
11668
|
nextNode = childNode.next;
|
11661
11669
|
tempNode.append(childNode);
|
11662
11670
|
childNode = nextNode;
|
@@ -11905,7 +11913,7 @@ define("tinymce/html/DomParser", [
|
|
11905
11913
|
function removeWhitespaceBefore(node) {
|
11906
11914
|
var textNode, textVal, sibling;
|
11907
11915
|
|
11908
|
-
for (textNode = node.prev; textNode && textNode.type === 3;
|
11916
|
+
for (textNode = node.prev; textNode && textNode.type === 3;) {
|
11909
11917
|
textVal = textNode.value.replace(endWhiteSpaceRegExp, '');
|
11910
11918
|
|
11911
11919
|
if (textVal.length > 0) {
|
@@ -13732,8 +13740,8 @@ define("tinymce/dom/ControlSelection", [
|
|
13732
13740
|
'z-index: 10000' +
|
13733
13741
|
'}' +
|
13734
13742
|
rootClass + ' .mce-resize-helper {' +
|
13735
|
-
'background
|
13736
|
-
'background
|
13743
|
+
'background: #555;' +
|
13744
|
+
'background: rgba(0,0,0,0.75);' +
|
13737
13745
|
'border-radius: 3px;' +
|
13738
13746
|
'border: 1px;' +
|
13739
13747
|
'color: white;' +
|
@@ -14043,6 +14051,11 @@ define("tinymce/dom/ControlSelection", [
|
|
14043
14051
|
}
|
14044
14052
|
}
|
14045
14053
|
|
14054
|
+
// Ignore all events while resizing
|
14055
|
+
if (resizeStarted) {
|
14056
|
+
return;
|
14057
|
+
}
|
14058
|
+
|
14046
14059
|
// Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v
|
14047
14060
|
each(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function(img) {
|
14048
14061
|
img.removeAttribute('data-mce-selected');
|
@@ -15125,7 +15138,7 @@ define("tinymce/dom/Selection", [
|
|
15125
15138
|
getRng: function(w3c) {
|
15126
15139
|
var self = this, selection, rng, elm, doc = self.win.document, ieRng;
|
15127
15140
|
|
15128
|
-
function
|
15141
|
+
function tryCompareBoundaryPoints(how, sourceRange, destinationRange) {
|
15129
15142
|
try {
|
15130
15143
|
return sourceRange.compareBoundaryPoints(how, destinationRange);
|
15131
15144
|
} catch (ex) {
|
@@ -15205,8 +15218,8 @@ define("tinymce/dom/Selection", [
|
|
15205
15218
|
}
|
15206
15219
|
|
15207
15220
|
if (self.selectedRange && self.explicitRange) {
|
15208
|
-
if (
|
15209
|
-
|
15221
|
+
if (tryCompareBoundaryPoints(rng.START_TO_START, rng, self.selectedRange) === 0 &&
|
15222
|
+
tryCompareBoundaryPoints(rng.END_TO_END, rng, self.selectedRange) === 0) {
|
15210
15223
|
// Safari, Opera and Chrome only ever select text which causes the range to change.
|
15211
15224
|
// This lets us use the originally set range if the selection hasn't been changed by the user.
|
15212
15225
|
rng = self.explicitRange;
|
@@ -15547,6 +15560,30 @@ define("tinymce/dom/Selection", [
|
|
15547
15560
|
}
|
15548
15561
|
},
|
15549
15562
|
|
15563
|
+
placeCaretAt: function(clientX, clientY) {
|
15564
|
+
var doc = this.editor.getDoc(), rng, point;
|
15565
|
+
|
15566
|
+
if (doc.caretPositionFromPoint) {
|
15567
|
+
point = doc.caretPositionFromPoint(clientX, clientY);
|
15568
|
+
rng = doc.createRange();
|
15569
|
+
rng.setStart(point.offsetNode, point.offset);
|
15570
|
+
rng.collapse(true);
|
15571
|
+
} else if (doc.caretRangeFromPoint) {
|
15572
|
+
rng = doc.caretRangeFromPoint(clientX, clientY);
|
15573
|
+
} else if (doc.body.createTextRange) {
|
15574
|
+
rng = doc.body.createTextRange();
|
15575
|
+
|
15576
|
+
try {
|
15577
|
+
rng.moveToPoint(clientX, clientY);
|
15578
|
+
rng.collapse(true);
|
15579
|
+
} catch (ex) {
|
15580
|
+
rng.collapse(clientY < doc.body.clientHeight);
|
15581
|
+
}
|
15582
|
+
}
|
15583
|
+
|
15584
|
+
this.setRng(rng);
|
15585
|
+
},
|
15586
|
+
|
15550
15587
|
_moveEndPoint: function(rng, node, start) {
|
15551
15588
|
var root = node, walker = new TreeWalker(node, root);
|
15552
15589
|
var nonEmptyElementsMap = this.dom.schema.getNonEmptyElements();
|
@@ -17263,7 +17300,7 @@ define("tinymce/Formatter", [
|
|
17263
17300
|
offset = node.nodeType === 3 ? node.length : node.childNodes.length;
|
17264
17301
|
}
|
17265
17302
|
}
|
17266
|
-
return {
|
17303
|
+
return {node: node, offset: offset};
|
17267
17304
|
}
|
17268
17305
|
|
17269
17306
|
// If index based start position then resolve it
|
@@ -18227,7 +18264,7 @@ define("tinymce/UndoManager", [
|
|
18227
18264
|
* @return {String} HTML contents of the editor excluding some internal bogus elements.
|
18228
18265
|
*/
|
18229
18266
|
function getContent() {
|
18230
|
-
var content =
|
18267
|
+
var content = editor.getContent({format: 'raw', no_events: 1});
|
18231
18268
|
var bogusAllRegExp = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g;
|
18232
18269
|
var endTagIndex, index, matchLength, matches, shortEndedElements, schema = editor.schema;
|
18233
18270
|
|
@@ -18249,7 +18286,7 @@ define("tinymce/UndoManager", [
|
|
18249
18286
|
bogusAllRegExp.lastIndex = index - matchLength;
|
18250
18287
|
}
|
18251
18288
|
|
18252
|
-
return content;
|
18289
|
+
return trim(content);
|
18253
18290
|
}
|
18254
18291
|
|
18255
18292
|
function addNonTypingUndoLevel(e) {
|
@@ -19184,7 +19221,7 @@ define("tinymce/EnterKey", [
|
|
19184
19221
|
dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique
|
19185
19222
|
|
19186
19223
|
// Allow custom handling of new blocks
|
19187
|
-
editor.fire('NewBlock', {
|
19224
|
+
editor.fire('NewBlock', {newBlock: newBlock});
|
19188
19225
|
|
19189
19226
|
undoManager.add();
|
19190
19227
|
}
|
@@ -19724,7 +19761,7 @@ define("tinymce/EditorCommands", [
|
|
19724
19761
|
// Setup parser and serializer
|
19725
19762
|
parser = editor.parser;
|
19726
19763
|
serializer = new Serializer({}, editor.schema);
|
19727
|
-
bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#
|
19764
|
+
bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">​</span>';
|
19728
19765
|
|
19729
19766
|
// Run beforeSetContent handlers on the HTML to be inserted
|
19730
19767
|
args = {content: value, format: 'html', selection: true};
|
@@ -19772,7 +19809,9 @@ define("tinymce/EditorCommands", [
|
|
19772
19809
|
|
19773
19810
|
for (node = node.prev; node; node = node.walk(true)) {
|
19774
19811
|
if (node.type == 3 || !dom.isBlock(node.name)) {
|
19775
|
-
|
19812
|
+
if (editor.schema.isValidChild(node.parent.name, 'span')) {
|
19813
|
+
node.parent.insert(marker, node, node.name === 'br');
|
19814
|
+
}
|
19776
19815
|
break;
|
19777
19816
|
}
|
19778
19817
|
}
|
@@ -23687,7 +23726,7 @@ define("tinymce/ui/KeyboardNavigation", [
|
|
23687
23726
|
/**
|
23688
23727
|
* Returns the navigation root control for the specified control. The navigation root
|
23689
23728
|
* is the control that the keyboard navigation gets scoped to for example a menubar or toolbar group.
|
23690
|
-
* It will look for parents of the specified target control or the
|
23729
|
+
* It will look for parents of the specified target control or the currently focused control if this option is omitted.
|
23691
23730
|
*
|
23692
23731
|
* @private
|
23693
23732
|
* @param {tinymce.ui.Control} targetControl Optional target control to find root of.
|
@@ -26139,7 +26178,7 @@ define("tinymce/WindowManager", [
|
|
26139
26178
|
self.open = function(args, params) {
|
26140
26179
|
var win;
|
26141
26180
|
|
26142
|
-
editor.editorManager.
|
26181
|
+
editor.editorManager.setActive(editor);
|
26143
26182
|
|
26144
26183
|
args.title = args.title || ' ';
|
26145
26184
|
|
@@ -26796,17 +26835,19 @@ define("tinymce/util/Quirks", [
|
|
26796
26835
|
*/
|
26797
26836
|
function selectControlElements() {
|
26798
26837
|
editor.on('click', function(e) {
|
26799
|
-
|
26838
|
+
var target = e.target;
|
26800
26839
|
|
26801
26840
|
// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
|
26802
26841
|
// WebKit can't even do simple things like selecting an image
|
26803
26842
|
// Needs tobe the setBaseAndExtend or it will fail to select floated images
|
26804
|
-
if (/^(IMG|HR)$/.test(
|
26805
|
-
|
26843
|
+
if (/^(IMG|HR)$/.test(target.nodeName)) {
|
26844
|
+
e.preventDefault();
|
26845
|
+
selection.getSel().setBaseAndExtent(target, 0, target, 1);
|
26806
26846
|
}
|
26807
26847
|
|
26808
|
-
if (
|
26809
|
-
|
26848
|
+
if (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {
|
26849
|
+
e.preventDefault();
|
26850
|
+
selection.select(target);
|
26810
26851
|
}
|
26811
26852
|
});
|
26812
26853
|
}
|
@@ -27439,6 +27480,13 @@ define("tinymce/util/Quirks", [
|
|
27439
27480
|
});
|
27440
27481
|
|
27441
27482
|
args = editor.fire('click', args);
|
27483
|
+
|
27484
|
+
if (!args.isDefaultPrevented()) {
|
27485
|
+
// iOS WebKit can't place the caret properly once
|
27486
|
+
// you bind touch events so we need to do this manually
|
27487
|
+
// TODO: Expand to the closest word? Touble tap still works.
|
27488
|
+
editor.selection.placeCaretAt(endTouch.clientX, endTouch.clientY);
|
27489
|
+
}
|
27442
27490
|
});
|
27443
27491
|
});
|
27444
27492
|
}
|
@@ -28636,6 +28684,10 @@ define("tinymce/Editor", [
|
|
28636
28684
|
bodyClass = bodyClass[self.id] || '';
|
28637
28685
|
}
|
28638
28686
|
|
28687
|
+
if (settings.content_security_policy) {
|
28688
|
+
self.iframeHTML += '<meta http-equiv="Content-Security-Policy" content="' + settings.content_security_policy + '" />';
|
28689
|
+
}
|
28690
|
+
|
28639
28691
|
self.iframeHTML += '</head><body id="' + bodyId +
|
28640
28692
|
'" class="mce-content-body ' + bodyClass +
|
28641
28693
|
'" data-id="' + self.id + '"><br></body></html>';
|
@@ -28674,7 +28726,7 @@ define("tinymce/Editor", [
|
|
28674
28726
|
self.fire("load");
|
28675
28727
|
};
|
28676
28728
|
|
28677
|
-
DOM.setAttrib("src", url || 'javascript:""');
|
28729
|
+
DOM.setAttrib(ifr, "src", url || 'javascript:""');
|
28678
28730
|
|
28679
28731
|
self.contentAreaContainer = o.iframeContainer;
|
28680
28732
|
self.iframeElement = ifr;
|
@@ -29025,7 +29077,7 @@ define("tinymce/Editor", [
|
|
29025
29077
|
* @param {Boolean} skipFocus Skip DOM focus. Just set is as the active editor.
|
29026
29078
|
*/
|
29027
29079
|
focus: function(skipFocus) {
|
29028
|
-
var
|
29080
|
+
var self = this, selection = self.selection, contentEditable = self.settings.content_editable, rng;
|
29029
29081
|
var controlElm, doc = self.getDoc(), body;
|
29030
29082
|
|
29031
29083
|
if (!skipFocus) {
|
@@ -29079,15 +29131,7 @@ define("tinymce/Editor", [
|
|
29079
29131
|
}
|
29080
29132
|
}
|
29081
29133
|
|
29082
|
-
|
29083
|
-
if ((oed = self.editorManager.activeEditor)) {
|
29084
|
-
oed.fire('deactivate', {relatedTarget: self});
|
29085
|
-
}
|
29086
|
-
|
29087
|
-
self.fire('activate', {relatedTarget: oed});
|
29088
|
-
}
|
29089
|
-
|
29090
|
-
self.editorManager.activeEditor = self;
|
29134
|
+
self.editorManager.setActive(self);
|
29091
29135
|
},
|
29092
29136
|
|
29093
29137
|
/**
|
@@ -30343,7 +30387,11 @@ define("tinymce/FocusManager", [
|
|
30343
30387
|
if (editor.inline || Env.ie) {
|
30344
30388
|
// Use the onbeforedeactivate event when available since it works better see #7023
|
30345
30389
|
if ("onbeforedeactivate" in document && Env.ie < 9) {
|
30346
|
-
editor.dom.bind(editor.getBody(), 'beforedeactivate', function() {
|
30390
|
+
editor.dom.bind(editor.getBody(), 'beforedeactivate', function(e) {
|
30391
|
+
if (e.target != editor.getBody()) {
|
30392
|
+
return;
|
30393
|
+
}
|
30394
|
+
|
30347
30395
|
try {
|
30348
30396
|
editor.lastRng = editor.selection.getRng();
|
30349
30397
|
} catch (ex) {
|
@@ -30414,7 +30462,7 @@ define("tinymce/FocusManager", [
|
|
30414
30462
|
focusedEditor.fire('blur', {focusedEditor: editor});
|
30415
30463
|
}
|
30416
30464
|
|
30417
|
-
editorManager.
|
30465
|
+
editorManager.setActive(editor);
|
30418
30466
|
editorManager.focusedEditor = editor;
|
30419
30467
|
editor.fire('focus', {blurredEditor: focusedEditor});
|
30420
30468
|
editor.focus(true);
|
@@ -30454,7 +30502,7 @@ define("tinymce/FocusManager", [
|
|
30454
30502
|
}
|
30455
30503
|
|
30456
30504
|
// Fire a blur event if the element isn't a UI element
|
30457
|
-
if (!isUIElement(e.target) && editorManager.focusedEditor == activeEditor) {
|
30505
|
+
if (e.target != document.body && !isUIElement(e.target) && editorManager.focusedEditor == activeEditor) {
|
30458
30506
|
activeEditor.fire('blur', {focusedEditor: null});
|
30459
30507
|
editorManager.focusedEditor = null;
|
30460
30508
|
}
|
@@ -30614,7 +30662,7 @@ define("tinymce/EditorManager", [
|
|
30614
30662
|
* @property minorVersion
|
30615
30663
|
* @type String
|
30616
30664
|
*/
|
30617
|
-
minorVersion: '1.
|
30665
|
+
minorVersion: '1.4',
|
30618
30666
|
|
30619
30667
|
/**
|
30620
30668
|
* Release date of TinyMCE build.
|
@@ -30622,7 +30670,7 @@ define("tinymce/EditorManager", [
|
|
30622
30670
|
* @property releaseDate
|
30623
30671
|
* @type String
|
30624
30672
|
*/
|
30625
|
-
releaseDate: '2014-
|
30673
|
+
releaseDate: '2014-08-21',
|
30626
30674
|
|
30627
30675
|
/**
|
30628
30676
|
* Collection of editor instances.
|
@@ -30760,7 +30808,7 @@ define("tinymce/EditorManager", [
|
|
30760
30808
|
* });
|
30761
30809
|
*/
|
30762
30810
|
init: function(settings) {
|
30763
|
-
var self = this, editors = []
|
30811
|
+
var self = this, editors = [];
|
30764
30812
|
|
30765
30813
|
function createId(elm) {
|
30766
30814
|
var id = elm.id;
|
@@ -30785,6 +30833,7 @@ define("tinymce/EditorManager", [
|
|
30785
30833
|
function createEditor(id, settings, targetElm) {
|
30786
30834
|
if (!purgeDestroyedEditor(self.get(id))) {
|
30787
30835
|
var editor = new Editor(id, settings, self);
|
30836
|
+
|
30788
30837
|
editor.targetElm = editor.targetElm || targetElm;
|
30789
30838
|
editors.push(editor);
|
30790
30839
|
editor.render();
|
@@ -30838,18 +30887,18 @@ define("tinymce/EditorManager", [
|
|
30838
30887
|
l = settings.elements || '';
|
30839
30888
|
|
30840
30889
|
if (l.length > 0) {
|
30841
|
-
each(explode(l), function(
|
30842
|
-
|
30843
|
-
|
30844
|
-
|
30845
|
-
|
30890
|
+
each(explode(l), function(id) {
|
30891
|
+
var elm;
|
30892
|
+
|
30893
|
+
if ((elm = DOM.get(id))) {
|
30894
|
+
createEditor(id, settings, elm);
|
30846
30895
|
} else {
|
30847
30896
|
each(document.forms, function(f) {
|
30848
30897
|
each(f.elements, function(e) {
|
30849
|
-
if (e.name ===
|
30850
|
-
|
30851
|
-
DOM.setAttrib(e, 'id',
|
30852
|
-
createEditor(
|
30898
|
+
if (e.name === id) {
|
30899
|
+
id = 'mce_editor_' + instanceCounter++;
|
30900
|
+
DOM.setAttrib(e, 'id', id);
|
30901
|
+
createEditor(id, settings, e);
|
30853
30902
|
}
|
30854
30903
|
});
|
30855
30904
|
});
|
@@ -30945,6 +30994,8 @@ define("tinymce/EditorManager", [
|
|
30945
30994
|
editors[editor.id] = editor;
|
30946
30995
|
editors.push(editor);
|
30947
30996
|
|
30997
|
+
// Doesn't call setActive method since we don't want
|
30998
|
+
// to fire a bunch of activate/deactivate calls while initializing
|
30948
30999
|
self.activeEditor = editor;
|
30949
31000
|
|
30950
31001
|
/**
|
@@ -31137,6 +31188,26 @@ define("tinymce/EditorManager", [
|
|
31137
31188
|
*/
|
31138
31189
|
translate: function(text) {
|
31139
31190
|
return I18n.translate(text);
|
31191
|
+
},
|
31192
|
+
|
31193
|
+
/**
|
31194
|
+
* Sets the active editor instance and fires the deactivate/activate events.
|
31195
|
+
*
|
31196
|
+
* @method setActive
|
31197
|
+
* @param {tinymce.Editor} editor Editor instance to set as the active instance.
|
31198
|
+
*/
|
31199
|
+
setActive: function(editor) {
|
31200
|
+
var activeEditor = this.activeEditor;
|
31201
|
+
|
31202
|
+
if (this.activeEditor != editor) {
|
31203
|
+
if (activeEditor) {
|
31204
|
+
activeEditor.fire('deactivate', {relatedTarget: editor});
|
31205
|
+
}
|
31206
|
+
|
31207
|
+
editor.fire('activate', {relatedTarget: activeEditor});
|
31208
|
+
}
|
31209
|
+
|
31210
|
+
this.activeEditor = editor;
|
31140
31211
|
}
|
31141
31212
|
};
|
31142
31213
|
|
@@ -33063,7 +33134,10 @@ define("tinymce/ui/ColorBox", [
|
|
33063
33134
|
var self = this;
|
33064
33135
|
|
33065
33136
|
settings.spellcheck = false;
|
33066
|
-
|
33137
|
+
|
33138
|
+
if (settings.onaction) {
|
33139
|
+
settings.icon = 'none';
|
33140
|
+
}
|
33067
33141
|
|
33068
33142
|
self._super(settings);
|
33069
33143
|
|
@@ -33074,7 +33148,15 @@ define("tinymce/ui/ColorBox", [
|
|
33074
33148
|
},
|
33075
33149
|
|
33076
33150
|
repaintColor: function(value) {
|
33077
|
-
this.getEl().getElementsByTagName('i')[0]
|
33151
|
+
var elm = this.getEl().getElementsByTagName('i')[0];
|
33152
|
+
|
33153
|
+
if (elm) {
|
33154
|
+
try {
|
33155
|
+
elm.style.background = value;
|
33156
|
+
} catch (ex) {
|
33157
|
+
// Ignore
|
33158
|
+
}
|
33159
|
+
}
|
33078
33160
|
},
|
33079
33161
|
|
33080
33162
|
value: function(value) {
|