tinymce-rails 4.9.1 → 4.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/source/tinymce/tinymce.js +196 -65
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/lists/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/themes/inlite/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62c0d0894eb083b9ea5d18b901aa92845f57f6cb21f893d691058b2fe105bd02
|
4
|
+
data.tar.gz: 931fe3122860185e6bb505043351a2288f5f0c7c184f31f8c50e5aedb3ca39a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 846e670a022114035cd5c8b95aaf2eebd8db1235ca9bb6264dc1a1178d0b4bd3ad4a34e0f97eb669985f6006e50095e5b1f6daf134136862334bfc1ebe08c68f
|
7
|
+
data.tar.gz: 9ca36f46e47ba9689fe1f7607ed43f11287e1c068bd508e07783409c07679ec8430ce565401a4c7a1cb32e7af187850f0b83cd75585cb7cbe46e7711f5f5e048
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// 4.9.
|
1
|
+
// 4.9.2 (2018-12-17)
|
2
2
|
(function () {
|
3
3
|
(function () {
|
4
4
|
'use strict';
|
@@ -6901,6 +6901,14 @@
|
|
6901
6901
|
before(v, element);
|
6902
6902
|
});
|
6903
6903
|
};
|
6904
|
+
var prepend = function (parent$$1, element) {
|
6905
|
+
var firstChild$$1 = firstChild(parent$$1);
|
6906
|
+
firstChild$$1.fold(function () {
|
6907
|
+
append(parent$$1, element);
|
6908
|
+
}, function (v) {
|
6909
|
+
parent$$1.dom().insertBefore(element.dom(), v.dom());
|
6910
|
+
});
|
6911
|
+
};
|
6904
6912
|
var append = function (parent$$1, element) {
|
6905
6913
|
parent$$1.dom().appendChild(element.dom());
|
6906
6914
|
};
|
@@ -7065,6 +7073,17 @@
|
|
7065
7073
|
return supports(element) && element.dom().classList.contains(clazz);
|
7066
7074
|
};
|
7067
7075
|
|
7076
|
+
var descendants = function (scope, predicate) {
|
7077
|
+
var result = [];
|
7078
|
+
each(children(scope), function (x) {
|
7079
|
+
if (predicate(x)) {
|
7080
|
+
result = result.concat([x]);
|
7081
|
+
}
|
7082
|
+
result = result.concat(descendants(x, predicate));
|
7083
|
+
});
|
7084
|
+
return result;
|
7085
|
+
};
|
7086
|
+
|
7068
7087
|
var descendants$1 = function (scope, selector) {
|
7069
7088
|
return all(selector, scope);
|
7070
7089
|
};
|
@@ -8799,19 +8818,17 @@
|
|
8799
8818
|
}
|
8800
8819
|
return CaretPosition$1.before(node);
|
8801
8820
|
};
|
8802
|
-
var
|
8803
|
-
var
|
8804
|
-
if (
|
8805
|
-
|
8806
|
-
|
8807
|
-
|
8808
|
-
|
8809
|
-
|
8810
|
-
|
8811
|
-
|
8812
|
-
return false;
|
8821
|
+
var moveForwardFromBr = function (root, nextNode) {
|
8822
|
+
var nextSibling = nextNode.nextSibling;
|
8823
|
+
if (nextSibling && isCaretCandidate$3(nextSibling)) {
|
8824
|
+
if (isText$7(nextSibling)) {
|
8825
|
+
return CaretPosition$1(nextSibling, 0);
|
8826
|
+
} else {
|
8827
|
+
return CaretPosition$1.before(nextSibling);
|
8828
|
+
}
|
8829
|
+
} else {
|
8830
|
+
return findCaretPosition(HDirection.Forwards, CaretPosition$1.after(nextNode), root);
|
8813
8831
|
}
|
8814
|
-
return !isInSameBlock(CaretPosition$1.before(node), CaretPosition$1.before(next), root);
|
8815
8832
|
};
|
8816
8833
|
var findCaretPosition = function (direction, startPos, root) {
|
8817
8834
|
var node, nextNode, innerNode;
|
@@ -8859,11 +8876,8 @@
|
|
8859
8876
|
if (isForwards(direction) && offset < container.childNodes.length) {
|
8860
8877
|
nextNode = nodeAtIndex(container, offset);
|
8861
8878
|
if (isCaretCandidate$3(nextNode)) {
|
8862
|
-
if (isBr$4(nextNode)
|
8863
|
-
return
|
8864
|
-
}
|
8865
|
-
if (isBrBeforeBlock(nextNode, root)) {
|
8866
|
-
return findCaretPosition(direction, CaretPosition$1.after(nextNode), root);
|
8879
|
+
if (isBr$4(nextNode)) {
|
8880
|
+
return moveForwardFromBr(root, nextNode);
|
8867
8881
|
}
|
8868
8882
|
if (!isAtomic$1(nextNode)) {
|
8869
8883
|
innerNode = findNode(nextNode, direction, isEditableCaretCandidate$1, nextNode);
|
@@ -12924,6 +12938,9 @@
|
|
12924
12938
|
}
|
12925
12939
|
]);
|
12926
12940
|
var range$1 = Immutable('start', 'soffset', 'finish', 'foffset');
|
12941
|
+
var domRange = type$1.domRange;
|
12942
|
+
var relative = type$1.relative;
|
12943
|
+
var exact = type$1.exact;
|
12927
12944
|
|
12928
12945
|
var browser$3 = PlatformDetection$1.detect().browser;
|
12929
12946
|
var clamp = function (offset, element) {
|
@@ -17594,6 +17611,9 @@
|
|
17594
17611
|
var isTableCell$4 = function (node) {
|
17595
17612
|
return /^(TH|TD)$/.test(node.nodeName);
|
17596
17613
|
};
|
17614
|
+
var isChildOfInlineParent = function (dom, node, parent$$1) {
|
17615
|
+
return dom.isChildOf(node, parent$$1) && node !== parent$$1 && !dom.isBlock(parent$$1);
|
17616
|
+
};
|
17597
17617
|
var getContainer = function (ed, rng, start) {
|
17598
17618
|
var container, offset, lastIdx;
|
17599
17619
|
container = rng[start ? 'startContainer' : 'endContainer'];
|
@@ -17619,19 +17639,19 @@
|
|
17619
17639
|
wrapper.appendChild(node);
|
17620
17640
|
return wrapper;
|
17621
17641
|
};
|
17622
|
-
var wrapWithSiblings = function (dom,
|
17623
|
-
var
|
17624
|
-
var wrapper = dom.create(name, attrs);
|
17625
|
-
|
17626
|
-
|
17627
|
-
|
17628
|
-
|
17629
|
-
|
17642
|
+
var wrapWithSiblings = function (dom, node, next, name, attrs) {
|
17643
|
+
var start = Element$$1.fromDom(node);
|
17644
|
+
var wrapper = Element$$1.fromDom(dom.create(name, attrs));
|
17645
|
+
var siblings$$1 = next ? nextSiblings(start) : prevSiblings(start);
|
17646
|
+
append$1(wrapper, siblings$$1);
|
17647
|
+
if (next) {
|
17648
|
+
before(start, wrapper);
|
17649
|
+
prepend(wrapper, start);
|
17650
|
+
} else {
|
17651
|
+
after(start, wrapper);
|
17652
|
+
append(wrapper, start);
|
17630
17653
|
}
|
17631
|
-
|
17632
|
-
return wrapper.appendChild(node);
|
17633
|
-
});
|
17634
|
-
return wrapper;
|
17654
|
+
return wrapper.dom();
|
17635
17655
|
};
|
17636
17656
|
var matchName$1 = function (dom, node, format) {
|
17637
17657
|
if (isEq$5(node, format.inline)) {
|
@@ -17764,24 +17784,24 @@
|
|
17764
17784
|
};
|
17765
17785
|
var findFormatRoot = function (editor, container, name, vars, similar) {
|
17766
17786
|
var formatRoot;
|
17767
|
-
each$d(FormatUtils.getParents(editor.dom, container.parentNode).reverse(), function (parent) {
|
17787
|
+
each$d(FormatUtils.getParents(editor.dom, container.parentNode).reverse(), function (parent$$1) {
|
17768
17788
|
var format;
|
17769
|
-
if (!formatRoot && parent.id !== '_start' && parent.id !== '_end') {
|
17770
|
-
format = MatchFormat.matchNode(editor, parent, name, vars, similar);
|
17789
|
+
if (!formatRoot && parent$$1.id !== '_start' && parent$$1.id !== '_end') {
|
17790
|
+
format = MatchFormat.matchNode(editor, parent$$1, name, vars, similar);
|
17771
17791
|
if (format && format.split !== false) {
|
17772
|
-
formatRoot = parent;
|
17792
|
+
formatRoot = parent$$1;
|
17773
17793
|
}
|
17774
17794
|
}
|
17775
17795
|
});
|
17776
17796
|
return formatRoot;
|
17777
17797
|
};
|
17778
17798
|
var wrapAndSplit = function (editor, formatList, formatRoot, container, target, split, format, vars) {
|
17779
|
-
var parent, clone, lastClone, firstClone, i, formatRootParent;
|
17799
|
+
var parent$$1, clone, lastClone, firstClone, i, formatRootParent;
|
17780
17800
|
var dom = editor.dom;
|
17781
17801
|
if (formatRoot) {
|
17782
17802
|
formatRootParent = formatRoot.parentNode;
|
17783
|
-
for (parent = container.parentNode; parent && parent !== formatRootParent; parent = parent.parentNode) {
|
17784
|
-
clone = dom.clone(parent, false);
|
17803
|
+
for (parent$$1 = container.parentNode; parent$$1 && parent$$1 !== formatRootParent; parent$$1 = parent$$1.parentNode) {
|
17804
|
+
clone = dom.clone(parent$$1, false);
|
17785
17805
|
for (i = 0; i < formatList.length; i++) {
|
17786
17806
|
if (removeFormat(editor, formatList[i], vars, clone, clone)) {
|
17787
17807
|
clone = 0;
|
@@ -17821,13 +17841,13 @@
|
|
17821
17841
|
return Bookmarks.isBookmarkNode(node) && NodeType.isElement(node) && (node.id === '_start' || node.id === '_end');
|
17822
17842
|
};
|
17823
17843
|
var process = function (node) {
|
17824
|
-
var children, i, l, lastContentEditable, hasContentEditableState;
|
17844
|
+
var children$$1, i, l, lastContentEditable, hasContentEditableState;
|
17825
17845
|
if (NodeType.isElement(node) && dom.getContentEditable(node)) {
|
17826
17846
|
lastContentEditable = contentEditable;
|
17827
17847
|
contentEditable = dom.getContentEditable(node) === 'true';
|
17828
17848
|
hasContentEditableState = true;
|
17829
17849
|
}
|
17830
|
-
children = Tools.grep(node.childNodes);
|
17850
|
+
children$$1 = Tools.grep(node.childNodes);
|
17831
17851
|
if (contentEditable && !hasContentEditableState) {
|
17832
17852
|
for (i = 0, l = formatList.length; i < l; i++) {
|
17833
17853
|
if (removeFormat(ed, formatList[i], vars, node, node)) {
|
@@ -17836,9 +17856,9 @@
|
|
17836
17856
|
}
|
17837
17857
|
}
|
17838
17858
|
if (format.deep) {
|
17839
|
-
if (children.length) {
|
17840
|
-
for (i = 0, l = children.length; i < l; i++) {
|
17841
|
-
process(children[i]);
|
17859
|
+
if (children$$1.length) {
|
17860
|
+
for (i = 0, l = children$$1.length; i < l; i++) {
|
17861
|
+
process(children$$1[i]);
|
17842
17862
|
}
|
17843
17863
|
if (hasContentEditableState) {
|
17844
17864
|
contentEditable = lastContentEditable;
|
@@ -17877,13 +17897,22 @@
|
|
17877
17897
|
if (commonAncestorContainer && /^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) && isTableCell$4(endContainer) && endContainer.firstChild) {
|
17878
17898
|
endContainer = endContainer.firstChild || endContainer;
|
17879
17899
|
}
|
17880
|
-
if (dom
|
17881
|
-
var
|
17900
|
+
if (isChildOfInlineParent(dom, startContainer, endContainer)) {
|
17901
|
+
var marker = Option.from(startContainer.firstChild).getOr(startContainer);
|
17902
|
+
splitToFormatRoot(wrapWithSiblings(dom, marker, true, 'span', {
|
17882
17903
|
'id': '_start',
|
17883
17904
|
'data-mce-type': 'bookmark'
|
17884
|
-
});
|
17885
|
-
|
17886
|
-
|
17905
|
+
}));
|
17906
|
+
unwrap(true);
|
17907
|
+
return;
|
17908
|
+
}
|
17909
|
+
if (isChildOfInlineParent(dom, endContainer, startContainer)) {
|
17910
|
+
var marker = Option.from(endContainer.lastChild).getOr(endContainer);
|
17911
|
+
splitToFormatRoot(wrapWithSiblings(dom, marker, false, 'span', {
|
17912
|
+
'id': '_end',
|
17913
|
+
'data-mce-type': 'bookmark'
|
17914
|
+
}));
|
17915
|
+
unwrap(false);
|
17887
17916
|
return;
|
17888
17917
|
}
|
17889
17918
|
startContainer = wrap$2(dom, startContainer, 'span', {
|
@@ -19801,6 +19830,7 @@
|
|
19801
19830
|
};
|
19802
19831
|
var filterNode = function (node) {
|
19803
19832
|
var i, name, list;
|
19833
|
+
name = node.name;
|
19804
19834
|
if (name in nodeFilters) {
|
19805
19835
|
list = matchedNodes[name];
|
19806
19836
|
if (list) {
|
@@ -21806,6 +21836,12 @@
|
|
21806
21836
|
};
|
21807
21837
|
var getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1);
|
21808
21838
|
var getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1);
|
21839
|
+
var isAtFirstLine = function (scope, pos) {
|
21840
|
+
return getPositionsUntilPreviousLine(scope, pos).breakAt.isNone();
|
21841
|
+
};
|
21842
|
+
var isAtLastLine = function (scope, pos) {
|
21843
|
+
return getPositionsUntilNextLine(scope, pos).breakAt.isNone();
|
21844
|
+
};
|
21809
21845
|
var getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine);
|
21810
21846
|
var getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine);
|
21811
21847
|
var getFirstLinePositions = function (scope) {
|
@@ -22027,6 +22063,74 @@
|
|
22027
22063
|
};
|
22028
22064
|
};
|
22029
22065
|
|
22066
|
+
var isTarget = function (node) {
|
22067
|
+
return contains(['figcaption'], name(node));
|
22068
|
+
};
|
22069
|
+
var rangeBefore = function (target) {
|
22070
|
+
var rng = document.createRange();
|
22071
|
+
rng.setStartBefore(target.dom());
|
22072
|
+
rng.setEndBefore(target.dom());
|
22073
|
+
return rng;
|
22074
|
+
};
|
22075
|
+
var insertElement = function (root, elm, forward) {
|
22076
|
+
if (forward) {
|
22077
|
+
append(root, elm);
|
22078
|
+
} else {
|
22079
|
+
prepend(root, elm);
|
22080
|
+
}
|
22081
|
+
};
|
22082
|
+
var insertBr = function (root, forward) {
|
22083
|
+
var br = Element$$1.fromTag('br');
|
22084
|
+
insertElement(root, br, forward);
|
22085
|
+
return rangeBefore(br);
|
22086
|
+
};
|
22087
|
+
var insertBlock$1 = function (root, forward, blockName, attrs) {
|
22088
|
+
var block = Element$$1.fromTag(blockName);
|
22089
|
+
var br = Element$$1.fromTag('br');
|
22090
|
+
setAll(block, attrs);
|
22091
|
+
append(block, br);
|
22092
|
+
insertElement(root, block, forward);
|
22093
|
+
return rangeBefore(br);
|
22094
|
+
};
|
22095
|
+
var insertEmptyLine = function (root, rootBlockName, attrs, forward) {
|
22096
|
+
if (rootBlockName === '') {
|
22097
|
+
return insertBr(root, forward);
|
22098
|
+
} else {
|
22099
|
+
return insertBlock$1(root, forward, rootBlockName, attrs);
|
22100
|
+
}
|
22101
|
+
};
|
22102
|
+
var getClosestTargetBlock = function (pos, root) {
|
22103
|
+
var isRoot = curry(eq, root);
|
22104
|
+
return closest(Element$$1.fromDom(pos.container()), isBlock, isRoot).filter(isTarget);
|
22105
|
+
};
|
22106
|
+
var isAtFirstOrLastLine = function (root, forward, pos) {
|
22107
|
+
return forward ? isAtLastLine(root.dom(), pos) : isAtFirstLine(root.dom(), pos);
|
22108
|
+
};
|
22109
|
+
var moveCaretToNewEmptyLine = function (editor, forward) {
|
22110
|
+
var root = Element$$1.fromDom(editor.getBody());
|
22111
|
+
var pos = CaretPosition$1.fromRangeStart(editor.selection.getRng());
|
22112
|
+
var rootBlock = Settings.getForcedRootBlock(editor);
|
22113
|
+
var rootBlockAttrs = Settings.getForcedRootBlockAttrs(editor);
|
22114
|
+
return getClosestTargetBlock(pos, root).exists(function () {
|
22115
|
+
if (isAtFirstOrLastLine(root, forward, pos)) {
|
22116
|
+
var rng = insertEmptyLine(root, rootBlock, rootBlockAttrs, forward);
|
22117
|
+
editor.selection.setRng(rng);
|
22118
|
+
return true;
|
22119
|
+
} else {
|
22120
|
+
return false;
|
22121
|
+
}
|
22122
|
+
});
|
22123
|
+
};
|
22124
|
+
var moveV$2 = function (editor, forward) {
|
22125
|
+
return function () {
|
22126
|
+
if (editor.selection.isCollapsed()) {
|
22127
|
+
return moveCaretToNewEmptyLine(editor, forward);
|
22128
|
+
} else {
|
22129
|
+
return false;
|
22130
|
+
}
|
22131
|
+
};
|
22132
|
+
};
|
22133
|
+
|
22030
22134
|
var defaultPatterns = function (patterns) {
|
22031
22135
|
return map(patterns, function (pattern) {
|
22032
22136
|
return merge({
|
@@ -22122,6 +22226,14 @@
|
|
22122
22226
|
ctrlKey: !os.isOSX(),
|
22123
22227
|
altKey: os.isOSX(),
|
22124
22228
|
action: BoundarySelection.movePrevWord(editor, caret)
|
22229
|
+
},
|
22230
|
+
{
|
22231
|
+
keyCode: VK.UP,
|
22232
|
+
action: moveV$2(editor, false)
|
22233
|
+
},
|
22234
|
+
{
|
22235
|
+
keyCode: VK.DOWN,
|
22236
|
+
action: moveV$2(editor, true)
|
22125
22237
|
}
|
22126
22238
|
], evt).each(function (_) {
|
22127
22239
|
evt.preventDefault();
|
@@ -22424,8 +22536,14 @@
|
|
22424
22536
|
};
|
22425
22537
|
var InsertLi = { insert: insert$1 };
|
22426
22538
|
|
22427
|
-
var
|
22428
|
-
|
22539
|
+
var trimZwsp = function (fragment) {
|
22540
|
+
each(descendants(Element$$1.fromDom(fragment), isText), function (text) {
|
22541
|
+
var rawNode = text.dom();
|
22542
|
+
rawNode.nodeValue = Zwsp.trim(rawNode.nodeValue);
|
22543
|
+
});
|
22544
|
+
};
|
22545
|
+
var isEmptyAnchor = function (dom, elm) {
|
22546
|
+
return elm && elm.nodeName === 'A' && dom.isEmpty(elm);
|
22429
22547
|
};
|
22430
22548
|
var isTableCell$5 = function (node) {
|
22431
22549
|
return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
|
@@ -22460,7 +22578,7 @@
|
|
22460
22578
|
if (!node.hasChildNodes() || node.firstChild === node.lastChild && node.firstChild.nodeValue === '') {
|
22461
22579
|
dom.remove(node);
|
22462
22580
|
} else {
|
22463
|
-
if (isEmptyAnchor(node)) {
|
22581
|
+
if (isEmptyAnchor(dom, node)) {
|
22464
22582
|
dom.remove(node);
|
22465
22583
|
}
|
22466
22584
|
}
|
@@ -22565,11 +22683,11 @@
|
|
22565
22683
|
var dom = editor.dom;
|
22566
22684
|
var schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements();
|
22567
22685
|
var rng = editor.selection.getRng();
|
22568
|
-
var createNewBlock = function (name) {
|
22686
|
+
var createNewBlock = function (name$$1) {
|
22569
22687
|
var node = container, block, clonedNode, caretNode;
|
22570
22688
|
var textInlineElements = schema.getTextInlineElements();
|
22571
|
-
if (name || parentBlockName === 'TABLE' || parentBlockName === 'HR') {
|
22572
|
-
block = dom.create(name || newBlockName);
|
22689
|
+
if (name$$1 || parentBlockName === 'TABLE' || parentBlockName === 'HR') {
|
22690
|
+
block = dom.create(name$$1 || newBlockName);
|
22573
22691
|
setForcedBlockAttrs(editor, block);
|
22574
22692
|
} else {
|
22575
22693
|
block = parentBlock.cloneNode(false);
|
@@ -22600,7 +22718,7 @@
|
|
22600
22718
|
return block;
|
22601
22719
|
};
|
22602
22720
|
var isCaretAtStartOrEndOfBlock = function (start) {
|
22603
|
-
var walker, node, name, normalizedOffset;
|
22721
|
+
var walker, node, name$$1, normalizedOffset;
|
22604
22722
|
normalizedOffset = normalizeZwspOffset(start, container, offset);
|
22605
22723
|
if (NodeType.isText(container) && (start ? normalizedOffset > 0 : normalizedOffset < container.nodeValue.length)) {
|
22606
22724
|
return false;
|
@@ -22625,8 +22743,8 @@
|
|
22625
22743
|
while (node = walker.current()) {
|
22626
22744
|
if (NodeType.isElement(node)) {
|
22627
22745
|
if (!node.getAttribute('data-mce-bogus')) {
|
22628
|
-
name = node.nodeName.toLowerCase();
|
22629
|
-
if (nonEmptyElementsMap[name] && name !== 'br') {
|
22746
|
+
name$$1 = node.nodeName.toLowerCase();
|
22747
|
+
if (nonEmptyElementsMap[name$$1] && name$$1 !== 'br') {
|
22630
22748
|
return false;
|
22631
22749
|
}
|
22632
22750
|
}
|
@@ -22712,6 +22830,7 @@
|
|
22712
22830
|
tmpRng = includeZwspInRange(rng).cloneRange();
|
22713
22831
|
tmpRng.setEndAfter(parentBlock);
|
22714
22832
|
fragment = tmpRng.extractContents();
|
22833
|
+
trimZwsp(fragment);
|
22715
22834
|
trimLeadingLineBreaks(fragment);
|
22716
22835
|
newBlock = fragment.firstChild;
|
22717
22836
|
dom.insertAfter(fragment, parentBlock);
|
@@ -22911,7 +23030,7 @@
|
|
22911
23030
|
var isAtBlockBoundary = function (forward, root, pos) {
|
22912
23031
|
var parentBlocks = filter(Parents.parentsAndSelf(Element$$1.fromDom(pos.container()), root), isBlock);
|
22913
23032
|
return head(parentBlocks).fold(function () {
|
22914
|
-
return CaretFinder.navigate(forward, root.dom(), pos).
|
23033
|
+
return CaretFinder.navigate(forward, root.dom(), pos).forall(function (newPos) {
|
22915
23034
|
return isInSameBlock(newPos, pos, root.dom()) === false;
|
22916
23035
|
});
|
22917
23036
|
}, function (parent) {
|
@@ -23041,9 +23160,6 @@
|
|
23041
23160
|
}
|
23042
23161
|
};
|
23043
23162
|
|
23044
|
-
var insertSpaceOrNbspAtPosition = function (root, pos) {
|
23045
|
-
return needsToHaveNbsp(root, pos) ? insertNbspAtPosition(pos) : insertSpaceAtPosition(pos);
|
23046
|
-
};
|
23047
23163
|
var locationToCaretPosition = function (root) {
|
23048
23164
|
return function (location) {
|
23049
23165
|
return location.fold(function (element) {
|
@@ -23075,9 +23191,7 @@
|
|
23075
23191
|
if (editor.selection.isCollapsed()) {
|
23076
23192
|
var isInlineTarget = curry(InlineUtils.isInlineTarget, editor);
|
23077
23193
|
var caretPosition = CaretPosition$1.fromRangeStart(editor.selection.getRng());
|
23078
|
-
return BoundaryLocation.readLocation(isInlineTarget, editor.getBody(), caretPosition).bind(locationToCaretPosition(root)).bind(insertInlineBoundarySpaceOrNbsp(root, pos)).
|
23079
|
-
return insertSpaceOrNbspAtPosition(root, pos).map(setSelection$1(editor)).getOr(false);
|
23080
|
-
}, setSelection$1(editor));
|
23194
|
+
return BoundaryLocation.readLocation(isInlineTarget, editor.getBody(), caretPosition).bind(locationToCaretPosition(root)).bind(insertInlineBoundarySpaceOrNbsp(root, pos)).exists(setSelection$1(editor));
|
23081
23195
|
} else {
|
23082
23196
|
return false;
|
23083
23197
|
}
|
@@ -23136,7 +23250,24 @@
|
|
23136
23250
|
};
|
23137
23251
|
var CaretContainerInput = { setup: setup$b };
|
23138
23252
|
|
23253
|
+
var browser$4 = PlatformDetection$1.detect().browser;
|
23254
|
+
var setupIeInput = function (editor) {
|
23255
|
+
var keypressThrotter = first$1(function () {
|
23256
|
+
if (!editor.composing) {
|
23257
|
+
normalizeNbspsInEditor(editor);
|
23258
|
+
}
|
23259
|
+
}, 0);
|
23260
|
+
if (browser$4.isIE()) {
|
23261
|
+
editor.on('keypress', function (e) {
|
23262
|
+
keypressThrotter.throttle();
|
23263
|
+
});
|
23264
|
+
editor.on('remove', function (e) {
|
23265
|
+
keypressThrotter.cancel();
|
23266
|
+
});
|
23267
|
+
}
|
23268
|
+
};
|
23139
23269
|
var setup$c = function (editor) {
|
23270
|
+
setupIeInput(editor);
|
23140
23271
|
editor.on('input', function (e) {
|
23141
23272
|
if (e.isComposing === false) {
|
23142
23273
|
normalizeNbspsInEditor(editor);
|
@@ -25389,8 +25520,8 @@
|
|
25389
25520
|
defaultSettings: {},
|
25390
25521
|
$: DomQuery,
|
25391
25522
|
majorVersion: '4',
|
25392
|
-
minorVersion: '9.
|
25393
|
-
releaseDate: '2018-12-
|
25523
|
+
minorVersion: '9.2',
|
25524
|
+
releaseDate: '2018-12-17',
|
25394
25525
|
editors: legacyEditors,
|
25395
25526
|
i18n: I18n,
|
25396
25527
|
activeEditor: null,
|