| Línea 1... |
Línea 1... |
| 1 |
/**
|
1 |
/**
|
| 2 |
* TinyMCE version 6.8.3 (2024-02-08)
|
2 |
* TinyMCE version 7.7.1 (2025-03-05)
|
| 3 |
*/
|
3 |
*/
|
| Línea 4... |
Línea 4... |
| 4 |
|
4 |
|
| 5 |
(function () {
|
5 |
(function () {
|
| Línea 17... |
Línea 17... |
| 17 |
get,
|
17 |
get,
|
| 18 |
set
|
18 |
set
|
| 19 |
};
|
19 |
};
|
| 20 |
};
|
20 |
};
|
| Línea 21... |
Línea 21... |
| 21 |
|
21 |
|
| Línea 22... |
Línea 22... |
| 22 |
var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
22 |
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
| Línea 23... |
Línea 23... |
| 23 |
|
23 |
|
| 24 |
const get$5 = fullscreenState => ({ isFullscreen: () => fullscreenState.get() !== null });
|
24 |
const get$5 = fullscreenState => ({ isFullscreen: () => fullscreenState.get() !== null });
|
| Línea 341... |
Línea 341... |
| 341 |
const type = element => element.dom.nodeType;
|
341 |
const type = element => element.dom.nodeType;
|
| 342 |
const isType = t => element => type(element) === t;
|
342 |
const isType = t => element => type(element) === t;
|
| 343 |
const isHTMLElement = element => isElement(element) && isPrototypeOf(element.dom);
|
343 |
const isHTMLElement = element => isElement(element) && isPrototypeOf(element.dom);
|
| 344 |
const isElement = isType(ELEMENT);
|
344 |
const isElement = isType(ELEMENT);
|
| 345 |
const isText = isType(TEXT);
|
345 |
const isText = isType(TEXT);
|
| 346 |
const isDocument = isType(DOCUMENT);
|
- |
|
| 347 |
const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
|
346 |
const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
|
| Línea 348... |
Línea 347... |
| 348 |
|
347 |
|
| 349 |
const rawSet = (dom, key, value) => {
|
348 |
const rawSet = (dom, key, value) => {
|
| 350 |
if (isString(value) || isBoolean(value) || isNumber(value)) {
|
349 |
if (isString(value) || isBoolean(value) || isNumber(value)) {
|
| Línea 376... |
Línea 375... |
| 376 |
} else {
|
375 |
} else {
|
| 377 |
return false;
|
376 |
return false;
|
| 378 |
}
|
377 |
}
|
| 379 |
};
|
378 |
};
|
| Línea 380... |
Línea 379... |
| 380 |
|
379 |
|
| Línea 381... |
Línea 380... |
| 381 |
const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
380 |
const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
| 382 |
|
381 |
|
| 383 |
const fromHtml = (html, scope) => {
|
382 |
const fromHtml = (html, scope) => {
|
| 384 |
const doc = scope || document;
|
383 |
const doc = scope || document;
|
| Línea 442... |
Línea 441... |
| 442 |
};
|
441 |
};
|
| Línea 443... |
Línea 442... |
| 443 |
|
442 |
|
| Línea 444... |
Línea 443... |
| 444 |
const eq = (e1, e2) => e1.dom === e2.dom;
|
443 |
const eq = (e1, e2) => e1.dom === e2.dom;
|
| 445 |
|
- |
|
| 446 |
const owner = element => SugarElement.fromDom(element.dom.ownerDocument);
|
444 |
|
| 447 |
const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);
|
445 |
const owner = element => SugarElement.fromDom(element.dom.ownerDocument);
|
| 448 |
const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
|
446 |
const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
|
| 449 |
const parents = (element, isRoot) => {
|
447 |
const parents = (element, isRoot) => {
|
| 450 |
const stop = isFunction(isRoot) ? isRoot : never;
|
448 |
const stop = isFunction(isRoot) ? isRoot : never;
|
| Línea 468... |
Línea 466... |
| 468 |
};
|
466 |
};
|
| 469 |
const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);
|
467 |
const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);
|
| 470 |
const children = element => map(element.dom.childNodes, SugarElement.fromDom);
|
468 |
const children = element => map(element.dom.childNodes, SugarElement.fromDom);
|
| Línea 471... |
Línea 469... |
| 471 |
|
469 |
|
| 472 |
const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
|
- |
|
| 473 |
const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
|
- |
|
| 474 |
const isSupported = constant(supported);
|
470 |
const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
|
| 475 |
const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;
|
471 |
const getRootNode = e => SugarElement.fromDom(e.dom.getRootNode());
|
| 476 |
const getShadowRoot = e => {
|
472 |
const getShadowRoot = e => {
|
| 477 |
const r = getRootNode(e);
|
473 |
const r = getRootNode(e);
|
| 478 |
return isShadowRoot(r) ? Optional.some(r) : Optional.none();
|
474 |
return isShadowRoot(r) ? Optional.some(r) : Optional.none();
|
| 479 |
};
|
475 |
};
|
| 480 |
const getShadowHost = e => SugarElement.fromDom(e.dom.host);
|
476 |
const getShadowHost = e => SugarElement.fromDom(e.dom.host);
|
| 481 |
const getOriginalEventTarget = event => {
|
477 |
const getOriginalEventTarget = event => {
|
| 482 |
if (isSupported() && isNonNullable(event.target)) {
|
478 |
if (isNonNullable(event.target)) {
|
| 483 |
const el = SugarElement.fromDom(event.target);
|
479 |
const el = SugarElement.fromDom(event.target);
|
| 484 |
if (isElement(el) && isOpenShadowHost(el)) {
|
480 |
if (isElement(el) && isOpenShadowHost(el)) {
|
| 485 |
if (event.composed && event.composedPath) {
|
481 |
if (event.composed && event.composedPath) {
|
| 486 |
const composedPath = event.composedPath();
|
482 |
const composedPath = event.composedPath();
|
| Línea 513... |
Línea 509... |
| 513 |
const internalSet = (dom, property, value) => {
|
509 |
const internalSet = (dom, property, value) => {
|
| 514 |
if (!isString(value)) {
|
510 |
if (!isString(value)) {
|
| 515 |
console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
|
511 |
console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
|
| 516 |
throw new Error('CSS value must be a string: ' + value);
|
512 |
throw new Error('CSS value must be a string: ' + value);
|
| 517 |
}
|
513 |
}
|
| 518 |
if (isSupported$1(dom)) {
|
514 |
if (isSupported(dom)) {
|
| 519 |
dom.style.setProperty(property, value);
|
515 |
dom.style.setProperty(property, value);
|
| 520 |
}
|
516 |
}
|
| 521 |
};
|
517 |
};
|
| 522 |
const set = (element, property, value) => {
|
518 |
const set = (element, property, value) => {
|
| 523 |
const dom = element.dom;
|
519 |
const dom = element.dom;
|
| Línea 533... |
Línea 529... |
| 533 |
const dom = element.dom;
|
529 |
const dom = element.dom;
|
| 534 |
const styles = window.getComputedStyle(dom);
|
530 |
const styles = window.getComputedStyle(dom);
|
| 535 |
const r = styles.getPropertyValue(property);
|
531 |
const r = styles.getPropertyValue(property);
|
| 536 |
return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
|
532 |
return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
|
| 537 |
};
|
533 |
};
|
| 538 |
const getUnsafeProperty = (dom, property) => isSupported$1(dom) ? dom.style.getPropertyValue(property) : '';
|
534 |
const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';
|
| Línea 539... |
Línea 535... |
| 539 |
|
535 |
|
| 540 |
const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({
|
536 |
const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({
|
| 541 |
target,
|
537 |
target,
|
| 542 |
x,
|
538 |
x,
|
| Línea 894... |
Línea 890... |
| 894 |
};
|
890 |
};
|
| 895 |
};
|
891 |
};
|
| 896 |
const PlatformDetection = { detect: detect$1 };
|
892 |
const PlatformDetection = { detect: detect$1 };
|
| Línea 897... |
Línea 893... |
| 897 |
|
893 |
|
| 898 |
const mediaMatch = query => window.matchMedia(query).matches;
|
894 |
const mediaMatch = query => window.matchMedia(query).matches;
|
| 899 |
let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch));
|
895 |
let platform = cached(() => PlatformDetection.detect(window.navigator.userAgent, Optional.from(window.navigator.userAgentData), mediaMatch));
|
| Línea 900... |
Línea 896... |
| 900 |
const detect = () => platform();
|
896 |
const detect = () => platform();
|
| 901 |
|
897 |
|
| 902 |
const r = (left, top) => {
|
898 |
const r = (left, top) => {
|
| Línea 947... |
Línea 943... |
| 947 |
const handler = e => callback(fromRawEvent(e));
|
943 |
const handler = e => callback(fromRawEvent(e));
|
| 948 |
visualViewport.addEventListener(name, handler);
|
944 |
visualViewport.addEventListener(name, handler);
|
| 949 |
return { unbind: () => visualViewport.removeEventListener(name, handler) };
|
945 |
return { unbind: () => visualViewport.removeEventListener(name, handler) };
|
| 950 |
}).getOrThunk(() => ({ unbind: noop }));
|
946 |
}).getOrThunk(() => ({ unbind: noop }));
|
| Línea 951... |
Línea 947... |
| 951 |
|
947 |
|
| Línea 952... |
Línea 948... |
| 952 |
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
948 |
var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
| Línea 953... |
Línea 949... |
| 953 |
|
949 |
|
| 954 |
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
950 |
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
| 955 |
|
951 |
|
| 956 |
const fireFullscreenStateChanged = (editor, state) => {
|
952 |
const fireFullscreenStateChanged = (editor, state) => {
|
| Línea 1026... |
Línea 1022... |
| 1026 |
const attr = 'data-ephox-mobile-fullscreen-style';
|
1022 |
const attr = 'data-ephox-mobile-fullscreen-style';
|
| 1027 |
const siblingStyles = 'display:none!important;';
|
1023 |
const siblingStyles = 'display:none!important;';
|
| 1028 |
const ancestorPosition = 'position:absolute!important;';
|
1024 |
const ancestorPosition = 'position:absolute!important;';
|
| 1029 |
const ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
|
1025 |
const ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
|
| 1030 |
const bgFallback = 'background-color:rgb(255,255,255)!important;';
|
1026 |
const bgFallback = 'background-color:rgb(255,255,255)!important;';
|
| 1031 |
const isAndroid = global.os.isAndroid();
|
1027 |
const isAndroid = global$1.os.isAndroid();
|
| 1032 |
const matchColor = editorBody => {
|
1028 |
const matchColor = editorBody => {
|
| 1033 |
const color = get$2(editorBody, 'background-color');
|
1029 |
const color = get$2(editorBody, 'background-color');
|
| 1034 |
return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;
|
1030 |
return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;
|
| 1035 |
};
|
1031 |
};
|
| 1036 |
const clobberStyles = (dom, container, editorBody) => {
|
1032 |
const clobberStyles = (dom, container, editorBody) => {
|
| Línea 1066... |
Línea 1062... |
| 1066 |
}
|
1062 |
}
|
| 1067 |
remove(element, attr);
|
1063 |
remove(element, attr);
|
| 1068 |
});
|
1064 |
});
|
| 1069 |
};
|
1065 |
};
|
| Línea 1070... |
Línea 1066... |
| 1070 |
|
1066 |
|
| 1071 |
const DOM = global$1.DOM;
|
1067 |
const DOM = global$2.DOM;
|
| 1072 |
const getScrollPos = () => getBounds(window);
|
1068 |
const getScrollPos = () => getBounds(window);
|
| 1073 |
const setScrollPos = pos => window.scrollTo(pos.x, pos.y);
|
1069 |
const setScrollPos = pos => window.scrollTo(pos.x, pos.y);
|
| 1074 |
const viewportUpdate = get().fold(() => ({
|
1070 |
const viewportUpdate = get().fold(() => ({
|
| 1075 |
bind: noop,
|
1071 |
bind: noop,
|
| Línea 1121... |
Línea 1117... |
| 1121 |
const editorContainerS = SugarElement.fromDom(editorContainer);
|
1117 |
const editorContainerS = SugarElement.fromDom(editorContainer);
|
| 1122 |
const sinkContainerS = nextSibling(editorContainerS).filter(elm => isHTMLElement(elm) && has(elm, 'tox-silver-sink'));
|
1118 |
const sinkContainerS = nextSibling(editorContainerS).filter(elm => isHTMLElement(elm) && has(elm, 'tox-silver-sink'));
|
| 1123 |
const fullscreenRoot = getFullscreenRoot(editor);
|
1119 |
const fullscreenRoot = getFullscreenRoot(editor);
|
| 1124 |
const fullscreenInfo = fullscreenState.get();
|
1120 |
const fullscreenInfo = fullscreenState.get();
|
| 1125 |
const editorBody = SugarElement.fromDom(editor.getBody());
|
1121 |
const editorBody = SugarElement.fromDom(editor.getBody());
|
| 1126 |
const isTouch = global.deviceType.isTouch();
|
1122 |
const isTouch = global$1.deviceType.isTouch();
|
| 1127 |
const editorContainerStyle = editorContainer.style;
|
1123 |
const editorContainerStyle = editorContainer.style;
|
| 1128 |
const iframe = editor.iframeElement;
|
1124 |
const iframe = editor.iframeElement;
|
| 1129 |
const iframeStyle = iframe === null || iframe === void 0 ? void 0 : iframe.style;
|
1125 |
const iframeStyle = iframe === null || iframe === void 0 ? void 0 : iframe.style;
|
| 1130 |
const handleClasses = handler => {
|
1126 |
const handleClasses = handler => {
|
| 1131 |
handler(body, 'tox-fullscreen');
|
1127 |
handler(body, 'tox-fullscreen');
|
| Línea 1205... |
Línea 1201... |
| 1205 |
editor.addCommand('mceFullScreen', () => {
|
1201 |
editor.addCommand('mceFullScreen', () => {
|
| 1206 |
toggleFullscreen(editor, fullscreenState);
|
1202 |
toggleFullscreen(editor, fullscreenState);
|
| 1207 |
});
|
1203 |
});
|
| 1208 |
};
|
1204 |
};
|
| Línea -... |
Línea 1205... |
| - |
|
1205 |
|
| - |
|
1206 |
var global = tinymce.util.Tools.resolve('tinymce.util.VK');
|
| - |
|
1207 |
|
| - |
|
1208 |
const setup = (editor, fullscreenState) => {
|
| - |
|
1209 |
editor.on('init', () => {
|
| - |
|
1210 |
editor.on('keydown', e => {
|
| - |
|
1211 |
if (e.keyCode === global.TAB && !(e.metaKey || e.ctrlKey) && fullscreenState.get()) {
|
| - |
|
1212 |
e.preventDefault();
|
| - |
|
1213 |
}
|
| - |
|
1214 |
});
|
| - |
|
1215 |
});
|
| - |
|
1216 |
};
|
| 1209 |
|
1217 |
|
| 1210 |
const makeSetupHandler = (editor, fullscreenState) => api => {
|
1218 |
const makeSetupHandler = (editor, fullscreenState) => api => {
|
| 1211 |
api.setActive(fullscreenState.get() !== null);
|
1219 |
api.setActive(fullscreenState.get() !== null);
|
| 1212 |
const editorEventCallback = e => api.setActive(e.state);
|
1220 |
const editorEventCallback = e => api.setActive(e.state);
|
| 1213 |
editor.on('FullscreenStateChanged', editorEventCallback);
|
1221 |
editor.on('FullscreenStateChanged', editorEventCallback);
|
| Línea 1218... |
Línea 1226... |
| 1218 |
editor.ui.registry.addToggleMenuItem('fullscreen', {
|
1226 |
editor.ui.registry.addToggleMenuItem('fullscreen', {
|
| 1219 |
text: 'Fullscreen',
|
1227 |
text: 'Fullscreen',
|
| 1220 |
icon: 'fullscreen',
|
1228 |
icon: 'fullscreen',
|
| 1221 |
shortcut: 'Meta+Shift+F',
|
1229 |
shortcut: 'Meta+Shift+F',
|
| 1222 |
onAction,
|
1230 |
onAction,
|
| 1223 |
onSetup: makeSetupHandler(editor, fullscreenState)
|
1231 |
onSetup: makeSetupHandler(editor, fullscreenState),
|
| - |
|
1232 |
context: 'any'
|
| 1224 |
});
|
1233 |
});
|
| 1225 |
editor.ui.registry.addToggleButton('fullscreen', {
|
1234 |
editor.ui.registry.addToggleButton('fullscreen', {
|
| 1226 |
tooltip: 'Fullscreen',
|
1235 |
tooltip: 'Fullscreen',
|
| 1227 |
icon: 'fullscreen',
|
1236 |
icon: 'fullscreen',
|
| 1228 |
onAction,
|
1237 |
onAction,
|
| 1229 |
onSetup: makeSetupHandler(editor, fullscreenState)
|
1238 |
onSetup: makeSetupHandler(editor, fullscreenState),
|
| - |
|
1239 |
shortcut: 'Meta+Shift+F',
|
| - |
|
1240 |
context: 'any'
|
| 1230 |
});
|
1241 |
});
|
| 1231 |
};
|
1242 |
};
|
| Línea 1232... |
Línea 1243... |
| 1232 |
|
1243 |
|
| 1233 |
var Plugin = () => {
|
1244 |
var Plugin = () => {
|
| 1234 |
global$2.add('fullscreen', editor => {
|
1245 |
global$3.add('fullscreen', editor => {
|
| 1235 |
const fullscreenState = Cell(null);
|
1246 |
const fullscreenState = Cell(null);
|
| 1236 |
if (editor.inline) {
|
1247 |
if (editor.inline) {
|
| 1237 |
return get$5(fullscreenState);
|
1248 |
return get$5(fullscreenState);
|
| 1238 |
}
|
1249 |
}
|
| 1239 |
register$2(editor);
|
1250 |
register$2(editor);
|
| 1240 |
register$1(editor, fullscreenState);
|
1251 |
register$1(editor, fullscreenState);
|
| - |
|
1252 |
register(editor, fullscreenState);
|
| 1241 |
register(editor, fullscreenState);
|
1253 |
setup(editor, fullscreenState);
|
| 1242 |
editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen');
|
1254 |
editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen');
|
| 1243 |
return get$5(fullscreenState);
|
1255 |
return get$5(fullscreenState);
|
| 1244 |
});
|
1256 |
});
|