Skip to content

Commit

Permalink
Update to TinyMCE 6.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Jun 20, 2024
1 parent 68d5f93 commit 61370b0
Show file tree
Hide file tree
Showing 35 changed files with 56 additions and 55 deletions.
39 changes: 20 additions & 19 deletions app/assets/source/tinymce/tinymce.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* TinyMCE version 6.8.3 (2024-02-08)
* TinyMCE version 6.8.4 (2024-06-19)
*/

(function () {
Expand Down Expand Up @@ -17129,7 +17129,7 @@
const makeMap = Tools.makeMap, extend$1 = Tools.extend;
const transferChildren = (parent, nativeParent, specialElements, nsSanitizer) => {
const parentName = parent.name;
const isSpecial = parentName in specialElements && parentName !== 'title' && parentName !== 'textarea';
const isSpecial = parentName in specialElements && parentName !== 'title' && parentName !== 'textarea' && parentName !== 'noscript';
const childNodes = nativeParent.childNodes;
for (let ni = 0, nl = childNodes.length; ni < nl; ni++) {
const nativeChild = childNodes[ni];
Expand Down Expand Up @@ -18833,16 +18833,6 @@
}
}
});
htmlParser.addNodeFilter('noscript', nodes => {
var _a;
let i = nodes.length;
while (i--) {
const node = nodes[i].firstChild;
if (node) {
node.value = Entities.decode((_a = node.value) !== null && _a !== void 0 ? _a : '');
}
}
});
htmlParser.addNodeFilter('script,style', (nodes, name) => {
var _a;
const trim = value => {
Expand Down Expand Up @@ -22600,6 +22590,12 @@
}
e.content = content;
};
const isValidContent = (nonEditableRegExps, content) => {
return forall(nonEditableRegExps, re => {
const matches = content.match(re);
return matches !== null && matches[0].length === content.length;
});
};
const setup$n = editor => {
const contentEditableAttrName = 'contenteditable';
const editClass = ' ' + Tools.trim(getEditableClass(editor)) + ' ';
Expand Down Expand Up @@ -22630,11 +22626,16 @@
if (!hasEditClass(node) && !hasNonEditClass(node)) {
continue;
}
if (nonEditableRegExps.length > 0 && node.attr('data-mce-content')) {
node.name = '#text';
node.type = 3;
node.raw = true;
node.value = node.attr('data-mce-content');
const content = node.attr('data-mce-content');
if (nonEditableRegExps.length > 0 && content) {
if (isValidContent(nonEditableRegExps, content)) {
node.name = '#text';
node.type = 3;
node.raw = true;
node.value = content;
} else {
node.remove();
}
} else {
node.attr(contentEditableAttrName, null);
}
Expand Down Expand Up @@ -31137,8 +31138,8 @@
documentBaseURL: null,
suffix: null,
majorVersion: '6',
minorVersion: '8.3',
releaseDate: '2024-02-08',
minorVersion: '8.4',
releaseDate: '2024-06-19',
i18n: I18n,
activeEditor: null,
focusedEditor: null,
Expand Down
4 changes: 2 additions & 2 deletions lib/tinymce/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module TinyMCE
module Rails
VERSION = "6.8.3"
TINYMCE_VERSION = "6.8.3"
VERSION = "6.8.4"
TINYMCE_VERSION = "6.8.4"
end
end
2 changes: 1 addition & 1 deletion vendor/assets/javascripts/tinymce/models/dom/model.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 61370b0

Please sign in to comment.