tinymce-rails 8.10.1 → 8.10.2

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.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +268 -171
  3. data/lib/tinymce/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/tinymce/models/dom/model.js +1 -1
  5. data/vendor/assets/javascripts/tinymce/plugins/accordion/plugin.js +1 -1
  6. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
  7. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  8. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -1
  9. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.js +1 -1
  10. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
  11. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -1
  12. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  14. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.css +1 -1
  15. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  17. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.css +1 -1
  18. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
  19. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  20. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/tinymce.d.ts +1 -0
  22. data/vendor/assets/javascripts/tinymce/tinymce.js +3 -3
  23. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aa0b46f0c60b3f5299265cf18434083cc20c90edca680e7aea3d4a51a7eb845
4
- data.tar.gz: eea41881902fe912d5802a770b797817b44f6ec21d196ce40c72dc4a2862ddf0
3
+ metadata.gz: 584a0ad12fb74b2c3c5195fa9a4405559f7e9ddccbd0872fca16f06086724a1a
4
+ data.tar.gz: 7803c930e10faf6983291e39f54f2c5e07991490eee3504d4e275588819718b5
5
5
  SHA512:
6
- metadata.gz: 51ef53c4b01237071b3e711594fe9ed2e3762f8fd0eec78166ad33a2473aae1a197f09ff2c30866b1e354723fc097b52768a04245d828854f43827d364749e3c
7
- data.tar.gz: 07df40aa209cf71d6e976945167463bc56219b5c8ea6265c9800b5b631f5553a42a0f1ae67f7131c99bedb4ea60e338792018e815c8ca16e3074b96ebd32a8e4
6
+ metadata.gz: cbe593de3e8cf4d719af9bf5f13e17d11b1604de6cd5b017a5bdd83ae9589fdb00e560b4afd29aa9676913e4ca26dbb68783b6f332cf80d3725a0dba96f21560
7
+ data.tar.gz: 8464f75b94828958b9424aaad775efeaaaee7cf8f4543178fb80c32de3fb455619c067e6e2f3939dd7f58b71272bcc116c321409877ea811e566e3a7581e09e1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.10.1 (2026-10-28)
2
+ * TinyMCE version 8.10.2 (2026-11-11)
3
3
  */
4
4
 
