tinymce-rails 4.6.2 → 4.6.3
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 +254 -131
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.js +13 -13
- 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: 93f9f956e1b77cb470a5d45af711fc2a52852b08
|
4
|
+
data.tar.gz: 181e78dff51dc4ee7b10311beca8ba0e8751f8d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52bcf8174f2c22c67f78a146b3fbdf82d90a2c17a156bebb4538ae09ed3ed1a302bc4ec22f63e2012b89e5a35133555f9dab6bcccb84b75e692c18a5e69817d3
|
7
|
+
data.tar.gz: 8b50bf67723ea5e42f4b289e0d40161ccc83f43e26cc7743e7ec6a24e736230279d83374062c214933d321ad6604dd3110765d67c7c2e1029a5d27fb2ac6cc97
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// 4.6.
|
1
|
+
// 4.6.3 (2017-05-30)
|
2
2
|
(function () {
|
3
3
|
|
4
4
|
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
@@ -82,7 +82,7 @@ var defineGlobal = function (id, ref) {
|
|
82
82
|
define(id, [], function () { return ref; });
|
83
83
|
};
|
84
84
|
/*jsc
|
85
|
-
["tinymce.core.api.Main","tinymce.core.api.Tinymce","tinymce.core.Register","tinymce.core.geom.Rect","tinymce.core.util.Promise","tinymce.core.util.Delay","tinymce.core.Env","tinymce.core.dom.EventUtils","tinymce.core.dom.Sizzle","tinymce.core.util.Tools","tinymce.core.dom.DomQuery","tinymce.core.html.Styles","tinymce.core.dom.TreeWalker","tinymce.core.html.Entities","tinymce.core.dom.DOMUtils","tinymce.core.dom.ScriptLoader","tinymce.core.AddOnManager","tinymce.core.dom.RangeUtils","tinymce.core.html.Node","tinymce.core.html.Schema","tinymce.core.html.SaxParser","tinymce.core.html.DomParser","tinymce.core.html.Writer","tinymce.core.html.Serializer","tinymce.core.dom.Serializer","tinymce.core.util.VK","tinymce.core.dom.ControlSelection","tinymce.core.dom.BookmarkManager","tinymce.core.dom.Selection","tinymce.core.Formatter","tinymce.core.UndoManager","tinymce.core.EditorCommands","tinymce.core.util.URI","tinymce.core.util.Class","tinymce.core.util.EventDispatcher","tinymce.core.util.Observable","tinymce.core.WindowManager","tinymce.core.NotificationManager","tinymce.core.EditorObservable","tinymce.core.Shortcuts","tinymce.core.Editor","tinymce.core.util.I18n","tinymce.core.FocusManager","tinymce.core.EditorManager","tinymce.core.util.XHR","tinymce.core.util.JSON","tinymce.core.util.JSONRequest","tinymce.core.util.JSONP","tinymce.core.util.LocalStorage","tinymce.core.api.Compat","tinymce.core.util.Color","tinymce.core.ui.Api","tinymce.core.util.Arr","tinymce.core.dom.Range","tinymce.core.dom.StyleSheetLoader","tinymce.core.dom.NodeType","tinymce.core.caret.CaretContainer","tinymce.core.text.Zwsp","tinymce.core.caret.CaretBookmark","tinymce.core.caret.CaretPosition","tinymce.core.dom.ScrollIntoView","tinymce.core.dom.TridentSelection","tinymce.core.selection.FragmentReader","tinymce.core.dom.ElementUtils","tinymce.core.util.Fun","tinymce.core.fmt.Preview","tinymce.core.fmt.Hooks","tinymce.core.undo.Levels","tinymce.core.delete.DeleteCommands","tinymce.core.InsertContent","global!document","tinymce.core.ui.Window","tinymce.core.ui.MessageBox","tinymce.core.ui.Notification","tinymce.core.init.Render","tinymce.core.Mode","tinymce.core.ui.Sidebar","tinymce.core.util.Uuid","tinymce.core.ErrorReporter","tinymce.core.LegacyInput","tinymce.core.ui.Selector","tinymce.core.ui.Collection","tinymce.core.ui.ReflowQueue","tinymce.core.ui.Control","tinymce.core.ui.Factory","tinymce.core.ui.KeyboardNavigation","tinymce.core.ui.Container","tinymce.core.ui.DragHelper","tinymce.core.ui.Scrollable","tinymce.core.ui.Panel","tinymce.core.ui.Movable","tinymce.core.ui.Resizable","tinymce.core.ui.FloatPanel","tinymce.core.ui.Tooltip","tinymce.core.ui.Widget","tinymce.core.ui.Progress","tinymce.core.ui.Layout","tinymce.core.ui.AbsoluteLayout","tinymce.core.ui.Button","tinymce.core.ui.ButtonGroup","tinymce.core.ui.Checkbox","tinymce.core.ui.ComboBox","tinymce.core.ui.ColorBox","tinymce.core.ui.PanelButton","tinymce.core.ui.ColorButton","tinymce.core.ui.ColorPicker","tinymce.core.ui.Path","tinymce.core.ui.ElementPath","tinymce.core.ui.FormItem","tinymce.core.ui.Form","tinymce.core.ui.FieldSet","tinymce.core.ui.FilePicker","tinymce.core.ui.FitLayout","tinymce.core.ui.FlexLayout","tinymce.core.ui.FlowLayout","tinymce.core.ui.FormatControls","tinymce.core.ui.GridLayout","tinymce.core.ui.Iframe","tinymce.core.ui.InfoBox","tinymce.core.ui.Label","tinymce.core.ui.Toolbar","tinymce.core.ui.MenuBar","tinymce.core.ui.MenuButton","tinymce.core.ui.MenuItem","tinymce.core.ui.Throbber","tinymce.core.ui.Menu","tinymce.core.ui.ListBox","tinymce.core.ui.Radio","tinymce.core.ui.ResizeHandle","tinymce.core.ui.SelectBox","tinymce.core.ui.Slider","tinymce.core.ui.Spacer","tinymce.core.ui.SplitButton","tinymce.core.ui.StackLayout","tinymce.core.ui.TabPanel","tinymce.core.ui.TextBox","ephox.katamari.api.Arr","ephox.katamari.api.Fun","ephox.katamari.api.Future","ephox.katamari.api.Futures","ephox.katamari.api.Result","tinymce.core.caret.CaretCandidate","tinymce.core.geom.ClientRect","tinymce.core.text.ExtendingChar","ephox.sugar.api.dom.Insert","ephox.sugar.api.dom.Replication","ephox.sugar.api.node.Element","ephox.sugar.api.node.Fragment","ephox.sugar.api.node.Node","tinymce.core.dom.ElementType","tinymce.core.dom.Parents","tinymce.core.selection.SelectionUtils","tinymce.core.undo.Fragments","tinymce.core.delete.BlockBoundaryDelete","tinymce.core.delete.BlockRangeDelete","tinymce.core.delete.CefDelete","tinymce.core.delete.InlineBoundaryDelete","tinymce.core.caret.CaretWalker","tinymce.core.dom.RangeNormalizer","tinymce.core.InsertList","tinymce.core.data.ObservableObject","tinymce.core.ui.DomUtils","tinymce.core.ui.BoxUtils","tinymce.core.ui.ClassList","global!window","tinymce.core.init.Init","tinymce.core.PluginManager","tinymce.core.ThemeManager","tinymce.core.content.LinkTargets","tinymce.core.fmt.FontInfo","ephox.katamari.api.Option","global!Array","global!Error","global!String","ephox.katamari.api.LazyValue","ephox.katamari.async.Bounce","ephox.katamari.async.AsyncValues","ephox.sugar.api.search.Traverse","ephox.sugar.api.properties.Attr","global!console","ephox.sugar.api.dom.InsertAll","ephox.sugar.api.dom.Remove","ephox.sugar.api.node.NodeTypes","ephox.sugar.api.dom.Compare","ephox.katamari.api.Options","tinymce.core.undo.Diff","tinymce.core.delete.BlockBoundary","tinymce.core.delete.MergeBlocks","tinymce.core.delete.DeleteUtils","tinymce.core.caret.CaretUtils","tinymce.core.delete.CefDeleteAction","tinymce.core.delete.DeleteElement","tinymce.core.
|
85
|
+
["tinymce.core.api.Main","tinymce.core.api.Tinymce","tinymce.core.Register","tinymce.core.geom.Rect","tinymce.core.util.Promise","tinymce.core.util.Delay","tinymce.core.Env","tinymce.core.dom.EventUtils","tinymce.core.dom.Sizzle","tinymce.core.util.Tools","tinymce.core.dom.DomQuery","tinymce.core.html.Styles","tinymce.core.dom.TreeWalker","tinymce.core.html.Entities","tinymce.core.dom.DOMUtils","tinymce.core.dom.ScriptLoader","tinymce.core.AddOnManager","tinymce.core.dom.RangeUtils","tinymce.core.html.Node","tinymce.core.html.Schema","tinymce.core.html.SaxParser","tinymce.core.html.DomParser","tinymce.core.html.Writer","tinymce.core.html.Serializer","tinymce.core.dom.Serializer","tinymce.core.util.VK","tinymce.core.dom.ControlSelection","tinymce.core.dom.BookmarkManager","tinymce.core.dom.Selection","tinymce.core.Formatter","tinymce.core.UndoManager","tinymce.core.EditorCommands","tinymce.core.util.URI","tinymce.core.util.Class","tinymce.core.util.EventDispatcher","tinymce.core.util.Observable","tinymce.core.WindowManager","tinymce.core.NotificationManager","tinymce.core.EditorObservable","tinymce.core.Shortcuts","tinymce.core.Editor","tinymce.core.util.I18n","tinymce.core.FocusManager","tinymce.core.EditorManager","tinymce.core.util.XHR","tinymce.core.util.JSON","tinymce.core.util.JSONRequest","tinymce.core.util.JSONP","tinymce.core.util.LocalStorage","tinymce.core.api.Compat","tinymce.core.util.Color","tinymce.core.ui.Api","tinymce.core.util.Arr","tinymce.core.dom.Range","tinymce.core.dom.StyleSheetLoader","tinymce.core.dom.NodeType","tinymce.core.caret.CaretContainer","tinymce.core.text.Zwsp","tinymce.core.caret.CaretBookmark","tinymce.core.caret.CaretPosition","tinymce.core.dom.ScrollIntoView","tinymce.core.dom.TridentSelection","tinymce.core.selection.FragmentReader","tinymce.core.dom.ElementUtils","tinymce.core.util.Fun","tinymce.core.fmt.Preview","tinymce.core.fmt.Hooks","tinymce.core.undo.Levels","tinymce.core.delete.DeleteCommands","tinymce.core.InsertContent","global!document","tinymce.core.ui.Window","tinymce.core.ui.MessageBox","tinymce.core.ui.Notification","tinymce.core.init.Render","tinymce.core.Mode","tinymce.core.ui.Sidebar","tinymce.core.util.Uuid","tinymce.core.ErrorReporter","tinymce.core.LegacyInput","tinymce.core.ui.Selector","tinymce.core.ui.Collection","tinymce.core.ui.ReflowQueue","tinymce.core.ui.Control","tinymce.core.ui.Factory","tinymce.core.ui.KeyboardNavigation","tinymce.core.ui.Container","tinymce.core.ui.DragHelper","tinymce.core.ui.Scrollable","tinymce.core.ui.Panel","tinymce.core.ui.Movable","tinymce.core.ui.Resizable","tinymce.core.ui.FloatPanel","tinymce.core.ui.Tooltip","tinymce.core.ui.Widget","tinymce.core.ui.Progress","tinymce.core.ui.Layout","tinymce.core.ui.AbsoluteLayout","tinymce.core.ui.Button","tinymce.core.ui.ButtonGroup","tinymce.core.ui.Checkbox","tinymce.core.ui.ComboBox","tinymce.core.ui.ColorBox","tinymce.core.ui.PanelButton","tinymce.core.ui.ColorButton","tinymce.core.ui.ColorPicker","tinymce.core.ui.Path","tinymce.core.ui.ElementPath","tinymce.core.ui.FormItem","tinymce.core.ui.Form","tinymce.core.ui.FieldSet","tinymce.core.ui.FilePicker","tinymce.core.ui.FitLayout","tinymce.core.ui.FlexLayout","tinymce.core.ui.FlowLayout","tinymce.core.ui.FormatControls","tinymce.core.ui.GridLayout","tinymce.core.ui.Iframe","tinymce.core.ui.InfoBox","tinymce.core.ui.Label","tinymce.core.ui.Toolbar","tinymce.core.ui.MenuBar","tinymce.core.ui.MenuButton","tinymce.core.ui.MenuItem","tinymce.core.ui.Throbber","tinymce.core.ui.Menu","tinymce.core.ui.ListBox","tinymce.core.ui.Radio","tinymce.core.ui.ResizeHandle","tinymce.core.ui.SelectBox","tinymce.core.ui.Slider","tinymce.core.ui.Spacer","tinymce.core.ui.SplitButton","tinymce.core.ui.StackLayout","tinymce.core.ui.TabPanel","tinymce.core.ui.TextBox","ephox.katamari.api.Arr","ephox.katamari.api.Fun","ephox.katamari.api.Future","ephox.katamari.api.Futures","ephox.katamari.api.Result","tinymce.core.caret.CaretCandidate","tinymce.core.geom.ClientRect","tinymce.core.text.ExtendingChar","ephox.sugar.api.dom.Insert","ephox.sugar.api.dom.Replication","ephox.sugar.api.node.Element","ephox.sugar.api.node.Fragment","ephox.sugar.api.node.Node","tinymce.core.dom.ElementType","tinymce.core.dom.Parents","tinymce.core.selection.SelectionUtils","tinymce.core.undo.Fragments","tinymce.core.delete.BlockBoundaryDelete","tinymce.core.delete.BlockRangeDelete","tinymce.core.delete.CefDelete","tinymce.core.delete.InlineBoundaryDelete","tinymce.core.caret.CaretWalker","tinymce.core.dom.RangeNormalizer","tinymce.core.InsertList","tinymce.core.data.ObservableObject","tinymce.core.ui.DomUtils","tinymce.core.ui.BoxUtils","tinymce.core.ui.ClassList","global!window","tinymce.core.init.Init","tinymce.core.PluginManager","tinymce.core.ThemeManager","tinymce.core.content.LinkTargets","tinymce.core.fmt.FontInfo","ephox.katamari.api.Option","global!Array","global!Error","global!String","ephox.katamari.api.LazyValue","ephox.katamari.async.Bounce","ephox.katamari.async.AsyncValues","ephox.sugar.api.search.Traverse","ephox.sugar.api.properties.Attr","global!console","ephox.sugar.api.dom.InsertAll","ephox.sugar.api.dom.Remove","ephox.sugar.api.node.NodeTypes","ephox.sugar.api.dom.Compare","ephox.katamari.api.Options","tinymce.core.undo.Diff","tinymce.core.delete.BlockBoundary","tinymce.core.delete.MergeBlocks","tinymce.core.delete.DeleteUtils","tinymce.core.caret.CaretUtils","tinymce.core.delete.CefDeleteAction","tinymce.core.delete.DeleteElement","tinymce.core.caret.CaretFinder","tinymce.core.keyboard.BoundaryCaret","tinymce.core.keyboard.BoundaryLocation","tinymce.core.keyboard.BoundarySelection","tinymce.core.keyboard.InlineUtils","tinymce.core.data.Binding","tinymce.core.init.InitContentBody","global!Object","global!setTimeout","ephox.katamari.api.Type","ephox.katamari.api.Struct","ephox.sugar.alien.Recurse","ephox.sand.api.Node","ephox.sand.api.PlatformDetection","ephox.sugar.api.search.Selectors","ephox.katamari.api.Obj","ephox.sugar.api.search.PredicateFind","tinymce.core.dom.Empty","ephox.katamari.api.Adt","tinymce.core.text.Bidi","tinymce.core.caret.CaretContainerInline","tinymce.core.caret.CaretContainerRemove","tinymce.core.util.LazyEvaluator","ephox.katamari.api.Cell","tinymce.core.caret.CaretContainerInput","tinymce.core.EditorUpload","tinymce.core.ForceBlocks","tinymce.core.keyboard.KeyboardOverrides","tinymce.core.NodeChange","tinymce.core.SelectionOverrides","tinymce.core.util.Quirks","ephox.katamari.data.Immutable","ephox.katamari.data.MixedBag","ephox.sand.util.Global","ephox.katamari.api.Thunk","ephox.sand.core.PlatformDetection","global!navigator","ephox.sugar.api.node.Body","ephox.sugar.impl.ClosestOrAncestor","ephox.sugar.api.search.SelectorExists","tinymce.core.file.Uploader","tinymce.core.file.ImageScanner","tinymce.core.file.BlobCache","tinymce.core.file.UploadStatus","tinymce.core.keyboard.ArrowKeys","tinymce.core.keyboard.DeleteBackspaceKeys","tinymce.core.keyboard.EnterKey","tinymce.core.keyboard.SpaceKey","tinymce.core.caret.FakeCaret","tinymce.core.caret.LineUtils","tinymce.core.DragDropOverrides","tinymce.core.keyboard.CefUtils","tinymce.core.dom.NodePath","ephox.katamari.util.BagUtils","ephox.katamari.api.Resolve","ephox.sand.core.Browser","ephox.sand.core.OperatingSystem","ephox.sand.detect.DeviceType","ephox.sand.detect.UaString","ephox.sand.info.PlatformInfo","ephox.sugar.api.search.SelectorFind","tinymce.core.file.Conversions","global!URL","tinymce.core.keyboard.CefNavigation","tinymce.core.keyboard.MatchKeys","tinymce.core.keyboard.InsertSpace","tinymce.core.dom.Dimensions","tinymce.core.dom.MousePosition","ephox.katamari.api.Global","ephox.sand.detect.Version","ephox.katamari.api.Strings","tinymce.core.caret.LineWalker","ephox.katamari.api.Merger","global!Number","ephox.katamari.str.StrAppend","ephox.katamari.str.StringParts"]
|
86
86
|
jsc*/
|
87
87
|
/**
|
88
88
|
* Rect.js
|
@@ -14873,31 +14873,28 @@ define(
|
|
14873
14873
|
|
14874
14874
|
if (!settings.allow_unsafe_link_target) {
|
14875
14875
|
self.addAttributeFilter('href', function (nodes) {
|
14876
|
-
var i = nodes.length, node
|
14877
|
-
var rules = 'noopener noreferrer';
|
14876
|
+
var i = nodes.length, node;
|
14878
14877
|
|
14879
|
-
function
|
14880
|
-
|
14881
|
-
|
14882
|
-
|
14878
|
+
var appendRel = function (rel) {
|
14879
|
+
var parts = rel.split(' ').filter(function (p) {
|
14880
|
+
return p.length > 0;
|
14881
|
+
});
|
14882
|
+
return parts.concat(['noopener']).join(' ');
|
14883
|
+
};
|
14883
14884
|
|
14884
|
-
function
|
14885
|
-
var
|
14886
|
-
if (
|
14887
|
-
|
14885
|
+
var addNoOpener = function (rel) {
|
14886
|
+
var newRel = rel ? Tools.trim(rel) : '';
|
14887
|
+
if (!/\b(noopener)\b/g.test(newRel)) {
|
14888
|
+
return appendRel(newRel);
|
14889
|
+
} else {
|
14890
|
+
return newRel;
|
14888
14891
|
}
|
14889
|
-
|
14890
|
-
}
|
14891
|
-
|
14892
|
-
function toggleTargetRules(rel, isUnsafe) {
|
14893
|
-
return isUnsafe ? addTargetRules(rel) : removeTargetRules(rel);
|
14894
|
-
}
|
14892
|
+
};
|
14895
14893
|
|
14896
14894
|
while (i--) {
|
14897
14895
|
node = nodes[i];
|
14898
|
-
|
14899
|
-
|
14900
|
-
node.attr('rel', toggleTargetRules(rel, node.attr('target') == '_blank'));
|
14896
|
+
if (node.name === 'a' && node.attr('target') === '_blank') {
|
14897
|
+
node.attr('rel', addNoOpener(node.attr('rel')));
|
14901
14898
|
}
|
14902
14899
|
}
|
14903
14900
|
});
|
@@ -20911,6 +20908,17 @@ define(
|
|
20911
20908
|
var each = Tools.each, trim = Tools.trim;
|
20912
20909
|
var isIE = Env.ie;
|
20913
20910
|
|
20911
|
+
var isValidRange = function (rng) {
|
20912
|
+
if (!rng) {
|
20913
|
+
return false;
|
20914
|
+
} else if (rng.select) { // Native IE range still produced by placeCaretAt
|
20915
|
+
return true;
|
20916
|
+
} else {
|
20917
|
+
var sc = rng.startContainer, ec = rng.endContainer;
|
20918
|
+
return !!(sc && sc.parentNode && ec && ec.parentNode);
|
20919
|
+
}
|
20920
|
+
};
|
20921
|
+
|
20914
20922
|
/**
|
20915
20923
|
* Constructs a new selection instance.
|
20916
20924
|
*
|
@@ -21477,7 +21485,7 @@ define(
|
|
21477
21485
|
setRng: function (rng, forward) {
|
21478
21486
|
var self = this, sel, node, evt;
|
21479
21487
|
|
21480
|
-
if (!rng) {
|
21488
|
+
if (!isValidRange(rng)) {
|
21481
21489
|
return;
|
21482
21490
|
}
|
21483
21491
|
|
@@ -25907,7 +25915,7 @@ define(
|
|
25907
25915
|
function (Fun, TreeWalker, NodeType, CaretPosition, CaretContainer, CaretCandidate) {
|
25908
25916
|
var isContentEditableTrue = NodeType.isContentEditableTrue,
|
25909
25917
|
isContentEditableFalse = NodeType.isContentEditableFalse,
|
25910
|
-
isBlockLike = NodeType.matchStyleValues('display', 'block table table-cell table-caption'),
|
25918
|
+
isBlockLike = NodeType.matchStyleValues('display', 'block table table-cell table-caption list-item'),
|
25911
25919
|
isCaretContainer = CaretContainer.isCaretContainer,
|
25912
25920
|
isCaretContainerBlock = CaretContainer.isCaretContainerBlock,
|
25913
25921
|
curry = Fun.curry,
|
@@ -26467,25 +26475,69 @@ define(
|
|
26467
26475
|
'ephox.katamari.api.Option',
|
26468
26476
|
'tinymce.core.caret.CaretCandidate',
|
26469
26477
|
'tinymce.core.caret.CaretPosition',
|
26478
|
+
'tinymce.core.caret.CaretUtils',
|
26470
26479
|
'tinymce.core.caret.CaretWalker',
|
26471
26480
|
'tinymce.core.dom.NodeType'
|
26472
26481
|
],
|
26473
|
-
function (Fun, Option, CaretCandidate, CaretPosition, CaretWalker, NodeType) {
|
26474
|
-
var fromPosition = function (forward, rootElement, position) {
|
26475
|
-
var walker = new CaretWalker(rootElement);
|
26476
|
-
return Option.from(forward ? walker.next(position) : walker.prev(position));
|
26477
|
-
};
|
26478
|
-
|
26482
|
+
function (Fun, Option, CaretCandidate, CaretPosition, CaretUtils, CaretWalker, NodeType) {
|
26479
26483
|
var walkToPositionIn = function (forward, rootNode, startNode) {
|
26480
|
-
var
|
26481
|
-
|
26482
|
-
return Option.from(forward ? caretWalker.next(startPos) : caretWalker.prev(startPos));
|
26484
|
+
var position = forward ? CaretPosition.before(startNode) : CaretPosition.after(startNode);
|
26485
|
+
return fromPosition(forward, rootNode, position);
|
26483
26486
|
};
|
26484
26487
|
|
26485
26488
|
var afterElement = function (node) {
|
26486
26489
|
return NodeType.isBr(node) ? CaretPosition.before(node) : CaretPosition.after(node);
|
26487
26490
|
};
|
26488
26491
|
|
26492
|
+
var isBeforeOrStart = function (position) {
|
26493
|
+
if (CaretPosition.isTextPosition(position)) {
|
26494
|
+
return position.offset() === 0;
|
26495
|
+
} else {
|
26496
|
+
return CaretCandidate.isCaretCandidate(position.getNode());
|
26497
|
+
}
|
26498
|
+
};
|
26499
|
+
|
26500
|
+
var isAfterOrEnd = function (position) {
|
26501
|
+
if (CaretPosition.isTextPosition(position)) {
|
26502
|
+
return position.offset() === position.container().data.length;
|
26503
|
+
} else {
|
26504
|
+
return CaretCandidate.isCaretCandidate(position.getNode(true));
|
26505
|
+
}
|
26506
|
+
};
|
26507
|
+
|
26508
|
+
var isBeforeAfterSameElement = function (from, to) {
|
26509
|
+
return !CaretPosition.isTextPosition(from) && !CaretPosition.isTextPosition(to) && from.getNode() === to.getNode(true);
|
26510
|
+
};
|
26511
|
+
|
26512
|
+
var isAtBr = function (position) {
|
26513
|
+
return !CaretPosition.isTextPosition(position) && NodeType.isBr(position.getNode());
|
26514
|
+
};
|
26515
|
+
|
26516
|
+
var shouldSkipPosition = function (forward, from, to) {
|
26517
|
+
if (forward) {
|
26518
|
+
return !isBeforeAfterSameElement(from, to) && !isAtBr(from) && isAfterOrEnd(from) && isBeforeOrStart(to);
|
26519
|
+
} else {
|
26520
|
+
return !isBeforeAfterSameElement(to, from) && isBeforeOrStart(from) && isAfterOrEnd(to);
|
26521
|
+
}
|
26522
|
+
};
|
26523
|
+
|
26524
|
+
// Finds: <p>a|<b>b</b></p> -> <p>a<b>|b</b></p>
|
26525
|
+
var fromPosition = function (forward, rootNode, position) {
|
26526
|
+
var walker = new CaretWalker(rootNode);
|
26527
|
+
return Option.from(forward ? walker.next(position) : walker.prev(position));
|
26528
|
+
};
|
26529
|
+
|
26530
|
+
// Finds: <p>a|<b>b</b></p> -> <p>a<b>b|</b></p>
|
26531
|
+
var navigate = function (forward, rootNode, from) {
|
26532
|
+
return fromPosition(forward, rootNode, from).bind(function (to) {
|
26533
|
+
if (CaretUtils.isInSameBlock(from, to, rootNode) && shouldSkipPosition(forward, from, to)) {
|
26534
|
+
return fromPosition(forward, rootNode, to);
|
26535
|
+
} else {
|
26536
|
+
return Option.some(to);
|
26537
|
+
}
|
26538
|
+
});
|
26539
|
+
};
|
26540
|
+
|
26489
26541
|
var positionIn = function (forward, element) {
|
26490
26542
|
var startNode = forward ? element.firstChild : element.lastChild;
|
26491
26543
|
if (NodeType.isText(startNode)) {
|
@@ -26503,6 +26555,7 @@ define(
|
|
26503
26555
|
|
26504
26556
|
return {
|
26505
26557
|
fromPosition: fromPosition,
|
26558
|
+
navigate: navigate,
|
26506
26559
|
positionIn: positionIn
|
26507
26560
|
};
|
26508
26561
|
}
|
@@ -27276,6 +27329,7 @@ define(
|
|
27276
27329
|
define(
|
27277
27330
|
'tinymce.core.keyboard.InlineUtils',
|
27278
27331
|
[
|
27332
|
+
'ephox.katamari.api.Arr',
|
27279
27333
|
'ephox.katamari.api.Fun',
|
27280
27334
|
'ephox.katamari.api.Option',
|
27281
27335
|
'ephox.katamari.api.Options',
|
@@ -27285,9 +27339,10 @@ define(
|
|
27285
27339
|
'tinymce.core.caret.CaretUtils',
|
27286
27340
|
'tinymce.core.caret.CaretWalker',
|
27287
27341
|
'tinymce.core.dom.DOMUtils',
|
27342
|
+
'tinymce.core.dom.NodeType',
|
27288
27343
|
'tinymce.core.text.Bidi'
|
27289
27344
|
],
|
27290
|
-
function (Fun, Option, Options, CaretContainer, CaretFinder, CaretPosition, CaretUtils, CaretWalker, DOMUtils, Bidi) {
|
27345
|
+
function (Arr, Fun, Option, Options, CaretContainer, CaretFinder, CaretPosition, CaretUtils, CaretWalker, DOMUtils, NodeType, Bidi) {
|
27291
27346
|
var isInlineTarget = function (elm) {
|
27292
27347
|
return DOMUtils.DOM.is(elm, 'a[href],code');
|
27293
27348
|
};
|
@@ -27296,8 +27351,18 @@ define(
|
|
27296
27351
|
return DOMUtils.DOM.getStyle(element, 'direction', true) === 'rtl' || Bidi.hasStrongRtl(element.textContent);
|
27297
27352
|
};
|
27298
27353
|
|
27354
|
+
var findInlineParents = function (rootNode, pos) {
|
27355
|
+
return Arr.filter(DOMUtils.DOM.getParents(pos.container(), '*', rootNode), isInlineTarget);
|
27356
|
+
};
|
27357
|
+
|
27299
27358
|
var findInline = function (rootNode, pos) {
|
27300
|
-
|
27359
|
+
var parents = findInlineParents(rootNode, pos);
|
27360
|
+
return Option.from(parents[0]);
|
27361
|
+
};
|
27362
|
+
|
27363
|
+
var findRootInline = function (rootNode, pos) {
|
27364
|
+
var parents = findInlineParents(rootNode, pos);
|
27365
|
+
return Option.from(parents[parents.length - 1]);
|
27301
27366
|
};
|
27302
27367
|
|
27303
27368
|
var hasSameParentBlock = function (rootNode, node1, node2) {
|
@@ -27307,11 +27372,11 @@ define(
|
|
27307
27372
|
};
|
27308
27373
|
|
27309
27374
|
var isInInline = function (rootNode, pos) {
|
27310
|
-
return pos ?
|
27375
|
+
return pos ? findRootInline(rootNode, pos).isSome() : false;
|
27311
27376
|
};
|
27312
27377
|
|
27313
27378
|
var isAtInlineEndPoint = function (rootNode, pos) {
|
27314
|
-
return
|
27379
|
+
return findRootInline(rootNode, pos).map(function (inline) {
|
27315
27380
|
return findCaretPosition(inline, false, pos).isNone() || findCaretPosition(inline, true, pos).isNone();
|
27316
27381
|
}).getOr(false);
|
27317
27382
|
};
|
@@ -27332,9 +27397,25 @@ define(
|
|
27332
27397
|
var container = pos.container(), offset = pos.offset();
|
27333
27398
|
|
27334
27399
|
if (forward) {
|
27335
|
-
|
27400
|
+
if (CaretContainer.isCaretContainerInline(container)) {
|
27401
|
+
if (NodeType.isText(container.nextSibling)) {
|
27402
|
+
return new CaretPosition(container.nextSibling, 0);
|
27403
|
+
} else {
|
27404
|
+
return CaretPosition.after(container);
|
27405
|
+
}
|
27406
|
+
} else {
|
27407
|
+
return CaretContainer.isBeforeInline(pos) ? new CaretPosition(container, offset + 1) : pos;
|
27408
|
+
}
|
27336
27409
|
} else {
|
27337
|
-
|
27410
|
+
if (CaretContainer.isCaretContainerInline(container)) {
|
27411
|
+
if (NodeType.isText(container.previousSibling)) {
|
27412
|
+
return new CaretPosition(container.previousSibling, container.previousSibling.data.length);
|
27413
|
+
} else {
|
27414
|
+
return CaretPosition.before(container);
|
27415
|
+
}
|
27416
|
+
} else {
|
27417
|
+
return CaretContainer.isAfterInline(pos) ? new CaretPosition(container, offset - 1) : pos;
|
27418
|
+
}
|
27338
27419
|
}
|
27339
27420
|
};
|
27340
27421
|
|
@@ -27344,6 +27425,7 @@ define(
|
|
27344
27425
|
return {
|
27345
27426
|
isInlineTarget: isInlineTarget,
|
27346
27427
|
findInline: findInline,
|
27428
|
+
findRootInline: findRootInline,
|
27347
27429
|
isInInline: isInInline,
|
27348
27430
|
isRtl: isRtl,
|
27349
27431
|
isAtInlineEndPoint: isAtInlineEndPoint,
|
@@ -27881,6 +27963,11 @@ define(
|
|
27881
27963
|
}
|
27882
27964
|
};
|
27883
27965
|
|
27966
|
+
var isPosCaretContainer = function (pos, caret) {
|
27967
|
+
var caretNode = caret.get();
|
27968
|
+
return caretNode && pos.container() === caretNode && CaretContainer.isCaretContainerInline(caretNode);
|
27969
|
+
};
|
27970
|
+
|
27884
27971
|
var renderCaret = function (caret, location) {
|
27885
27972
|
return location.fold(
|
27886
27973
|
function (element) { // Before
|
@@ -27891,18 +27978,26 @@ define(
|
|
27891
27978
|
},
|
27892
27979
|
function (element) { // Start
|
27893
27980
|
return InlineUtils.findCaretPositionIn(element, true).map(function (pos) {
|
27894
|
-
|
27895
|
-
|
27896
|
-
|
27897
|
-
|
27981
|
+
if (!isPosCaretContainer(pos, caret)) {
|
27982
|
+
CaretContainerRemove.remove(caret.get());
|
27983
|
+
var text = insertInlinePos(pos, true);
|
27984
|
+
caret.set(text);
|
27985
|
+
return new CaretPosition(text, 1);
|
27986
|
+
} else {
|
27987
|
+
return new CaretPosition(caret.get(), 1);
|
27988
|
+
}
|
27898
27989
|
});
|
27899
27990
|
},
|
27900
27991
|
function (element) { // End
|
27901
27992
|
return InlineUtils.findCaretPositionIn(element, false).map(function (pos) {
|
27902
|
-
|
27903
|
-
|
27904
|
-
|
27905
|
-
|
27993
|
+
if (!isPosCaretContainer(pos, caret)) {
|
27994
|
+
CaretContainerRemove.remove(caret.get());
|
27995
|
+
var text = insertInlinePos(pos, false);
|
27996
|
+
caret.set(text);
|
27997
|
+
return new CaretPosition(text, text.length - 1);
|
27998
|
+
} else {
|
27999
|
+
return new CaretPosition(caret.get(), caret.get().length - 1);
|
28000
|
+
}
|
27906
28001
|
});
|
27907
28002
|
},
|
27908
28003
|
function (element) { // After
|
@@ -27991,10 +28086,10 @@ define(
|
|
27991
28086
|
var before = function (rootNode, pos) {
|
27992
28087
|
var nPos = InlineUtils.normalizeForwards(pos);
|
27993
28088
|
var scope = rescope(rootNode, nPos.container());
|
27994
|
-
return InlineUtils.
|
28089
|
+
return InlineUtils.findRootInline(scope, nPos).fold(
|
27995
28090
|
function () {
|
27996
28091
|
return InlineUtils.findCaretPosition(scope, true, nPos)
|
27997
|
-
.bind(Fun.curry(InlineUtils.
|
28092
|
+
.bind(Fun.curry(InlineUtils.findRootInline, scope))
|
27998
28093
|
.map(function (inline) {
|
27999
28094
|
return Location.before(inline);
|
28000
28095
|
});
|
@@ -28005,7 +28100,7 @@ define(
|
|
28005
28100
|
|
28006
28101
|
var start = function (rootNode, pos) {
|
28007
28102
|
var nPos = InlineUtils.normalizeBackwards(pos);
|
28008
|
-
return InlineUtils.
|
28103
|
+
return InlineUtils.findRootInline(rootNode, nPos).bind(function (inline) {
|
28009
28104
|
var prevPos = InlineUtils.findCaretPosition(inline, false, nPos);
|
28010
28105
|
return prevPos.isNone() ? Option.some(Location.start(inline)) : Option.none();
|
28011
28106
|
});
|
@@ -28013,7 +28108,7 @@ define(
|
|
28013
28108
|
|
28014
28109
|
var end = function (rootNode, pos) {
|
28015
28110
|
var nPos = InlineUtils.normalizeForwards(pos);
|
28016
|
-
return InlineUtils.
|
28111
|
+
return InlineUtils.findRootInline(rootNode, nPos).bind(function (inline) {
|
28017
28112
|
var nextPos = InlineUtils.findCaretPosition(inline, true, nPos);
|
28018
28113
|
return nextPos.isNone() ? Option.some(Location.end(inline)) : Option.none();
|
28019
28114
|
});
|
@@ -28022,10 +28117,10 @@ define(
|
|
28022
28117
|
var after = function (rootNode, pos) {
|
28023
28118
|
var nPos = InlineUtils.normalizeBackwards(pos);
|
28024
28119
|
var scope = rescope(rootNode, nPos.container());
|
28025
|
-
return InlineUtils.
|
28120
|
+
return InlineUtils.findRootInline(scope, nPos).fold(
|
28026
28121
|
function () {
|
28027
28122
|
return InlineUtils.findCaretPosition(scope, false, nPos)
|
28028
|
-
.bind(Fun.curry(InlineUtils.
|
28123
|
+
.bind(Fun.curry(InlineUtils.findRootInline, scope))
|
28029
28124
|
.map(function (inline) {
|
28030
28125
|
return Location.after(inline);
|
28031
28126
|
});
|
@@ -28091,8 +28186,8 @@ define(
|
|
28091
28186
|
|
28092
28187
|
var betweenInlines = function (forward, rootNode, from, to, location) {
|
28093
28188
|
return Options.liftN([
|
28094
|
-
InlineUtils.
|
28095
|
-
InlineUtils.
|
28189
|
+
InlineUtils.findRootInline(rootNode, from),
|
28190
|
+
InlineUtils.findRootInline(rootNode, to)
|
28096
28191
|
], function (fromInline, toInline) {
|
28097
28192
|
if (fromInline !== toInline && InlineUtils.hasSameParentBlock(rootNode, fromInline, toInline)) {
|
28098
28193
|
// Force after since some browsers normalize and lean left into the closest inline
|
@@ -28332,6 +28427,7 @@ define(
|
|
28332
28427
|
'ephox.katamari.api.Options',
|
28333
28428
|
'ephox.sugar.api.node.Element',
|
28334
28429
|
'tinymce.core.caret.CaretContainer',
|
28430
|
+
'tinymce.core.caret.CaretFinder',
|
28335
28431
|
'tinymce.core.caret.CaretPosition',
|
28336
28432
|
'tinymce.core.caret.CaretUtils',
|
28337
28433
|
'tinymce.core.delete.DeleteElement',
|
@@ -28340,7 +28436,10 @@ define(
|
|
28340
28436
|
'tinymce.core.keyboard.BoundarySelection',
|
28341
28437
|
'tinymce.core.keyboard.InlineUtils'
|
28342
28438
|
],
|
28343
|
-
function (
|
28439
|
+
function (
|
28440
|
+
Fun, Option, Options, Element, CaretContainer, CaretFinder, CaretPosition, CaretUtils, DeleteElement, BoundaryCaret, BoundaryLocation, BoundarySelection,
|
28441
|
+
InlineUtils
|
28442
|
+
) {
|
28344
28443
|
var isFeatureEnabled = function (editor) {
|
28345
28444
|
return editor.settings.inline_boundaries !== false;
|
28346
28445
|
};
|
@@ -28354,6 +28453,21 @@ define(
|
|
28354
28453
|
return range;
|
28355
28454
|
};
|
28356
28455
|
|
28456
|
+
// Checks for delete at <code>|a</code> when there is only one item left except the zwsp caret container nodes
|
28457
|
+
var hasOnlyTwoOrLessPositionsLeft = function (elm) {
|
28458
|
+
return Options.liftN([
|
28459
|
+
InlineUtils.findCaretPositionIn(elm, true),
|
28460
|
+
InlineUtils.findCaretPositionIn(elm, false)
|
28461
|
+
], function (firstPos, lastPos) {
|
28462
|
+
var normalizedFirstPos = InlineUtils.normalizePosition(true, firstPos);
|
28463
|
+
var normalizedLastPos = InlineUtils.normalizePosition(false, lastPos);
|
28464
|
+
|
28465
|
+
return InlineUtils.findCaretPosition(elm, true, normalizedFirstPos).map(function (pos) {
|
28466
|
+
return pos.isEqual(normalizedLastPos);
|
28467
|
+
}).getOr(true);
|
28468
|
+
}).getOr(true);
|
28469
|
+
};
|
28470
|
+
|
28357
28471
|
var setCaretLocation = function (editor, caret) {
|
28358
28472
|
return function (location) {
|
28359
28473
|
return BoundaryCaret.renderCaret(caret, location).map(function (pos) {
|
@@ -28406,27 +28520,31 @@ define(
|
|
28406
28520
|
})
|
28407
28521
|
.map(setCaretLocation(editor, caret))
|
28408
28522
|
.getOrThunk(function () {
|
28409
|
-
var toPosition =
|
28523
|
+
var toPosition = CaretFinder.navigate(forward, rootNode, from);
|
28410
28524
|
var toLocation = toPosition.bind(function (pos) {
|
28411
28525
|
return BoundaryLocation.readLocation(rootNode, pos);
|
28412
28526
|
});
|
28413
28527
|
|
28414
28528
|
if (fromLocation.isSome() && toLocation.isSome()) {
|
28415
|
-
return InlineUtils.
|
28416
|
-
|
28417
|
-
|
28529
|
+
return InlineUtils.findRootInline(rootNode, from).map(function (elm) {
|
28530
|
+
if (hasOnlyTwoOrLessPositionsLeft(elm)) {
|
28531
|
+
DeleteElement.deleteElement(editor, forward, Element.fromDom(elm));
|
28532
|
+
return true;
|
28533
|
+
} else {
|
28534
|
+
return false;
|
28535
|
+
}
|
28418
28536
|
}).getOr(false);
|
28419
28537
|
} else {
|
28420
|
-
return toLocation.
|
28421
|
-
toPosition.map(function (to) {
|
28538
|
+
return toLocation.bind(function (_) {
|
28539
|
+
return toPosition.map(function (to) {
|
28422
28540
|
if (forward) {
|
28423
28541
|
deleteFromTo(editor, caret, from, to);
|
28424
28542
|
} else {
|
28425
28543
|
deleteFromTo(editor, caret, to, from);
|
28426
28544
|
}
|
28427
|
-
});
|
28428
28545
|
|
28429
|
-
|
28546
|
+
return true;
|
28547
|
+
});
|
28430
28548
|
}).getOr(false);
|
28431
28549
|
}
|
28432
28550
|
});
|
@@ -38264,7 +38382,7 @@ define(
|
|
38264
38382
|
xhr.onload = function () {
|
38265
38383
|
var json;
|
38266
38384
|
|
38267
|
-
if (xhr.status
|
38385
|
+
if (xhr.status < 200 || xhr.status >= 300) {
|
38268
38386
|
failure("HTTP Error: " + xhr.status);
|
38269
38387
|
return;
|
38270
38388
|
}
|
@@ -40226,22 +40344,28 @@ define(
|
|
40226
40344
|
'tinymce.core.util.VK'
|
40227
40345
|
],
|
40228
40346
|
function (Arr, Cell, BoundarySelection, CefNavigation, MatchKeys, VK) {
|
40347
|
+
var executeKeydownOverride = function (editor, caret, evt) {
|
40348
|
+
var matches = MatchKeys.match([
|
40349
|
+
{ keyCode: VK.RIGHT, action: CefNavigation.moveH(editor, true) },
|
40350
|
+
{ keyCode: VK.LEFT, action: CefNavigation.moveH(editor, false) },
|
40351
|
+
{ keyCode: VK.UP, action: CefNavigation.moveV(editor, false) },
|
40352
|
+
{ keyCode: VK.DOWN, action: CefNavigation.moveV(editor, true) },
|
40353
|
+
{ keyCode: VK.RIGHT, action: BoundarySelection.move(editor, caret, true) },
|
40354
|
+
{ keyCode: VK.LEFT, action: BoundarySelection.move(editor, caret, false) }
|
40355
|
+
], evt);
|
40356
|
+
|
40357
|
+
Arr.find(matches, function (pattern) {
|
40358
|
+
return pattern.action();
|
40359
|
+
}).each(function (_) {
|
40360
|
+
evt.preventDefault();
|
40361
|
+
});
|
40362
|
+
};
|
40363
|
+
|
40229
40364
|
var setup = function (editor, caret) {
|
40230
40365
|
editor.on('keydown', function (evt) {
|
40231
|
-
|
40232
|
-
|
40233
|
-
|
40234
|
-
{ keyCode: VK.UP, action: CefNavigation.moveV(editor, false) },
|
40235
|
-
{ keyCode: VK.DOWN, action: CefNavigation.moveV(editor, true) },
|
40236
|
-
{ keyCode: VK.RIGHT, action: BoundarySelection.move(editor, caret, true) },
|
40237
|
-
{ keyCode: VK.LEFT, action: BoundarySelection.move(editor, caret, false) }
|
40238
|
-
], evt);
|
40239
|
-
|
40240
|
-
Arr.find(matches, function (pattern) {
|
40241
|
-
return pattern.action();
|
40242
|
-
}).each(function (_) {
|
40243
|
-
evt.preventDefault();
|
40244
|
-
});
|
40366
|
+
if (evt.isDefaultPrevented() === false) {
|
40367
|
+
executeKeydownOverride(editor, caret, evt);
|
40368
|
+
}
|
40245
40369
|
});
|
40246
40370
|
};
|
40247
40371
|
|
@@ -40273,43 +40397,48 @@ define(
|
|
40273
40397
|
'tinymce.core.util.VK'
|
40274
40398
|
],
|
40275
40399
|
function (Arr, BlockBoundaryDelete, BlockRangeDelete, CefDelete, InlineBoundaryDelete, MatchKeys, VK) {
|
40276
|
-
var
|
40277
|
-
|
40278
|
-
|
40279
|
-
|
40280
|
-
|
40281
|
-
|
40282
|
-
|
40283
|
-
|
40284
|
-
|
40285
|
-
|
40286
|
-
|
40287
|
-
|
40288
|
-
|
40289
|
-
|
40290
|
-
|
40291
|
-
|
40292
|
-
evt.preventDefault();
|
40293
|
-
});
|
40400
|
+
var executeKeydownOverride = function (editor, caret, evt) {
|
40401
|
+
var matches = MatchKeys.match([
|
40402
|
+
{ keyCode: VK.BACKSPACE, action: MatchKeys.action(CefDelete.backspaceDelete, editor, false) },
|
40403
|
+
{ keyCode: VK.DELETE, action: MatchKeys.action(CefDelete.backspaceDelete, editor, true) },
|
40404
|
+
{ keyCode: VK.BACKSPACE, action: MatchKeys.action(InlineBoundaryDelete.backspaceDelete, editor, caret, false) },
|
40405
|
+
{ keyCode: VK.DELETE, action: MatchKeys.action(InlineBoundaryDelete.backspaceDelete, editor, caret, true) },
|
40406
|
+
{ keyCode: VK.BACKSPACE, action: MatchKeys.action(BlockRangeDelete.backspaceDelete, editor, false) },
|
40407
|
+
{ keyCode: VK.DELETE, action: MatchKeys.action(BlockRangeDelete.backspaceDelete, editor, true) },
|
40408
|
+
{ keyCode: VK.BACKSPACE, action: MatchKeys.action(BlockBoundaryDelete.backspaceDelete, editor, false) },
|
40409
|
+
{ keyCode: VK.DELETE, action: MatchKeys.action(BlockBoundaryDelete.backspaceDelete, editor, true) }
|
40410
|
+
], evt);
|
40411
|
+
|
40412
|
+
Arr.find(matches, function (pattern) {
|
40413
|
+
return pattern.action();
|
40414
|
+
}).each(function (_) {
|
40415
|
+
evt.preventDefault();
|
40294
40416
|
});
|
40295
40417
|
};
|
40296
40418
|
|
40297
|
-
var
|
40298
|
-
|
40299
|
-
|
40300
|
-
|
40301
|
-
|
40302
|
-
], evt);
|
40419
|
+
var executeKeyupOverride = function (editor, evt) {
|
40420
|
+
var matches = MatchKeys.match([
|
40421
|
+
{ keyCode: VK.BACKSPACE, action: MatchKeys.action(CefDelete.paddEmptyElement, editor) },
|
40422
|
+
{ keyCode: VK.DELETE, action: MatchKeys.action(CefDelete.paddEmptyElement, editor) }
|
40423
|
+
], evt);
|
40303
40424
|
|
40304
|
-
|
40305
|
-
|
40306
|
-
});
|
40425
|
+
Arr.find(matches, function (pattern) {
|
40426
|
+
return pattern.action();
|
40307
40427
|
});
|
40308
40428
|
};
|
40309
40429
|
|
40310
40430
|
var setup = function (editor, caret) {
|
40311
|
-
|
40312
|
-
|
40431
|
+
editor.on('keydown', function (evt) {
|
40432
|
+
if (evt.isDefaultPrevented() === false) {
|
40433
|
+
executeKeydownOverride(editor, caret, evt);
|
40434
|
+
}
|
40435
|
+
});
|
40436
|
+
|
40437
|
+
editor.on('keyup', function (evt) {
|
40438
|
+
if (evt.isDefaultPrevented() === false) {
|
40439
|
+
executeKeyupOverride(editor, evt);
|
40440
|
+
}
|
40441
|
+
});
|
40313
40442
|
};
|
40314
40443
|
|
40315
40444
|
return {
|
@@ -41132,22 +41261,24 @@ define(
|
|
41132
41261
|
'tinymce.core.util.VK'
|
41133
41262
|
],
|
41134
41263
|
function (Arr, InsertSpace, MatchKeys, VK) {
|
41135
|
-
var
|
41136
|
-
|
41137
|
-
|
41138
|
-
|
41139
|
-
|
41140
|
-
|
41141
|
-
|
41142
|
-
|
41143
|
-
|
41144
|
-
evt.preventDefault();
|
41145
|
-
});
|
41264
|
+
var executeKeydownOverride = function (editor, evt) {
|
41265
|
+
var matches = MatchKeys.match([
|
41266
|
+
{ keyCode: VK.SPACEBAR, action: MatchKeys.action(InsertSpace.insertAtSelection, editor) }
|
41267
|
+
], evt);
|
41268
|
+
|
41269
|
+
Arr.find(matches, function (pattern) {
|
41270
|
+
return pattern.action();
|
41271
|
+
}).each(function (_) {
|
41272
|
+
evt.preventDefault();
|
41146
41273
|
});
|
41147
41274
|
};
|
41148
41275
|
|
41149
41276
|
var setup = function (editor) {
|
41150
|
-
|
41277
|
+
editor.on('keydown', function (evt) {
|
41278
|
+
if (evt.isDefaultPrevented() === false) {
|
41279
|
+
executeKeydownOverride(editor, evt);
|
41280
|
+
}
|
41281
|
+
});
|
41151
41282
|
};
|
41152
41283
|
|
41153
41284
|
return {
|
@@ -42142,14 +42273,6 @@ define(
|
|
42142
42273
|
return block1 === block2;
|
42143
42274
|
};
|
42144
42275
|
|
42145
|
-
var isContentKey = function (e) {
|
42146
|
-
if (e.keyCode >= 112 && e.keyCode <= 123) {
|
42147
|
-
return false;
|
42148
|
-
}
|
42149
|
-
|
42150
|
-
return true;
|
42151
|
-
};
|
42152
|
-
|
42153
42276
|
// Checks if the target node is in a block and if that block has a caret position better than the
|
42154
42277
|
// suggested caretNode this is to prevent the caret from being sucked in towards a cE=false block if
|
42155
42278
|
// they are adjacent on the vertical axis
|
@@ -42195,14 +42318,14 @@ define(
|
|
42195
42318
|
}
|
42196
42319
|
});
|
42197
42320
|
|
42198
|
-
editor.on('
|
42321
|
+
editor.on('keypress', function (e) {
|
42199
42322
|
if (VK.modifierPressed(e)) {
|
42200
42323
|
return;
|
42201
42324
|
}
|
42202
42325
|
|
42203
42326
|
switch (e.keyCode) {
|
42204
42327
|
default:
|
42205
|
-
if (isContentEditableFalse(editor.selection.getNode())
|
42328
|
+
if (isContentEditableFalse(editor.selection.getNode())) {
|
42206
42329
|
e.preventDefault();
|
42207
42330
|
}
|
42208
42331
|
break;
|
@@ -46715,7 +46838,7 @@ define(
|
|
46715
46838
|
* @property minorVersion
|
46716
46839
|
* @type String
|
46717
46840
|
*/
|
46718
|
-
minorVersion: '6.
|
46841
|
+
minorVersion: '6.3',
|
46719
46842
|
|
46720
46843
|
/**
|
46721
46844
|
* Release date of TinyMCE build.
|
@@ -46723,7 +46846,7 @@ define(
|
|
46723
46846
|
* @property releaseDate
|
46724
46847
|
* @type String
|
46725
46848
|
*/
|
46726
|
-
releaseDate: '2017-05-
|
46849
|
+
releaseDate: '2017-05-30',
|
46727
46850
|
|
46728
46851
|
/**
|
46729
46852
|
* Collection of editor instances.
|