5
5
  (function () {
@@ -12067,6 +12067,23 @@
12067
12067
  const isSelectionOverWholeHTMLElement = (range) => isSelectionOverWholeNode(range, isHTMLElement);
12068
12068
  const isSelectionOverWholeTextNode = (range) => isSelectionOverWholeNode(range, isText$b);
12069
12069
  const isSelectionOverWholeAnchor = (range) => isSelectionOverWholeNode(range, isAnchor);
12070
+ const isRngStartAtStartOfElement = (rng, elm) => prevPosition(elm, CaretPosition.fromRangeStart(rng)).isNone();
12071
+ const isRngEndAtEndOfElement = (rng, elm) => {
12072
+ return nextPosition(elm, CaretPosition.fromRangeEnd(rng))
12073
+ .exists((pos) => !isBr$7(pos.getNode()) || nextPosition(elm, pos).isSome()) === false;
12074
+ };
12075
+ const getFullySelectedBlocksFromRange = (rng, blocks) => {
12076
+ if (blocks.length === 1) {
12077
+ return isRngStartAtStartOfElement(rng, blocks[0]) && isRngEndAtEndOfElement(rng, blocks[0]) ? blocks : [];
12078
+ }
12079
+ else {
12080
+ const first = head(blocks).filter((elm) => isRngStartAtStartOfElement(rng, elm)).toArray();
12081
+ const last = last$2(blocks).filter((elm) => isRngEndAtEndOfElement(rng, elm)).toArray();
12082
+ const middle = blocks.slice(1, -1);
12083
+ return first.concat(middle).concat(last);
12084
+ }
12085
+ };
12086
+ const getFullySelectedBlocks$1 = (selection) => selection.isCollapsed() ? [] : getFullySelectedBlocksFromRange(selection.getRng(), selection.getSelectedBlocks());
12070
12087
 
12071
12088
  const isNode = (node) => isNumber(node?.nodeType);
12072
12089
  const isElementNode$1 = (node) => isElement$7(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$1(node);
@@ -13836,7 +13853,8 @@
13836
13853
  startScrollHeight = rootElement.scrollHeight;
13837
13854
  resizeBackdrop = dom.add(rootElement, 'div', {
13838
13855
  'class': 'mce-resize-backdrop',
13839
- 'data-mce-bogus': 'all'
13856
+ 'data-mce-bogus': 'all',
13857
+ 'aria-hidden': 'true'
13840
13858
  });
13841
13859
  dom.setStyles(resizeBackdrop, {
13842
13860
  position: 'fixed',
@@ -13848,6 +13866,7 @@
13848
13866
  selectedElmGhost = createGhostElement(dom, selectedElm);
13849
13867
  dom.addClass(selectedElmGhost, 'mce-clonedresizable');
13850
13868
  dom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all');
13869
+ dom.setAttrib(selectedElmGhost, 'aria-hidden', 'true');
13851
13870
  selectedElmGhost.contentEditable = 'false'; // Hides IE move layer cursor
13852
13871
  dom.setStyles(selectedElmGhost, {
13853
13872
  left: selectedElmX,
@@ -13866,7 +13885,8 @@
13866
13885
  }
13867
13886
  resizeHelper = dom.add(rootElement, 'div', {
13868
13887
  'class': 'mce-resize-helper',
13869
- 'data-mce-bogus': 'all'
13888
+ 'data-mce-bogus': 'all',
13889
+ 'aria-hidden': 'true'
13870
13890
  }, startW + ' × ' + startH);
13871
13891
  };
13872
13892
  // Get existing or render resize handle
@@ -13879,6 +13899,7 @@
13879
13899
  'data-mce-bogus': 'all',
13880
13900
  'class': 'mce-resizehandle',
13881
13901
  'unselectable': true,
13902
+ 'aria-hidden': 'true',
13882
13903
  'style': 'cursor:' + name + '-resize; margin:0; padding:0'
13883
13904
  });
13884
13905
  dom.bind(handleElm, 'mousedown', (e) => {
@@ -17227,67 +17248,6 @@
17227
17248
 
17228
17249
  const isApplyFormat = (format) => !isArray$1(format.attributes) && !isArray$1(format.styles);
17229
17250
 
17230
- const listItemStyles = ['fontWeight', 'fontStyle', 'color', 'fontSize', 'fontFamily'];
17231
- const hasListStyles = (fmt) => isObject(fmt.styles) && exists(keys(fmt.styles), (name) => contains$2(listItemStyles, name));
17232
- const findExpandedListItemFormat = (formats) => find$2(formats, (fmt) => isInlineFormat(fmt) && fmt.inline === 'span' && hasListStyles(fmt));
17233
- const getExpandedListItemFormat = (formatter, format) => {
17234
- const formatList = formatter.get(format);
17235
- return isArray$1(formatList) ? findExpandedListItemFormat(formatList) : Optional.none();
17236
- };
17237
- const isRngStartAtStartOfElement = (rng, elm) => prevPosition(elm, CaretPosition.fromRangeStart(rng)).isNone();
17238
- const isRngEndAtEndOfElement = (rng, elm) => {
17239
- return nextPosition(elm, CaretPosition.fromRangeEnd(rng))
17240
- .exists((pos) => !isBr$7(pos.getNode()) || nextPosition(elm, pos).isSome()) === false;
17241
- };
17242
- const isEditableListItem = (dom) => (elm) => isListItem$3(elm) && dom.isEditable(elm);
17243
- // TINY-13197: If the content is wrapped inside a block element, the first block returned by getSelectedBlocks() is not LI, even when the content is fully selected.
17244
- // However, the second and subsequent do return LI as the selected block so only the first block needs to be adjusted
17245
- const getAndOnlyNormalizeFirstBlockIf = (selection, pred) => map$3(selection.getSelectedBlocks(), (block, i) => {
17246
- if (i === 0 && pred(block)) {
17247
- return selection.dom.getParent(block, isListItem$3) ?? block;
17248
- }
17249
- else {
17250
- return block;
17251
- }
17252
- });
17253
- // Resolve list items from the
17254
- // selected cells directly instead, matching how SelectionUtils.runOnRanges resolves fake selections.
17255
- const getCellSelectionListItems = (editor) => {
17256
- const fakeSelectionNodes = getCellsFromEditor(editor);
17257
- if (fakeSelectionNodes.length > 0) {
17258
- const listItems = bind$3(fakeSelectionNodes, (cell) => descendants(cell, 'li'));
17259
- return Optional.some(map$3(listItems, (item) => item.dom));
17260
- }
17261
- else {
17262
- return Optional.none();
17263
- }
17264
- };
17265
- const getFullySelectedBlocks = (selection) => {
17266
- if (selection.isCollapsed()) {
17267
- return [];
17268
- }
17269
- const rng = selection.getRng();
17270
- const blocks = getAndOnlyNormalizeFirstBlockIf(selection, (el) => isRngStartAtStartOfElement(rng, el) && !isListItem$3(el));
17271
- if (blocks.length === 1) {
17272
- return isRngStartAtStartOfElement(rng, blocks[0]) && isRngEndAtEndOfElement(rng, blocks[0]) ? blocks : [];
17273
- }
17274
- else {
17275
- const first = head(blocks).filter((elm) => isRngStartAtStartOfElement(rng, elm)).toArray();
17276
- const last = last$2(blocks).filter((elm) => isRngEndAtEndOfElement(rng, elm)).toArray();
17277
- const middle = blocks.slice(1, -1);
17278
- return first.concat(middle).concat(last);
17279
- }
17280
- };
17281
- const getFullySelectedListItems = (editor) => {
17282
- const items = getCellSelectionListItems(editor).getOrThunk(() => getFullySelectedBlocks(editor.selection));
17283
- return filter$5(items, isEditableListItem(editor.selection.dom));
17284
- };
17285
- const getPartiallySelectedListItems = (editor) => {
17286
- const items = getCellSelectionListItems(editor)
17287
- .getOrThunk(() => getAndOnlyNormalizeFirstBlockIf(editor.selection, (el) => !isListItem$3(el)));
17288
- return filter$5(items, isEditableListItem(editor.selection.dom));
17289
- };
17290
-
17291
17251
  const each$8 = Tools.each;
17292
17252
  const isElementNode = (node) => isElement$7(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$1(node);
17293
17253
  const findElementSibling = (node, siblingName) => {
@@ -17375,6 +17335,54 @@
17375
17335
  unwrapEmptySpan(dom, node);
17376
17336
  };
17377
17337
 
17338
+ const listItemStyles = ['fontWeight', 'fontStyle', 'color', 'fontSize', 'fontFamily'];
17339
+ const hasListStyles = (fmt) => isObject(fmt.styles) && exists(keys(fmt.styles), (name) => contains$2(listItemStyles, name));
17340
+ const findExpandedListItemFormat = (formats) => find$2(formats, (fmt) => isInlineFormat(fmt) && fmt.inline === 'span' && hasListStyles(fmt));
17341
+ const getExpandedListItemFormat = (formatter, format) => {
17342
+ const formatList = formatter.get(format);
17343
+ return isArray$1(formatList) ? findExpandedListItemFormat(formatList) : Optional.none();
17344
+ };
17345
+ const isEditableListItem = (dom) => (elm) => isListItem$3(elm) && dom.isEditable(elm);
17346
+ // TINY-13197: If the content is wrapped inside a block element, the first block returned by getSelectedBlocks() is not LI, even when the content is fully selected.
17347
+ // However, the second and subsequent do return LI as the selected block so only the first block needs to be adjusted
17348
+ const getAndOnlyNormalizeFirstBlockIf = (selection, pred) => map$3(selection.getSelectedBlocks(), (block, i) => {
17349
+ if (i === 0 && pred(block)) {
17350
+ return selection.dom.getParent(block, isListItem$3) ?? block;
17351
+ }
17352
+ else {
17353
+ return block;
17354
+ }
17355
+ });
17356
+ // Resolve list items from the
17357
+ // selected cells directly instead, matching how SelectionUtils.runOnRanges resolves fake selections.
17358
+ const getCellSelectionListItems = (editor) => {
17359
+ const fakeSelectionNodes = getCellsFromEditor(editor);
17360
+ if (fakeSelectionNodes.length > 0) {
17361
+ const listItems = bind$3(fakeSelectionNodes, (cell) => descendants(cell, 'li'));
17362
+ return Optional.some(map$3(listItems, (item) => item.dom));
17363
+ }
17364
+ else {
17365
+ return Optional.none();
17366
+ }
17367
+ };
17368
+ const getFullySelectedBlocks = (selection) => {
17369
+ if (selection.isCollapsed()) {
17370
+ return [];
17371
+ }
17372
+ const rng = selection.getRng();
17373
+ const blocks = getAndOnlyNormalizeFirstBlockIf(selection, (el) => isRngStartAtStartOfElement(rng, el) && !isListItem$3(el));
17374
+ return getFullySelectedBlocksFromRange(rng, blocks);
17375
+ };
17376
+ const getFullySelectedListItems = (editor) => {
17377
+ const items = getCellSelectionListItems(editor).getOrThunk(() => getFullySelectedBlocks(editor.selection));
17378
+ return filter$5(items, isEditableListItem(editor.selection.dom));
17379
+ };
17380
+ const getPartiallySelectedListItems = (editor) => {
17381
+ const items = getCellSelectionListItems(editor)
17382
+ .getOrThunk(() => getAndOnlyNormalizeFirstBlockIf(editor.selection, (el) => !isListItem$3(el)));
17383
+ return filter$5(items, isEditableListItem(editor.selection.dom));
17384
+ };
17385
+
17378
17386
  const removeResult = Adt.generate([
17379
17387
  { keep: [] },
17380
17388
  { rename: ['name'] },
@@ -17894,12 +17902,91 @@
17894
17902
  }, always);
17895
17903
  };
17896
17904
 
17897
- const fontSizeAlteringFormats = ['fontsize', 'subscript', 'superscript'];
17898
- const formatsToActOn = ['strikethrough', ...fontSizeAlteringFormats];
17905
+ const each$6 = Tools.each;
17906
+ const mergeTextDecorationsAndColor = (dom, format, vars, node) => {
17907
+ const processTextDecorationsAndColor = (n) => {
17908
+ if (isHTMLElement(n) && isElement$7(n.parentNode) && dom.isEditable(n)) {
17909
+ const parentTextDecoration = getTextDecoration(dom, n.parentNode);
17910
+ if (dom.getStyle(n, 'color') && parentTextDecoration) {
17911
+ dom.setStyle(n, 'text-decoration', parentTextDecoration);
17912
+ }
17913
+ else if (dom.getStyle(n, 'text-decoration') === parentTextDecoration) {
17914
+ dom.setStyle(n, 'text-decoration', null);
17915
+ }
17916
+ }
17917
+ };
17918
+ // Colored nodes should be underlined so that the color of the underline matches the text color.
17919
+ if (format.styles && (format.styles.color || format.styles.textDecoration)) {
17920
+ Tools.walk(node, processTextDecorationsAndColor, 'childNodes');
17921
+ processTextDecorationsAndColor(node);
17922
+ }
17923
+ };
17924
+ const mergeBackgroundColorAndFontSize = (dom, format, vars, node) => {
17925
+ // nodes with font-size should have their own background color as well to fit the line-height (see TINY-882)
17926
+ if (format.styles && format.styles.backgroundColor) {
17927
+ const hasFontSize = hasStyle(dom, 'fontSize');
17928
+ processChildElements(node, (elm) => hasFontSize(elm) && dom.isEditable(elm), applyStyle(dom, 'backgroundColor', replaceVars(format.styles.backgroundColor, vars)));
17929
+ }
17930
+ };
17931
+ const mergeSubSup = (dom, format, vars, node) => {
17932
+ // Remove font size on all descendants of a sub/sup and remove the inverse elements
17933
+ if (isInlineFormat(format) && (format.inline === 'sub' || format.inline === 'sup')) {
17934
+ const hasFontSize = hasStyle(dom, 'fontSize');
17935
+ processChildElements(node, (elm) => hasFontSize(elm) && dom.isEditable(elm), applyStyle(dom, 'fontSize', ''));
17936
+ const inverseTagDescendants = filter$5(dom.select(format.inline === 'sup' ? 'sub' : 'sup', node), dom.isEditable);
17937
+ dom.remove(inverseTagDescendants, true);
17938
+ }
17939
+ };
17940
+ const mergeWithChildren = (editor, formatList, vars, node) => {
17941
+ // Remove/merge children
17942
+ // Note: RemoveFormat.removeFormat will not remove formatting from noneditable nodes
17943
+ each$6(formatList, (format) => {
17944
+ // Merge all children of similar type will move styles from child to parent
17945
+ // this: <span style="color:red"><b><span style="color:red; font-size:10px">text</span></b></span>
17946
+ // will become: <span style="color:red"><b><span style="font-size:10px">text</span></b></span>
17947
+ if (isInlineFormat(format)) {
17948
+ each$6(editor.dom.select(format.inline, node), (child) => {
17949
+ if (isElementNode(child)) {
17950
+ removeNodeFormat(editor, format, vars, child, format.exact ? child : null);
17951
+ }
17952
+ });
17953
+ }
17954
+ clearChildStyles(editor.dom, format, node);
17955
+ });
17956
+ };
17957
+ const mergeWithParents = (editor, format, name, vars, node) => {
17958
+ // Remove format if direct parent already has the same format
17959
+ // Note: RemoveFormat.removeFormat will not remove formatting from noneditable nodes
17960
+ const parentNode = node.parentNode;
17961
+ if (matchNode$1(editor, parentNode, name, vars)) {
17962
+ if (removeNodeFormat(editor, format, vars, node)) {
17963
+ return;
17964
+ }
17965
+ }
17966
+ // Remove format if any ancestor already has the same format
17967
+ if (format.merge_with_parents && parentNode) {
17968
+ editor.dom.getParent(parentNode, (parent) => {
17969
+ if (matchNode$1(editor, parent, name, vars)) {
17970
+ removeNodeFormat(editor, format, vars, node);
17971
+ return true;
17972
+ }
17973
+ else {
17974
+ return false;
17975
+ }
17976
+ });
17977
+ }
17978
+ };
17979
+
17980
+ const subSupFormats = ['subscript', 'superscript'];
17981
+ const fontSizeAlteringFormats = ['fontsize', ...subSupFormats];
17982
+ const rules = [
17983
+ { format: 'strikethrough', fontSizeAlteringFormats, keepsColoredDecorations: false },
17984
+ { format: 'underline', fontSizeAlteringFormats: subSupFormats, keepsColoredDecorations: true }
17985
+ ];
17899
17986
  const hasFormat = (formatter, el, format) => isNonNullable(formatter.matchNode(el.dom, format, {}, format === 'fontsize'));
17900
- const isFontSizeAlteringElement = (formatter, el) => exists(fontSizeAlteringFormats, (format) => hasFormat(formatter, el, format));
17901
- const isNormalizingFormat = (format) => contains$2(formatsToActOn, format);
17902
- const gatherWrapperData = (isRoot, scope, hasFormat, createFormatElement, removeFormatFromElement) => {
17987
+ const isFontSizeAlteringElement = (formatter, rule, el) => exists(rule.fontSizeAlteringFormats, (format) => hasFormat(formatter, el, format));
17988
+ const isTriggeredBy = (rule, appliedFormat) => rule.format === appliedFormat || contains$2(rule.fontSizeAlteringFormats, appliedFormat);
17989
+ const gatherWrapperData = (isRoot, scope, hasFormat, keepsDecoration, createFormatElement, removeFormatFromElement) => {
17903
17990
  const parents = parents$1(scope, isRoot).filter(isElement$8);
17904
17991
  return findLastIndex(parents, hasFormat).map((index) => {
17905
17992
  const container = parents[index];
@@ -17908,7 +17995,8 @@
17908
17995
  ...removeFormatFromElement(shallow(container)).toArray(),
17909
17996
  ...bind$3(parents.slice(0, index), (wrapper) => {
17910
17997
  if (hasFormat(wrapper)) {
17911
- return removeFormatFromElement(wrapper).toArray();
17998
+ // Stripping the live element would also strip the content that the split clones on either side of the scope
17999
+ return removeFormatFromElement(keepsDecoration(wrapper) ? shallow(wrapper) : wrapper).toArray();
17912
18000
  }
17913
18001
  else {
17914
18002
  return [shallow(wrapper)];
@@ -17918,9 +18006,9 @@
17918
18006
  return { container, innerWrapper, outerWrappers };
17919
18007
  });
17920
18008
  };
17921
- const wrapChildrenInInnerWrapper = (target, wrapper, hasFormat, removeFormatFromElement) => {
18009
+ const wrapChildrenInInnerWrapper = (target, wrapper, hasFormat, keepsDecoration, removeFormatFromElement) => {
17922
18010
  each$e(children$2(target), (child) => {
17923
- if (isElement$8(child) && hasFormat(child)) {
18011
+ if (isElement$8(child) && hasFormat(child) && !keepsDecoration(child)) {
17924
18012
  if (removeFormatFromElement(child).isNone()) {
17925
18013
  unwrap(child);
17926
18014
  }
@@ -17940,18 +18028,20 @@
17940
18028
  append$1(innerMost, target);
17941
18029
  }
17942
18030
  };
17943
- const normalizeFontSizeElementsInternal = (domUtils, fontSizeElements, hasFormat, createFormatElement, removeFormatFromElement) => {
18031
+ const normalizeFontSizeElementsInternal = (domUtils, fontSizeElements, hasFormat, keepsDecoration, createFormatElement, removeFormatFromElement) => {
17944
18032
  const isRoot = (el) => eq(SugarElement.fromDom(domUtils.getRoot()), el) || domUtils.isBlock(el.dom);
17945
18033
  each$e(fontSizeElements, (fontSizeElement) => {
17946
- gatherWrapperData(isRoot, fontSizeElement, hasFormat, createFormatElement, removeFormatFromElement).each(({ container, innerWrapper, outerWrappers }) => {
18034
+ gatherWrapperData(isRoot, fontSizeElement, hasFormat, keepsDecoration, createFormatElement, removeFormatFromElement).each(({ container, innerWrapper, outerWrappers }) => {
17947
18035
  domUtils.split(container.dom, fontSizeElement.dom);
17948
- wrapChildrenInInnerWrapper(fontSizeElement, innerWrapper, hasFormat, removeFormatFromElement);
18036
+ wrapChildrenInInnerWrapper(fontSizeElement, innerWrapper, hasFormat, keepsDecoration, removeFormatFromElement);
17949
18037
  wrapInOuterWrappers(fontSizeElement, outerWrappers);
17950
18038
  });
17951
18039
  });
17952
18040
  };
17953
- const normalizeFontSizeElementsWithFormat = (editor, formatName, fontSizeElements) => {
18041
+ const normalizeFontSizeElementsWithFormat = (editor, rule, fontSizeElements) => {
18042
+ const formatName = rule.format;
17954
18043
  const hasFormat = (el) => isNonNullable(matchNode$1(editor, el.dom, formatName));
18044
+ const keepsDecoration = (el) => rule.keepsColoredDecorations && getRaw$1(el, 'color').isSome();
17955
18045
  const createFormatElement = (el) => {
17956
18046
  const newEl = SugarElement.fromTag(name(el));
17957
18047
  const format = matchNode$1(editor, el.dom, formatName, {});
@@ -17969,23 +18059,42 @@
17969
18059
  return Optional.some(el);
17970
18060
  }
17971
18061
  };
18062
+ normalizeFontSizeElementsInternal(editor.dom, fontSizeElements, hasFormat, keepsDecoration, createFormatElement, removeFormatFromElement);
18063
+ };
18064
+ // The wrappers are split and replaced by clones before ApplyFormat merges the decorations of their colored descendants
18065
+ const mergeColoredDecorations = (editor, rule, wrappers) => each$e(wrappers, (wrapper) => {
18066
+ const format = matchNode$1(editor, wrapper.dom, rule.format, {});
18067
+ if (isNonNullable(format) && isApplyFormat(format) && descendant(wrapper, (el) => isFontSizeAlteringElement(editor.formatter, rule, el))) {
18068
+ mergeTextDecorationsAndColor(editor.dom, format, {}, wrapper.dom);
18069
+ }
18070
+ });
18071
+ const withBookmark = (editor, f) => {
17972
18072
  const bookmark = createBookmark(editor.selection.getRng());
17973
- normalizeFontSizeElementsInternal(editor.dom, fontSizeElements, hasFormat, createFormatElement, removeFormatFromElement);
18073
+ f();
17974
18074
  editor.selection.setRng(resolveBookmark(bookmark));
17975
18075
  };
17976
- const collectFontSizeElements = (formatter, wrappers) => bind$3(wrappers, (wrapper) => {
17977
- const fontSizeDescendants = descendants$1(wrapper, (el) => isFontSizeAlteringElement(formatter, el));
17978
- return isFontSizeAlteringElement(formatter, wrapper) ? [wrapper, ...fontSizeDescendants] : fontSizeDescendants;
18076
+ const collectFontSizeElements = (formatter, rule, wrappers) => bind$3(wrappers, (wrapper) => {
18077
+ const fontSizeDescendants = descendants$1(wrapper, (el) => isFontSizeAlteringElement(formatter, rule, el));
18078
+ return isFontSizeAlteringElement(formatter, rule, wrapper) ? [wrapper, ...fontSizeDescendants] : fontSizeDescendants;
17979
18079
  });
17980
18080
  const normalizeFontSizeElementsAfterApply = (editor, appliedFormat, wrappers) => {
17981
- if (isNormalizingFormat(appliedFormat)) {
17982
- const fontSizeElements = collectFontSizeElements(editor.formatter, wrappers);
17983
- normalizeFontSizeElementsWithFormat(editor, 'strikethrough', fontSizeElements);
18081
+ const collect = (rule) => collectFontSizeElements(editor.formatter, rule, wrappers);
18082
+ const rulesToRun = filter$5(rules, (rule) => isTriggeredBy(rule, appliedFormat) && collect(rule).length > 0);
18083
+ if (rulesToRun.length > 0) {
18084
+ withBookmark(editor, () => each$e(rulesToRun, (rule) => {
18085
+ if (rule.keepsColoredDecorations && rule.format === appliedFormat) {
18086
+ mergeColoredDecorations(editor, rule, wrappers);
18087
+ }
18088
+ normalizeFontSizeElementsWithFormat(editor, rule, collect(rule));
18089
+ }));
17984
18090
  }
17985
18091
  };
17986
18092
  const normalizeElements = (editor, elements) => {
17987
- const fontSizeElements = filter$5(elements, (el) => isFontSizeAlteringElement(editor.formatter, el));
17988
- normalizeFontSizeElementsWithFormat(editor, 'strikethrough', fontSizeElements);
18093
+ const collect = (rule) => filter$5(elements, (el) => isFontSizeAlteringElement(editor.formatter, rule, el));
18094
+ const rulesToRun = filter$5(rules, (rule) => collect(rule).length > 0);
18095
+ if (rulesToRun.length > 0) {
18096
+ withBookmark(editor, () => each$e(rulesToRun, (rule) => normalizeFontSizeElementsWithFormat(editor, rule, collect(rule))));
18097
+ }
17989
18098
  };
17990
18099
 
17991
18100
  const isHeading = (node) => ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(node.name);
@@ -21143,7 +21252,7 @@
21143
21252
  * This class handles parsing, modification and serialization of URI/URL strings.
21144
21253
  * @class tinymce.util.URI
21145
21254
  */
21146
- const each$6 = Tools.each, trim = Tools.trim;
21255
+ const each$5 = Tools.each, trim = Tools.trim;
21147
21256
  const queryParts = [
21148
21257
  'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host',
21149
21258
  'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'
@@ -21300,7 +21409,7 @@
21300
21409
  url = url.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something
21301
21410
  const urlMatch = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);
21302
21411
  if (urlMatch) {
21303
- each$6(queryParts, (v, i) => {
21412
+ each$5(queryParts, (v, i) => {
21304
21413
  let part = urlMatch[i];
21305
21414
  // Zope 3 workaround, they use @@something
21306
21415
  if (part) {
@@ -21480,7 +21589,7 @@
21480
21589
  const normalizedPath = path.split('/');
21481
21590
  // Remove empty chunks
21482
21591
  const baseParts = [];
21483
- each$6(normalizedBase, (k) => {
21592
+ each$5(normalizedBase, (k) => {
21484
21593
  if (k) {
21485
21594
  baseParts.push(k);
21486
21595
  }
@@ -23155,81 +23264,6 @@
23155
23264
  }
23156
23265
  });
23157
23266
 
23158
- const each$5 = Tools.each;
23159
- const mergeTextDecorationsAndColor = (dom, format, vars, node) => {
23160
- const processTextDecorationsAndColor = (n) => {
23161
- if (isHTMLElement(n) && isElement$7(n.parentNode) && dom.isEditable(n)) {
23162
- const parentTextDecoration = getTextDecoration(dom, n.parentNode);
23163
- if (dom.getStyle(n, 'color') && parentTextDecoration) {
23164
- dom.setStyle(n, 'text-decoration', parentTextDecoration);
23165
- }
23166
- else if (dom.getStyle(n, 'text-decoration') === parentTextDecoration) {
23167
- dom.setStyle(n, 'text-decoration', null);
23168
- }
23169
- }
23170
- };
23171
- // Colored nodes should be underlined so that the color of the underline matches the text color.
23172
- if (format.styles && (format.styles.color || format.styles.textDecoration)) {
23173
- Tools.walk(node, processTextDecorationsAndColor, 'childNodes');
23174
- processTextDecorationsAndColor(node);
23175
- }
23176
- };
23177
- const mergeBackgroundColorAndFontSize = (dom, format, vars, node) => {
23178
- // nodes with font-size should have their own background color as well to fit the line-height (see TINY-882)
23179
- if (format.styles && format.styles.backgroundColor) {
23180
- const hasFontSize = hasStyle(dom, 'fontSize');
23181
- processChildElements(node, (elm) => hasFontSize(elm) && dom.isEditable(elm), applyStyle(dom, 'backgroundColor', replaceVars(format.styles.backgroundColor, vars)));
23182
- }
23183
- };
23184
- const mergeSubSup = (dom, format, vars, node) => {
23185
- // Remove font size on all descendants of a sub/sup and remove the inverse elements
23186
- if (isInlineFormat(format) && (format.inline === 'sub' || format.inline === 'sup')) {
23187
- const hasFontSize = hasStyle(dom, 'fontSize');
23188
- processChildElements(node, (elm) => hasFontSize(elm) && dom.isEditable(elm), applyStyle(dom, 'fontSize', ''));
23189
- const inverseTagDescendants = filter$5(dom.select(format.inline === 'sup' ? 'sub' : 'sup', node), dom.isEditable);
23190
- dom.remove(inverseTagDescendants, true);
23191
- }
23192
- };
23193
- const mergeWithChildren = (editor, formatList, vars, node) => {
23194
- // Remove/merge children
23195
- // Note: RemoveFormat.removeFormat will not remove formatting from noneditable nodes
23196
- each$5(formatList, (format) => {
23197
- // Merge all children of similar type will move styles from child to parent
23198
- // this: <span style="color:red"><b><span style="color:red; font-size:10px">text</span></b></span>
23199
- // will become: <span style="color:red"><b><span style="font-size:10px">text</span></b></span>
23200
- if (isInlineFormat(format)) {
23201
- each$5(editor.dom.select(format.inline, node), (child) => {
23202
- if (isElementNode(child)) {
23203
- removeNodeFormat(editor, format, vars, child, format.exact ? child : null);
23204
- }
23205
- });
23206
- }
23207
- clearChildStyles(editor.dom, format, node);
23208
- });
23209
- };
23210
- const mergeWithParents = (editor, format, name, vars, node) => {
23211
- // Remove format if direct parent already has the same format
23212
- // Note: RemoveFormat.removeFormat will not remove formatting from noneditable nodes
23213
- const parentNode = node.parentNode;
23214
- if (matchNode$1(editor, parentNode, name, vars)) {
23215
- if (removeNodeFormat(editor, format, vars, node)) {
23216
- return;
23217
- }
23218
- }
23219
- // Remove format if any ancestor already has the same format
23220
- if (format.merge_with_parents && parentNode) {
23221
- editor.dom.getParent(parentNode, (parent) => {
23222
- if (matchNode$1(editor, parent, name, vars)) {
23223
- removeNodeFormat(editor, format, vars, node);
23224
- return true;
23225
- }
23226
- else {
23227
- return false;
23228
- }
23229
- });
23230
- }
23231
- };
23232
-
23233
23267
  const each$4 = Tools.each;
23234
23268
  const canFormatBR = (editor, format, node, parentName) => {
23235
23269
  // TINY-6483: Can format 'br' if it is contained in a valid empty block and an inline format is being applied
@@ -25000,6 +25034,17 @@
25000
25034
  */
25001
25035
  const getNode$1 = () => getNode(editor.getBody(), getRng$1());
25002
25036
  const getSelectedBlocks$1 = (startElm, endElm) => getSelectedBlocks(dom, getRng$1(), startElm, endElm);
25037
+ /**
25038
+ * Returns the blocks whose whole content is inside the current selection. Blocks that are only
25039
+ * partially selected are not included, and a collapsed selection returns an empty array.
25040
+ *
25041
+ * @method getFullySelectedBlocks
25042
+ * @return {Array} Array with the fully selected block elements.
25043
+ * @example
25044
+ * // Alerts the number of blocks that are entirely selected
25045
+ * alert(tinymce.activeEditor.selection.getFullySelectedBlocks().length);
25046
+ */
25047
+ const getFullySelectedBlocks = () => getFullySelectedBlocks$1(exports);
25003
25048
  const isForward = () => {
25004
25049
  const sel = getSel();
25005
25050
  const anchorNode = sel?.anchorNode;
@@ -25108,6 +25153,7 @@
25108
25153
  getStart: getStart$1,
25109
25154
  getEnd: getEnd$1,
25110
25155
  getSelectedBlocks: getSelectedBlocks$1,
25156
+ getFullySelectedBlocks,
25111
25157
  normalize,
25112
25158
  selectorChanged,
25113
25159
  selectorChangedWithUnbind,
@@ -26541,6 +26587,13 @@
26541
26587
  const isRoot = (elm) => eq(elm, SugarElement.fromDom(editor.getBody()));
26542
26588
  return closest$2(elm, 'details', isRoot);
26543
26589
  };
26590
+ const openEnclosingDetails = (editor, target) => {
26591
+ each$e(editor.dom.getParents(target.parentNode, 'details', editor.getBody()), (details) => {
26592
+ if (!details.querySelector(':scope > summary')?.contains(target)) {
26593
+ details.setAttribute('open', 'open');
26594
+ }
26595
+ });
26596
+ };
26544
26597
  const processDisabledEvents = (editor, e) => {
26545
26598
  /*
26546
26599
  If an event is a click event on or within an anchor, and the CMD/CTRL key is
@@ -26560,6 +26613,7 @@
26560
26613
  const id = removeLeading(href, '#');
26561
26614
  const targetEl = editor.dom.select(`[id="${id}"],[name="${id}"]`);
26562
26615
  if (targetEl.length) {
26616
+ openEnclosingDetails(editor, targetEl[0]);
26563
26617
  editor.selection.scrollIntoView(targetEl[0], true);
26564
26618
  }
26565
26619
  }
@@ -31018,13 +31072,47 @@
31018
31072
  const contentEditable = editor.dom.getContentEditable(block.dom);
31019
31073
  return contentEditable !== 'false' && intentValue > 0;
31020
31074
  });
31075
+ const getCellContentBlocks = (editor, cell) => filter$5(fromDom$1(from(cell.dom.childNodes)), (child) => editor.dom.isBlock(child.dom));
31021
31076
  const canOutdent = (editor) => {
31022
31077
  const blocks = getBlocksToIndent(editor);
31023
- return !editor.mode.isReadOnly() && (blocks.length > 1 || validateBlocks(editor, blocks));
31078
+ const indentedBlocks = bind$3(blocks, (block) => {
31079
+ if (!isTableCell$3(block.dom)) {
31080
+ return [block];
31081
+ }
31082
+ const inner = getCellContentBlocks(editor, block);
31083
+ return inner.length > 0 ? inner : [block];
31084
+ });
31085
+ return !editor.mode.isReadOnly() && (blocks.length > 1 || validateBlocks(editor, indentedBlocks));
31024
31086
  };
31025
31087
  const canIndent = (editor) => !editor.mode.isReadOnly() && canIndent$1(editor);
31026
31088
  const isListComponent = (el) => isList$1(el) || isListItem$2(el);
31027
31089
  const parentIsListComponent = (el) => parent(el).exists(isListComponent);
31090
+ const wrapCellInlineContent = (editor, cell) => {
31091
+ const { dom } = editor;
31092
+ const children = filter$5(from(cell.childNodes), (child) => !isEmptyTextNode$1(child));
31093
+ const blocks = [];
31094
+ let run = [];
31095
+ const flushRun = () => {
31096
+ if (run.length > 0 && !forall(run, isBookmarkNode$1)) {
31097
+ const wrapper = dom.create('p');
31098
+ cell.insertBefore(wrapper, run[0]);
31099
+ each$e(run, (n) => wrapper.appendChild(n));
31100
+ blocks.push(wrapper);
31101
+ }
31102
+ run = [];
31103
+ };
31104
+ each$e(children, (c) => {
31105
+ if (dom.isBlock(c)) {
31106
+ flushRun();
31107
+ blocks.push(c);
31108
+ }
31109
+ else {
31110
+ run.push(c);
31111
+ }
31112
+ });
31113
+ flushRun();
31114
+ return blocks;
31115
+ };
31028
31116
  const getBlocksToIndent = (editor) => {
31029
31117
  const selectedCells = getCellsFromEditor(editor);
31030
31118
  return selectedCells.length === 0 ?
@@ -31040,7 +31128,16 @@
31040
31128
  const indentValue = parseIndentValue(indentation);
31041
31129
  const useMargin = shouldIndentUseMargin(editor);
31042
31130
  each$e(getBlocksToIndent(editor), (block) => {
31043
- indentElement(dom, command, useMargin, indentValue, indentUnit, block.dom);
31131
+ if (isTableCell$3(block.dom)) {
31132
+ const bm = editor.selection.getBookmark();
31133
+ each$e(wrapCellInlineContent(editor, block.dom), (w) => {
31134
+ indentElement(dom, command, useMargin, indentValue, indentUnit, w);
31135
+ });
31136
+ editor.selection.moveToBookmark(bm);
31137
+ }
31138
+ else {
31139
+ indentElement(dom, command, useMargin, indentValue, indentUnit, block.dom);
31140
+ }
31044
31141
  });
31045
31142
  if (command === 'indent') {
31046
31143
  indentListSelection(editor);
@@ -33343,9 +33440,9 @@
33343
33440
  if (isNestedList(containerBlock)) {
33344
33441
  newBlockName = 'LI';
33345
33442
  }
33346
- const parentBlockStyles = isListItem(parentBlock) ? getStyles(parentBlock) : undefined;
33347
- let newBlock = isListItem(parentBlock) && parentBlockStyles
33348
- ? createNewBlock(newBlockName, { style: getStyles(parentBlock) })
33443
+ const parentBlockStyles = isListItem(parentBlock) && newBlockName === 'LI' ? getStyles(parentBlock) : '';
33444
+ let newBlock = isNotEmpty(parentBlockStyles)
33445
+ ? createNewBlock(newBlockName, { style: parentBlockStyles })
33349
33446
  : createNewBlock(newBlockName);
33350
33447
  if (isFirstOrLastLi(containerBlock, parentBlock, true) && isFirstOrLastLi(containerBlock, parentBlock, false)) {
33351
33448
  if (hasParent(containerBlock, 'LI')) {
@@ -33395,7 +33492,7 @@
33395
33492
  newBlock = fragment.firstChild;
33396
33493
  dom.insertAfter(fragment, containerBlock);
33397
33494
  each$e(previousChildren, (child) => prepend(SugarElement.fromDom(newBlock), child));
33398
- if (parentBlockStyles) {
33495
+ if (isNotEmpty(parentBlockStyles)) {
33399
33496
  newBlock.setAttribute('style', parentBlockStyles);
33400
33497
  }
33401
33498
  }
@@ -42157,14 +42254,14 @@
42157
42254
  * @property minorVersion
42158
42255
  * @type String
42159
42256
  */
42160
- minorVersion: '10.1',
42257
+ minorVersion: '10.2',
42161
42258
  /**
42162
42259
  * Release date of TinyMCE build.
42163
42260
  *
42164
42261
  * @property releaseDate
42165
42262
  * @type String
42166
42263
  */
42167
- releaseDate: '2026-10-28',
42264
+ releaseDate: '2026-11-11',
42168
42265
  /**
42169
42266
  * Collection of language pack data.
42170
42267
  *