mirror of
https://github.com/tabler/tabler.git
synced 2026-08-21 18:34:30 +04:00
Release 1.0.0-beta13
This commit is contained in:
+66
-72
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap v5.2.1 (https://getbootstrap.com/)
|
||||
* Bootstrap v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/index.js
|
||||
* Bootstrap (v5.2.2): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -326,7 +326,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/event-handler.js
|
||||
* Bootstrap (v5.2.2): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -595,7 +595,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/data.js
|
||||
* Bootstrap (v5.2.2): dom/data.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -647,7 +647,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/manipulator.js
|
||||
* Bootstrap (v5.2.2): dom/manipulator.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -717,7 +717,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/config.js
|
||||
* Bootstrap (v5.2.2): util/config.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -778,7 +778,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): base-component.js
|
||||
* Bootstrap (v5.2.2): base-component.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -786,7 +786,7 @@
|
||||
* Constants
|
||||
*/
|
||||
|
||||
const VERSION = '5.2.1';
|
||||
const VERSION = '5.2.2';
|
||||
/**
|
||||
* Class definition
|
||||
*/
|
||||
@@ -857,7 +857,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/component-functions.js
|
||||
* Bootstrap (v5.2.2): util/component-functions.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -883,7 +883,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): alert.js
|
||||
* Bootstrap (v5.2.2): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -963,7 +963,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): button.js
|
||||
* Bootstrap (v5.2.2): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1025,7 +1025,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/selector-engine.js
|
||||
* Bootstrap (v5.2.2): dom/selector-engine.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1096,7 +1096,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/swipe.js
|
||||
* Bootstrap (v5.2.2): util/swipe.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1232,7 +1232,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): carousel.js
|
||||
* Bootstrap (v5.2.2): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1680,7 +1680,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): collapse.js
|
||||
* Bootstrap (v5.2.2): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3816,7 +3816,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dropdown.js
|
||||
* Bootstrap (v5.2.2): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3888,7 +3888,7 @@
|
||||
this._parent = this._element.parentNode; // dropdown wrapper
|
||||
// todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
||||
|
||||
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];
|
||||
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
||||
this._inNavbar = this._detectNavbar();
|
||||
} // Getters
|
||||
|
||||
@@ -4206,7 +4206,7 @@
|
||||
|
||||
event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
||||
|
||||
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0];
|
||||
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
|
||||
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
||||
|
||||
if (isUpOrDownEvent) {
|
||||
@@ -4248,7 +4248,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/scrollBar.js
|
||||
* Bootstrap (v5.2.2): util/scrollBar.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4367,7 +4367,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/backdrop.js
|
||||
* Bootstrap (v5.2.2): util/backdrop.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4513,7 +4513,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/focustrap.js
|
||||
* Bootstrap (v5.2.2): util/focustrap.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4622,7 +4622,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): modal.js
|
||||
* Bootstrap (v5.2.2): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4834,9 +4834,9 @@
|
||||
}
|
||||
});
|
||||
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
|
||||
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
||||
EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
|
||||
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
||||
if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {
|
||||
if (this._element !== event.target || this._element !== event2.target) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4998,7 +4998,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): offcanvas.js
|
||||
* Bootstrap (v5.2.2): offcanvas.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5272,7 +5272,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/sanitizer.js
|
||||
* Bootstrap (v5.2.2): util/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5377,7 +5377,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/template-factory.js
|
||||
* Bootstrap (v5.2.2): util/template-factory.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5535,7 +5535,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): tooltip.js
|
||||
* Bootstrap (v5.2.2): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5633,6 +5633,10 @@
|
||||
this.tip = null;
|
||||
|
||||
this._setListeners();
|
||||
|
||||
if (!this._config.selector) {
|
||||
this._fixTitle();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -5661,24 +5665,12 @@
|
||||
this._isEnabled = !this._isEnabled;
|
||||
}
|
||||
|
||||
toggle(event) {
|
||||
toggle() {
|
||||
if (!this._isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event) {
|
||||
const context = this._initializeOnDelegatedTarget(event);
|
||||
|
||||
context._activeTrigger.click = !context._activeTrigger.click;
|
||||
|
||||
if (context._isWithActiveTrigger()) {
|
||||
context._enter();
|
||||
} else {
|
||||
context._leave();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
this._activeTrigger.click = !this._activeTrigger.click;
|
||||
|
||||
if (this._isShown()) {
|
||||
this._leave();
|
||||
@@ -5697,8 +5689,8 @@
|
||||
this.tip.remove();
|
||||
}
|
||||
|
||||
if (this._config.originalTitle) {
|
||||
this._element.setAttribute('title', this._config.originalTitle);
|
||||
if (this._element.getAttribute('data-bs-original-title')) {
|
||||
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
|
||||
}
|
||||
|
||||
this._disposePopper();
|
||||
@@ -5891,7 +5883,7 @@
|
||||
}
|
||||
|
||||
_getTitle() {
|
||||
return this._resolvePossibleFunction(this._config.title) || this._config.originalTitle;
|
||||
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
|
||||
} // Private
|
||||
|
||||
|
||||
@@ -5977,7 +5969,11 @@
|
||||
|
||||
for (const trigger of triggers) {
|
||||
if (trigger === 'click') {
|
||||
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => this.toggle(event));
|
||||
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
|
||||
const context = this._initializeOnDelegatedTarget(event);
|
||||
|
||||
context.toggle();
|
||||
});
|
||||
} else if (trigger !== TRIGGER_MANUAL) {
|
||||
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
|
||||
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
|
||||
@@ -6005,19 +6001,10 @@
|
||||
};
|
||||
|
||||
EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
||||
|
||||
if (this._config.selector) {
|
||||
this._config = { ...this._config,
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
};
|
||||
} else {
|
||||
this._fixTitle();
|
||||
}
|
||||
}
|
||||
|
||||
_fixTitle() {
|
||||
const title = this._config.originalTitle;
|
||||
const title = this._element.getAttribute('title');
|
||||
|
||||
if (!title) {
|
||||
return;
|
||||
@@ -6027,6 +6014,9 @@
|
||||
this._element.setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
|
||||
|
||||
|
||||
this._element.removeAttribute('title');
|
||||
}
|
||||
|
||||
@@ -6098,8 +6088,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
config.originalTitle = this._element.getAttribute('title') || '';
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
@@ -6118,11 +6106,13 @@
|
||||
if (this.constructor.Default[key] !== this._config[key]) {
|
||||
config[key] = this._config[key];
|
||||
}
|
||||
} // In the future can be replaced with:
|
||||
}
|
||||
|
||||
config.selector = false;
|
||||
config.trigger = 'manual'; // In the future can be replaced with:
|
||||
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
|
||||
// `Object.fromEntries(keysWithDifferentValues)`
|
||||
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -6161,7 +6151,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): popover.js
|
||||
* Bootstrap (v5.2.2): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -6244,7 +6234,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): scrollspy.js
|
||||
* Bootstrap (v5.2.2): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -6535,7 +6525,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): tab.js
|
||||
* Bootstrap (v5.2.2): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -6563,7 +6553,6 @@
|
||||
const CLASS_DROPDOWN = 'dropdown';
|
||||
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
|
||||
const SELECTOR_DROPDOWN_ITEM = '.dropdown-item';
|
||||
const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
|
||||
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
||||
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
||||
@@ -6642,7 +6631,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
element.removeAttribute('tabindex');
|
||||
element.setAttribute('aria-selected', true);
|
||||
|
||||
@@ -6698,6 +6686,9 @@
|
||||
const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);
|
||||
|
||||
if (nextActiveElement) {
|
||||
nextActiveElement.focus({
|
||||
preventScroll: true
|
||||
});
|
||||
Tab.getOrCreateInstance(nextActiveElement).show();
|
||||
}
|
||||
}
|
||||
@@ -6773,7 +6764,6 @@
|
||||
|
||||
toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
|
||||
toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
|
||||
toggle(SELECTOR_DROPDOWN_ITEM, CLASS_NAME_ACTIVE);
|
||||
outerElem.setAttribute('aria-expanded', open);
|
||||
}
|
||||
|
||||
@@ -6848,7 +6838,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): toast.js
|
||||
* Bootstrap (v5.2.2): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -6999,13 +6989,17 @@
|
||||
switch (event.type) {
|
||||
case 'mouseover':
|
||||
case 'mouseout':
|
||||
this._hasMouseInteraction = isInteracting;
|
||||
break;
|
||||
{
|
||||
this._hasMouseInteraction = isInteracting;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'focusin':
|
||||
case 'focusout':
|
||||
this._hasKeyboardInteraction = isInteracting;
|
||||
break;
|
||||
{
|
||||
this._hasKeyboardInteraction = isInteracting;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isInteracting) {
|
||||
@@ -7065,7 +7059,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): index.umd.js
|
||||
* Bootstrap (v5.2.2): index.umd.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+65
-71
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap v5.2.1 (https://getbootstrap.com/)
|
||||
* Bootstrap v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@@ -7,7 +7,7 @@ import * as Popper from '@popperjs/core';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/index.js
|
||||
* Bootstrap (v5.2.2): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -322,7 +322,7 @@ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/event-handler.js
|
||||
* Bootstrap (v5.2.2): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -591,7 +591,7 @@ function hydrateObj(obj, meta) {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/data.js
|
||||
* Bootstrap (v5.2.2): dom/data.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -643,7 +643,7 @@ const Data = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/manipulator.js
|
||||
* Bootstrap (v5.2.2): dom/manipulator.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -713,7 +713,7 @@ const Manipulator = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/config.js
|
||||
* Bootstrap (v5.2.2): util/config.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -774,7 +774,7 @@ class Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): base-component.js
|
||||
* Bootstrap (v5.2.2): base-component.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -782,7 +782,7 @@ class Config {
|
||||
* Constants
|
||||
*/
|
||||
|
||||
const VERSION = '5.2.1';
|
||||
const VERSION = '5.2.2';
|
||||
/**
|
||||
* Class definition
|
||||
*/
|
||||
@@ -853,7 +853,7 @@ class BaseComponent extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/component-functions.js
|
||||
* Bootstrap (v5.2.2): util/component-functions.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -879,7 +879,7 @@ const enableDismissTrigger = (component, method = 'hide') => {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): alert.js
|
||||
* Bootstrap (v5.2.2): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -959,7 +959,7 @@ defineJQueryPlugin(Alert);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): button.js
|
||||
* Bootstrap (v5.2.2): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1021,7 +1021,7 @@ defineJQueryPlugin(Button);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/selector-engine.js
|
||||
* Bootstrap (v5.2.2): dom/selector-engine.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1092,7 +1092,7 @@ const SelectorEngine = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/swipe.js
|
||||
* Bootstrap (v5.2.2): util/swipe.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1228,7 +1228,7 @@ class Swipe extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): carousel.js
|
||||
* Bootstrap (v5.2.2): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1676,7 +1676,7 @@ defineJQueryPlugin(Carousel);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): collapse.js
|
||||
* Bootstrap (v5.2.2): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1966,7 +1966,7 @@ defineJQueryPlugin(Collapse);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dropdown.js
|
||||
* Bootstrap (v5.2.2): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2038,7 +2038,7 @@ class Dropdown extends BaseComponent {
|
||||
this._parent = this._element.parentNode; // dropdown wrapper
|
||||
// todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
||||
|
||||
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];
|
||||
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
||||
this._inNavbar = this._detectNavbar();
|
||||
} // Getters
|
||||
|
||||
@@ -2356,7 +2356,7 @@ class Dropdown extends BaseComponent {
|
||||
|
||||
event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
||||
|
||||
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0];
|
||||
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
|
||||
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
||||
|
||||
if (isUpOrDownEvent) {
|
||||
@@ -2398,7 +2398,7 @@ defineJQueryPlugin(Dropdown);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/scrollBar.js
|
||||
* Bootstrap (v5.2.2): util/scrollBar.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2517,7 +2517,7 @@ class ScrollBarHelper {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/backdrop.js
|
||||
* Bootstrap (v5.2.2): util/backdrop.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2663,7 +2663,7 @@ class Backdrop extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/focustrap.js
|
||||
* Bootstrap (v5.2.2): util/focustrap.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2772,7 +2772,7 @@ class FocusTrap extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): modal.js
|
||||
* Bootstrap (v5.2.2): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2984,9 +2984,9 @@ class Modal extends BaseComponent {
|
||||
}
|
||||
});
|
||||
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
|
||||
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
||||
EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
|
||||
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
||||
if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {
|
||||
if (this._element !== event.target || this._element !== event2.target) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3148,7 +3148,7 @@ defineJQueryPlugin(Modal);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): offcanvas.js
|
||||
* Bootstrap (v5.2.2): offcanvas.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3422,7 +3422,7 @@ defineJQueryPlugin(Offcanvas);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/sanitizer.js
|
||||
* Bootstrap (v5.2.2): util/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3527,7 +3527,7 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/template-factory.js
|
||||
* Bootstrap (v5.2.2): util/template-factory.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3685,7 +3685,7 @@ class TemplateFactory extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): tooltip.js
|
||||
* Bootstrap (v5.2.2): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3783,6 +3783,10 @@ class Tooltip extends BaseComponent {
|
||||
this.tip = null;
|
||||
|
||||
this._setListeners();
|
||||
|
||||
if (!this._config.selector) {
|
||||
this._fixTitle();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -3811,24 +3815,12 @@ class Tooltip extends BaseComponent {
|
||||
this._isEnabled = !this._isEnabled;
|
||||
}
|
||||
|
||||
toggle(event) {
|
||||
toggle() {
|
||||
if (!this._isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event) {
|
||||
const context = this._initializeOnDelegatedTarget(event);
|
||||
|
||||
context._activeTrigger.click = !context._activeTrigger.click;
|
||||
|
||||
if (context._isWithActiveTrigger()) {
|
||||
context._enter();
|
||||
} else {
|
||||
context._leave();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
this._activeTrigger.click = !this._activeTrigger.click;
|
||||
|
||||
if (this._isShown()) {
|
||||
this._leave();
|
||||
@@ -3847,8 +3839,8 @@ class Tooltip extends BaseComponent {
|
||||
this.tip.remove();
|
||||
}
|
||||
|
||||
if (this._config.originalTitle) {
|
||||
this._element.setAttribute('title', this._config.originalTitle);
|
||||
if (this._element.getAttribute('data-bs-original-title')) {
|
||||
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
|
||||
}
|
||||
|
||||
this._disposePopper();
|
||||
@@ -4041,7 +4033,7 @@ class Tooltip extends BaseComponent {
|
||||
}
|
||||
|
||||
_getTitle() {
|
||||
return this._resolvePossibleFunction(this._config.title) || this._config.originalTitle;
|
||||
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
|
||||
} // Private
|
||||
|
||||
|
||||
@@ -4127,7 +4119,11 @@ class Tooltip extends BaseComponent {
|
||||
|
||||
for (const trigger of triggers) {
|
||||
if (trigger === 'click') {
|
||||
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => this.toggle(event));
|
||||
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
|
||||
const context = this._initializeOnDelegatedTarget(event);
|
||||
|
||||
context.toggle();
|
||||
});
|
||||
} else if (trigger !== TRIGGER_MANUAL) {
|
||||
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
|
||||
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
|
||||
@@ -4155,19 +4151,10 @@ class Tooltip extends BaseComponent {
|
||||
};
|
||||
|
||||
EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
||||
|
||||
if (this._config.selector) {
|
||||
this._config = { ...this._config,
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
};
|
||||
} else {
|
||||
this._fixTitle();
|
||||
}
|
||||
}
|
||||
|
||||
_fixTitle() {
|
||||
const title = this._config.originalTitle;
|
||||
const title = this._element.getAttribute('title');
|
||||
|
||||
if (!title) {
|
||||
return;
|
||||
@@ -4177,6 +4164,9 @@ class Tooltip extends BaseComponent {
|
||||
this._element.setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
|
||||
|
||||
|
||||
this._element.removeAttribute('title');
|
||||
}
|
||||
|
||||
@@ -4248,8 +4238,6 @@ class Tooltip extends BaseComponent {
|
||||
};
|
||||
}
|
||||
|
||||
config.originalTitle = this._element.getAttribute('title') || '';
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
@@ -4268,11 +4256,13 @@ class Tooltip extends BaseComponent {
|
||||
if (this.constructor.Default[key] !== this._config[key]) {
|
||||
config[key] = this._config[key];
|
||||
}
|
||||
} // In the future can be replaced with:
|
||||
}
|
||||
|
||||
config.selector = false;
|
||||
config.trigger = 'manual'; // In the future can be replaced with:
|
||||
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
|
||||
// `Object.fromEntries(keysWithDifferentValues)`
|
||||
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -4311,7 +4301,7 @@ defineJQueryPlugin(Tooltip);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): popover.js
|
||||
* Bootstrap (v5.2.2): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4394,7 +4384,7 @@ defineJQueryPlugin(Popover);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): scrollspy.js
|
||||
* Bootstrap (v5.2.2): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4685,7 +4675,7 @@ defineJQueryPlugin(ScrollSpy);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): tab.js
|
||||
* Bootstrap (v5.2.2): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4713,7 +4703,6 @@ const CLASS_NAME_SHOW$1 = 'show';
|
||||
const CLASS_DROPDOWN = 'dropdown';
|
||||
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
|
||||
const SELECTOR_DROPDOWN_ITEM = '.dropdown-item';
|
||||
const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
|
||||
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
||||
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
||||
@@ -4792,7 +4781,6 @@ class Tab extends BaseComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
element.removeAttribute('tabindex');
|
||||
element.setAttribute('aria-selected', true);
|
||||
|
||||
@@ -4848,6 +4836,9 @@ class Tab extends BaseComponent {
|
||||
const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);
|
||||
|
||||
if (nextActiveElement) {
|
||||
nextActiveElement.focus({
|
||||
preventScroll: true
|
||||
});
|
||||
Tab.getOrCreateInstance(nextActiveElement).show();
|
||||
}
|
||||
}
|
||||
@@ -4923,7 +4914,6 @@ class Tab extends BaseComponent {
|
||||
|
||||
toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
|
||||
toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
|
||||
toggle(SELECTOR_DROPDOWN_ITEM, CLASS_NAME_ACTIVE);
|
||||
outerElem.setAttribute('aria-expanded', open);
|
||||
}
|
||||
|
||||
@@ -4998,7 +4988,7 @@ defineJQueryPlugin(Tab);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): toast.js
|
||||
* Bootstrap (v5.2.2): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5149,13 +5139,17 @@ class Toast extends BaseComponent {
|
||||
switch (event.type) {
|
||||
case 'mouseover':
|
||||
case 'mouseout':
|
||||
this._hasMouseInteraction = isInteracting;
|
||||
break;
|
||||
{
|
||||
this._hasMouseInteraction = isInteracting;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'focusin':
|
||||
case 'focusout':
|
||||
this._hasKeyboardInteraction = isInteracting;
|
||||
break;
|
||||
{
|
||||
this._hasKeyboardInteraction = isInteracting;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isInteracting) {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+66
-72
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap v5.2.1 (https://getbootstrap.com/)
|
||||
* Bootstrap v5.2.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/index.js
|
||||
* Bootstrap (v5.2.2): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -346,7 +346,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/event-handler.js
|
||||
* Bootstrap (v5.2.2): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -615,7 +615,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/data.js
|
||||
* Bootstrap (v5.2.2): dom/data.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -667,7 +667,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/manipulator.js
|
||||
* Bootstrap (v5.2.2): dom/manipulator.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -737,7 +737,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/config.js
|
||||
* Bootstrap (v5.2.2): util/config.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -798,7 +798,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): base-component.js
|
||||
* Bootstrap (v5.2.2): base-component.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -806,7 +806,7 @@
|
||||
* Constants
|
||||
*/
|
||||
|
||||
const VERSION = '5.2.1';
|
||||
const VERSION = '5.2.2';
|
||||
/**
|
||||
* Class definition
|
||||
*/
|
||||
@@ -877,7 +877,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/component-functions.js
|
||||
* Bootstrap (v5.2.2): util/component-functions.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -903,7 +903,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): alert.js
|
||||
* Bootstrap (v5.2.2): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -983,7 +983,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): button.js
|
||||
* Bootstrap (v5.2.2): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1045,7 +1045,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dom/selector-engine.js
|
||||
* Bootstrap (v5.2.2): dom/selector-engine.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1116,7 +1116,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/swipe.js
|
||||
* Bootstrap (v5.2.2): util/swipe.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1252,7 +1252,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): carousel.js
|
||||
* Bootstrap (v5.2.2): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1700,7 +1700,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): collapse.js
|
||||
* Bootstrap (v5.2.2): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1990,7 +1990,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): dropdown.js
|
||||
* Bootstrap (v5.2.2): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2062,7 +2062,7 @@
|
||||
this._parent = this._element.parentNode; // dropdown wrapper
|
||||
// todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
||||
|
||||
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];
|
||||
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
||||
this._inNavbar = this._detectNavbar();
|
||||
} // Getters
|
||||
|
||||
@@ -2380,7 +2380,7 @@
|
||||
|
||||
event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
||||
|
||||
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0];
|
||||
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
|
||||
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
||||
|
||||
if (isUpOrDownEvent) {
|
||||
@@ -2422,7 +2422,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/scrollBar.js
|
||||
* Bootstrap (v5.2.2): util/scrollBar.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2541,7 +2541,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/backdrop.js
|
||||
* Bootstrap (v5.2.2): util/backdrop.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2687,7 +2687,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/focustrap.js
|
||||
* Bootstrap (v5.2.2): util/focustrap.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2796,7 +2796,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): modal.js
|
||||
* Bootstrap (v5.2.2): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3008,9 +3008,9 @@
|
||||
}
|
||||
});
|
||||
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
|
||||
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
||||
EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
|
||||
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
||||
if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {
|
||||
if (this._element !== event.target || this._element !== event2.target) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3172,7 +3172,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): offcanvas.js
|
||||
* Bootstrap (v5.2.2): offcanvas.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3446,7 +3446,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/sanitizer.js
|
||||
* Bootstrap (v5.2.2): util/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3551,7 +3551,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): util/template-factory.js
|
||||
* Bootstrap (v5.2.2): util/template-factory.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3709,7 +3709,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): tooltip.js
|
||||
* Bootstrap (v5.2.2): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3807,6 +3807,10 @@
|
||||
this.tip = null;
|
||||
|
||||
this._setListeners();
|
||||
|
||||
if (!this._config.selector) {
|
||||
this._fixTitle();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
@@ -3835,24 +3839,12 @@
|
||||
this._isEnabled = !this._isEnabled;
|
||||
}
|
||||
|
||||
toggle(event) {
|
||||
toggle() {
|
||||
if (!this._isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event) {
|
||||
const context = this._initializeOnDelegatedTarget(event);
|
||||
|
||||
context._activeTrigger.click = !context._activeTrigger.click;
|
||||
|
||||
if (context._isWithActiveTrigger()) {
|
||||
context._enter();
|
||||
} else {
|
||||
context._leave();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
this._activeTrigger.click = !this._activeTrigger.click;
|
||||
|
||||
if (this._isShown()) {
|
||||
this._leave();
|
||||
@@ -3871,8 +3863,8 @@
|
||||
this.tip.remove();
|
||||
}
|
||||
|
||||
if (this._config.originalTitle) {
|
||||
this._element.setAttribute('title', this._config.originalTitle);
|
||||
if (this._element.getAttribute('data-bs-original-title')) {
|
||||
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
|
||||
}
|
||||
|
||||
this._disposePopper();
|
||||
@@ -4065,7 +4057,7 @@
|
||||
}
|
||||
|
||||
_getTitle() {
|
||||
return this._resolvePossibleFunction(this._config.title) || this._config.originalTitle;
|
||||
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
|
||||
} // Private
|
||||
|
||||
|
||||
@@ -4151,7 +4143,11 @@
|
||||
|
||||
for (const trigger of triggers) {
|
||||
if (trigger === 'click') {
|
||||
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => this.toggle(event));
|
||||
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
|
||||
const context = this._initializeOnDelegatedTarget(event);
|
||||
|
||||
context.toggle();
|
||||
});
|
||||
} else if (trigger !== TRIGGER_MANUAL) {
|
||||
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
|
||||
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
|
||||
@@ -4179,19 +4175,10 @@
|
||||
};
|
||||
|
||||
EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
||||
|
||||
if (this._config.selector) {
|
||||
this._config = { ...this._config,
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
};
|
||||
} else {
|
||||
this._fixTitle();
|
||||
}
|
||||
}
|
||||
|
||||
_fixTitle() {
|
||||
const title = this._config.originalTitle;
|
||||
const title = this._element.getAttribute('title');
|
||||
|
||||
if (!title) {
|
||||
return;
|
||||
@@ -4201,6 +4188,9 @@
|
||||
this._element.setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
|
||||
|
||||
|
||||
this._element.removeAttribute('title');
|
||||
}
|
||||
|
||||
@@ -4272,8 +4262,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
config.originalTitle = this._element.getAttribute('title') || '';
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
@@ -4292,11 +4280,13 @@
|
||||
if (this.constructor.Default[key] !== this._config[key]) {
|
||||
config[key] = this._config[key];
|
||||
}
|
||||
} // In the future can be replaced with:
|
||||
}
|
||||
|
||||
config.selector = false;
|
||||
config.trigger = 'manual'; // In the future can be replaced with:
|
||||
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
|
||||
// `Object.fromEntries(keysWithDifferentValues)`
|
||||
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -4335,7 +4325,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): popover.js
|
||||
* Bootstrap (v5.2.2): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4418,7 +4408,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): scrollspy.js
|
||||
* Bootstrap (v5.2.2): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4709,7 +4699,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): tab.js
|
||||
* Bootstrap (v5.2.2): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4737,7 +4727,6 @@
|
||||
const CLASS_DROPDOWN = 'dropdown';
|
||||
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
|
||||
const SELECTOR_DROPDOWN_ITEM = '.dropdown-item';
|
||||
const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
|
||||
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
||||
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
||||
@@ -4816,7 +4805,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
element.removeAttribute('tabindex');
|
||||
element.setAttribute('aria-selected', true);
|
||||
|
||||
@@ -4872,6 +4860,9 @@
|
||||
const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);
|
||||
|
||||
if (nextActiveElement) {
|
||||
nextActiveElement.focus({
|
||||
preventScroll: true
|
||||
});
|
||||
Tab.getOrCreateInstance(nextActiveElement).show();
|
||||
}
|
||||
}
|
||||
@@ -4947,7 +4938,6 @@
|
||||
|
||||
toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
|
||||
toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
|
||||
toggle(SELECTOR_DROPDOWN_ITEM, CLASS_NAME_ACTIVE);
|
||||
outerElem.setAttribute('aria-expanded', open);
|
||||
}
|
||||
|
||||
@@ -5022,7 +5012,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): toast.js
|
||||
* Bootstrap (v5.2.2): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5173,13 +5163,17 @@
|
||||
switch (event.type) {
|
||||
case 'mouseover':
|
||||
case 'mouseout':
|
||||
this._hasMouseInteraction = isInteracting;
|
||||
break;
|
||||
{
|
||||
this._hasMouseInteraction = isInteracting;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'focusin':
|
||||
case 'focusout':
|
||||
this._hasKeyboardInteraction = isInteracting;
|
||||
break;
|
||||
{
|
||||
this._hasKeyboardInteraction = isInteracting;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isInteracting) {
|
||||
@@ -5239,7 +5233,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.1): index.umd.js
|
||||
* Bootstrap (v5.2.2): index.umd.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+45
@@ -6,6 +6,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 6.2.0 - 2022-09-08
|
||||
|
||||
### Added
|
||||
- New `text_patterns_lookup` option to provide additional text patterns dynamically. #TINY-8778
|
||||
- New promotion element has been added to the default UI. It can be disabled using the new `promotion` option. #TINY-8840
|
||||
- New `format_noneditable_selector` option to specify the `contenteditable="false"` elements that can be wrapped in a format. #TINY-8905
|
||||
- Added `allow` as a valid attribute for the `iframe` element in the editor schema. #TINY-8939
|
||||
- New `search` field in the `MenuButton` that shows a search field at the top of the menu, and refetches items when the search field updates. #TINY-8952
|
||||
|
||||
### Improved
|
||||
- The formatter can now apply a format to a `contenteditable="false"` element by wrapping it. Configurable using the `format_noneditable_selector` option. #TINY-8905
|
||||
- The autocompleter now supports a multiple character trigger using the new `trigger` configuration. #TINY-8887
|
||||
- The formatter now applies some inline formats, such as color and font size, to list item elements when the entire item content is selected. #TINY-8961
|
||||
- The installed and available plugin lists in the Help dialog are now sorted alphabetically. #TINY-9019
|
||||
- Alignment can now be applied to more types of embedded media elements. #TINY-8687
|
||||
|
||||
### Changed
|
||||
- The `@menubar-row-separator-color` oxide variable no longer affects the divider between the Menubar and Toolbar. It only controls the color of the separator lines drawn in multiline Menubars. #TINY-8632
|
||||
- The `@toolbar-separator-color` oxide variable now affects the color of the separator between the Menubar and Toolbar only. #TINY-8632
|
||||
- Available Premium plugins, which are listed by name in the Help dialog, are no longer translated. #TINY-9019
|
||||
|
||||
### Fixed
|
||||
- The Autolink plugin did not work when text nodes in the content were fragmented. #TINY-3723
|
||||
- Fixed multiple incorrect types on public APIs found while enabling TypeScript strict mode. #TINY-8806
|
||||
- The number of blank lines returned from `editor.getContent({format: 'text'})` differed between browsers. #TINY-8579
|
||||
- The editor focused via the `auto_focus` option was not scrolled into the viewport. #TINY-8785
|
||||
- Adding spaces immediately after a `contenteditable="false"` block did not work properly in some circumstances. #TINY-8814
|
||||
- Elements with only `data-*` custom attributes were sometimes removed when they should not be removed. #TINY-8755
|
||||
- Selecting a figure with `class="image"` incorrectly highlighted the link toolbar button. #TINY-8832
|
||||
- Specifying a single, non-default list style for the `advlist_bullet_styles` and `advlist_number_styles` options was not respected. #TINY-8721
|
||||
- Fixed multiple issues that occurred when formatting `contenteditable` elements. #TINY-8905
|
||||
- Spaces could be incorrectly added to `urlinput` dialog components (commonly but not exclusively presented in the *Insert/Edit Link* dialog) in certain cases. #TINY-8775
|
||||
- The text patterns logic threw an error when there were fragmented text nodes in a paragraph. #TINY-8779
|
||||
- Dragging a `contentEditable=false` element towards a document’s edge did not cause scrolling. #TINY-8874
|
||||
- Parsing large documents no longer throws a `Maximum call stack size exceeded` exception. #TINY-6945
|
||||
- DomParser filter matching was not checked between filters, which could lead to an exception in the parser. #TINY-8888
|
||||
- `contenteditable="false"` lists can no longer be toggled; and `contenteditable="true"` list elements within these lists can no longer be indented, split into another list element, or appended to the previous list element by deletion. #TINY-8920
|
||||
- Removed extra bottom padding in the context toolbar of the `tinymce-5` skin. #TINY-8980
|
||||
- Fixed a regression where pressing **Enter** added or deleted content outside the selection. #TINY-9101
|
||||
- Fixed a bug where pressing **Enter** deleted selected `contenteditable="false"` `<pre>` elements. #TINY-9101
|
||||
- The `editor.insertContent()` API did not respect the `no_events` argument. #TINY-9140
|
||||
|
||||
### Deprecated
|
||||
- The autocompleter configuration property, `ch`, has been deprecated. It will be removed in the next major release. Use the `trigger` property instead. #TINY-8887
|
||||
|
||||
## 6.1.2 - 2022-07-29
|
||||
|
||||
### Fixed
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tinymce/tinymce",
|
||||
"version": "6.1.2",
|
||||
"version": "6.2.0",
|
||||
"description": "Web based JavaScript HTML WYSIWYG editor control.",
|
||||
"license": [
|
||||
"MIT-only"
|
||||
|
||||
@@ -3,6 +3,7 @@ tinymce.IconManager.add('default', {
|
||||
'accessibility-check': '<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2Zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1Z" fill-rule="nonzero"/></svg>',
|
||||
'action-next': '<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3Z"/></svg>',
|
||||
'action-prev': '<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3Z"/></svg>',
|
||||
'addtag': '<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 5a2 2 0 0 1 1.6.8L21 12l-4.4 6.2a2 2 0 0 1-1.6.8h-3v-2h3l3.5-5L15 7H5v3H3V7c0-1.1.9-2 2-2h10Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 12a1 1 0 0 0-1 1v2H3a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2H7v-2c0-.6-.4-1-1-1Z"/></svg>',
|
||||
'align-center': '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',
|
||||
'align-justify': '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',
|
||||
'align-left': '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',
|
||||
@@ -56,6 +57,7 @@ tinymce.IconManager.add('default', {
|
||||
'fill': '<svg width="24" height="26"><path d="m16.6 12-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2ZM5.2 13 10 8.2l4.8 4.8H5.2ZM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5Z" fill-rule="nonzero"/></svg>',
|
||||
'flip-horizontally': '<svg width="24" height="24"><path d="M14 19h2v-2h-2v2Zm4-8h2V9h-2v2ZM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2Zm14-2v2h2a2 2 0 0 0-2-2Zm-7 16h2V3h-2v18Zm7-6h2v-2h-2v2Zm-4-8h2V5h-2v2Zm4 12a2 2 0 0 0 2-2h-2v2Z" fill-rule="nonzero"/></svg>',
|
||||
'flip-vertically': '<svg width="24" height="24"><path d="M5 14v2h2v-2H5Zm8 4v2h2v-2h-2Zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2Zm2 14h-2v2a2 2 0 0 0 2-2ZM3 11v2h18v-2H3Zm6 7v2h2v-2H9Zm8-4v2h2v-2h-2ZM5 18c0 1.1.9 2 2 2v-2H5Z" fill-rule="nonzero"/></svg>',
|
||||
'footnote': '<svg width="24" height="24"><path d="M19 13c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h14Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19 4v6h-1V5h-1.5V4h2.6Z"/><path d="M12 18c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h7ZM14 8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2h9Z"/></svg>',
|
||||
'format-painter': '<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3Z" fill-rule="nonzero"/></svg>',
|
||||
'format': '<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10Z"/></svg>',
|
||||
'fullscreen': '<svg width="24" height="24"><path d="m15.3 10-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3Zm0 4 3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2ZM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3ZM8.7 10 5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2Z" fill-rule="nonzero"/></svg>',
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+14
-10
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -35,6 +35,7 @@
|
||||
const isArray = isType$1('array');
|
||||
const isNull = eq$2(null);
|
||||
const isBoolean = isSimpleType('boolean');
|
||||
const isUndefined = eq$2(undefined);
|
||||
const isNullable = a => a === null || a === undefined;
|
||||
const isNonNullable = a => !isNullable(a);
|
||||
const isFunction = isSimpleType('function');
|
||||
@@ -349,11 +350,9 @@
|
||||
r[i] = x;
|
||||
};
|
||||
const internalFilter = (obj, pred, onTrue, onFalse) => {
|
||||
const r = {};
|
||||
each$1(obj, (x, i) => {
|
||||
(pred(x, i) ? onTrue : onFalse)(x, i);
|
||||
});
|
||||
return r;
|
||||
};
|
||||
const filter$1 = (obj, pred) => {
|
||||
const t = {};
|
||||
@@ -848,8 +847,13 @@
|
||||
const someIf = (b, a) => b ? Optional.some(a) : Optional.none();
|
||||
|
||||
const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
|
||||
const contains = (str, substr) => {
|
||||
return str.indexOf(substr) !== -1;
|
||||
const contains = (str, substr, start = 0, end) => {
|
||||
const idx = str.indexOf(substr, start);
|
||||
if (idx !== -1) {
|
||||
return isUndefined(end) ? true : idx + substr.length <= end;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const startsWith = (str, prefix) => {
|
||||
return checkRange(str, prefix, 0);
|
||||
@@ -4742,8 +4746,8 @@
|
||||
|
||||
const TableActions = (editor, resizeHandler, cellSelectionHandler) => {
|
||||
const isTableBody = editor => name(getBody(editor)) === 'table';
|
||||
const lastRowGuard = table => isTableBody(editor) === false || getGridSize(table).rows > 1;
|
||||
const lastColumnGuard = table => isTableBody(editor) === false || getGridSize(table).columns > 1;
|
||||
const lastRowGuard = table => !isTableBody(editor) || getGridSize(table).rows > 1;
|
||||
const lastColumnGuard = table => !isTableBody(editor) || getGridSize(table).columns > 1;
|
||||
const cloneFormats = getTableCloneElements(editor);
|
||||
const colMutationOp = isResizeTableColumnResizing(editor) ? noop : halve;
|
||||
const getTableSectionType = table => {
|
||||
@@ -5242,7 +5246,7 @@
|
||||
fireEvents(editor, table);
|
||||
selectFirstCellInTable(editor, table);
|
||||
return table.dom;
|
||||
}).getOr(null);
|
||||
}).getOrNull();
|
||||
};
|
||||
const insertTable = (editor, rows, columns, options = {}) => {
|
||||
const checkInput = val => isNumber(val) && val > 0;
|
||||
@@ -6939,7 +6943,7 @@
|
||||
const bind = (element, event, handler) => bind$1(element, event, filter, handler);
|
||||
const fromRawEvent = fromRawEvent$1;
|
||||
|
||||
const hasInternalTarget = e => has(SugarElement.fromDom(e.target), 'ephox-snooker-resizer-bar') === false;
|
||||
const hasInternalTarget = e => !has(SugarElement.fromDom(e.target), 'ephox-snooker-resizer-bar');
|
||||
const TableCellSelectionHandler = (editor, resizeHandler) => {
|
||||
const cellSelection = Selections(() => SugarElement.fromDom(editor.getBody()), () => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)), ephemera.selectedSelector);
|
||||
const onSelection = (cells, start, finish) => {
|
||||
@@ -7811,7 +7815,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
const isTable = node => isNonNullable(node) && node.tagName === 'TABLE';
|
||||
const isTable = node => isNonNullable(node) && node.nodeName === 'TABLE';
|
||||
const barResizerPrefix = 'bar-';
|
||||
const isResizable = elm => get$b(elm, 'data-mce-resize') !== 'false';
|
||||
const syncPixels = table => {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tinymce",
|
||||
"version": "6.1.2",
|
||||
"version": "6.2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tinymce/tinymce.git",
|
||||
|
||||
+16
-9
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -36,11 +36,11 @@
|
||||
const getNumberStyles = option('advlist_number_styles');
|
||||
const getBulletStyles = option('advlist_bullet_styles');
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
const isNullable = a => a === null || a === undefined;
|
||||
const isNonNullable = a => !isNullable(a);
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
class Optional {
|
||||
constructor(tag, value) {
|
||||
this.tag = tag;
|
||||
@@ -138,16 +138,21 @@
|
||||
return editor.dom.isChildOf(elm, editor.getBody());
|
||||
};
|
||||
const isTableCellNode = node => {
|
||||
return node && /^(TH|TD)$/.test(node.nodeName);
|
||||
return isNonNullable(node) && /^(TH|TD)$/.test(node.nodeName);
|
||||
};
|
||||
const isListNode = editor => node => {
|
||||
return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node);
|
||||
return isNonNullable(node) && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node);
|
||||
};
|
||||
const getSelectedStyleType = editor => {
|
||||
const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
|
||||
const style = editor.dom.getStyle(listElm, 'listStyleType');
|
||||
return Optional.from(style);
|
||||
};
|
||||
const isWithinNonEditable = (editor, element) => element !== null && editor.dom.getContentEditableParent(element) === 'false';
|
||||
const isWithinNonEditableList = (editor, element) => {
|
||||
const parentList = editor.dom.getParent(element, 'ol,ul,dl');
|
||||
return isWithinNonEditable(editor, parentList);
|
||||
};
|
||||
|
||||
const findIndex = (list, predicate) => {
|
||||
for (let index = 0; index < list.length; index++) {
|
||||
@@ -163,6 +168,7 @@
|
||||
return chr.toUpperCase();
|
||||
});
|
||||
};
|
||||
const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;
|
||||
const isWithinList = (editor, e, nodeName) => {
|
||||
const tableCellIndex = findIndex(e.parents, isTableCellNode);
|
||||
const parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
|
||||
@@ -172,6 +178,7 @@
|
||||
const makeSetupHandler = (editor, nodeName) => api => {
|
||||
const nodeChangeHandler = e => {
|
||||
api.setActive(isWithinList(editor, e, nodeName));
|
||||
api.setEnabled(!isWithinNonEditableList(editor, e.element));
|
||||
};
|
||||
editor.on('NodeChange', nodeChangeHandler);
|
||||
return () => editor.off('NodeChange', nodeChangeHandler);
|
||||
@@ -186,7 +193,7 @@
|
||||
const items = global.map(styles, styleValue => {
|
||||
const iconStyle = nodeName === 'OL' ? 'num' : 'bull';
|
||||
const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
|
||||
const itemValue = styleValue === 'default' ? '' : styleValue;
|
||||
const itemValue = normalizeStyleValue(styleValue);
|
||||
const displayText = styleValueToText(styleValue);
|
||||
return {
|
||||
type: 'choiceitem',
|
||||
@@ -208,20 +215,20 @@
|
||||
onSetup: makeSetupHandler(editor, nodeName)
|
||||
});
|
||||
};
|
||||
const addButton = (editor, id, tooltip, cmd, nodeName, _styles) => {
|
||||
const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {
|
||||
editor.ui.registry.addToggleButton(id, {
|
||||
active: false,
|
||||
tooltip,
|
||||
icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
|
||||
onSetup: makeSetupHandler(editor, nodeName),
|
||||
onAction: () => editor.execCommand(cmd)
|
||||
onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)
|
||||
});
|
||||
};
|
||||
const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {
|
||||
if (styles.length > 1) {
|
||||
addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
|
||||
} else {
|
||||
addButton(editor, id, tooltip, cmd, nodeName);
|
||||
addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));
|
||||
}
|
||||
};
|
||||
const register = editor => {
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,r)=>{const s="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(s,!1,!1===r?null:{"list-style-type":r})},r=t=>e=>e.options.get(t),s=r("advlist_number_styles"),n=r("advlist_bullet_styles");var i=tinymce.util.Tools.resolve("tinymce.util.Tools");class l{constructor(t,e){this.tag=t,this.value=e}static some(t){return new l(!0,t)}static none(){return l.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?l.some(t(this.value)):l.none()}bind(t){return this.tag?t(this.value):l.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:l.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return null==t?l.none():l.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);const o=t=>t&&/^(TH|TD)$/.test(t.nodeName),a=(t,e)=>r=>{const s=s=>{r.setActive(((t,e,r)=>{const s=((t,e)=>{for(let r=0;r<t.length;r++)if(e(t[r]))return r;return-1})(e.parents,o),n=-1!==s?e.parents.slice(0,s):e.parents,l=i.grep(n,(t=>e=>e&&/^(OL|UL|DL)$/.test(e.nodeName)&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))(t));return l.length>0&&l[0].nodeName===r})(t,s,e))};return t.on("NodeChange",s),()=>t.off("NodeChange",s)},u=(t,r,s,n,o,u)=>{u.length>1?((t,r,s,n,o,u)=>{t.ui.registry.addSplitButton(r,{tooltip:s,icon:"OL"===o?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(i.map(u,(t=>{const e="OL"===o?"num":"bull",r="disc"===t||"decimal"===t?"default":t,s="default"===t?"":t,n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:s,icon:"list-"+e+"-"+r,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(r,s)=>{e(t,o,s)},select:e=>{const r=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),r=t.dom.getStyle(e,"listStyleType");return l.from(r)})(t);return r.map((t=>e===t)).getOr(!1)},onSetup:a(t,o)})})(t,r,s,n,o,u):((t,e,r,s,n,i)=>{t.ui.registry.addToggleButton(e,{active:!1,tooltip:r,icon:"OL"===n?"ordered-list":"unordered-list",onSetup:a(t,n),onAction:()=>t.execCommand(s)})})(t,r,s,n,o)};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{u(t,"numlist","Numbered list","InsertOrderedList","OL",s(t)),u(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((r,s)=>{e(t,"UL",s["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((r,s)=>{e(t,"OL",s["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}();
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,r)=>{const s="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(s,!1,!1===r?null:{"list-style-type":r})},r=t=>e=>e.options.get(t),s=r("advlist_number_styles"),n=r("advlist_bullet_styles"),l=t=>null==t,i=t=>!l(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return i(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>i(t)&&/^(TH|TD)$/.test(t.nodeName),d=t=>l(t)||"default"===t?"":t,g=(t,e)=>r=>{const s=s=>{r.setActive(((t,e,r)=>{const s=((t,e)=>{for(let r=0;r<t.length;r++)if(e(t[r]))return r;return-1})(e.parents,u),n=-1!==s?e.parents.slice(0,s):e.parents,l=o.grep(n,(t=>e=>i(e)&&/^(OL|UL|DL)$/.test(e.nodeName)&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))(t));return l.length>0&&l[0].nodeName===r})(t,s,e)),r.setEnabled(!((t,e)=>{const r=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&"false"===t.dom.getContentEditableParent(e))(t,r)})(t,s.element))};return t.on("NodeChange",s),()=>t.off("NodeChange",s)},h=(t,r,s,n,l,i)=>{i.length>1?((t,r,s,n,l,i)=>{t.ui.registry.addSplitButton(r,{tooltip:s,icon:"OL"===l?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(i,(t=>{const e="OL"===l?"num":"bull",r="disc"===t||"decimal"===t?"default":t,s=d(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:s,icon:"list-"+e+"-"+r,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(r,s)=>{e(t,l,s)},select:e=>{const r=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),r=t.dom.getStyle(e,"listStyleType");return a.from(r)})(t);return r.map((t=>e===t)).getOr(!1)},onSetup:g(t,l)})})(t,r,s,n,l,i):((t,r,s,n,l,i)=>{t.ui.registry.addToggleButton(r,{active:!1,tooltip:s,icon:"OL"===l?"ordered-list":"unordered-list",onSetup:g(t,l),onAction:()=>t.queryCommandState(n)||""===i?t.execCommand(n):e(t,l,i)})})(t,r,s,n,l,d(i[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{h(t,"numlist","Numbered list","InsertOrderedList","OL",s(t)),h(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((r,s)=>{e(t,"UL",s["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((r,s)=>{e(t,"OL",s["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}();
|
||||
+7
-6
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -27,7 +27,7 @@
|
||||
const id = elm.getAttribute('id') || elm.getAttribute('name');
|
||||
return id || '';
|
||||
};
|
||||
const isAnchor = elm => elm && elm.nodeName.toLowerCase() === 'a';
|
||||
const isAnchor = elm => elm.nodeName.toLowerCase() === 'a';
|
||||
const isNamedAnchor = elm => isAnchor(elm) && !elm.getAttribute('href') && getIdFromAnchor(elm) !== '';
|
||||
const isEmptyNamedAnchor = elm => isNamedAnchor(elm) && !elm.firstChild;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
editor.insertContent(editor.dom.createHTML('a', { id }));
|
||||
} else {
|
||||
removeEmptyNamedAnchorsInSelection(editor);
|
||||
editor.formatter.remove('namedAnchor', null, null, true);
|
||||
editor.formatter.remove('namedAnchor', undefined, undefined, true);
|
||||
editor.formatter.apply('namedAnchor', { value: id });
|
||||
editor.addVisual();
|
||||
}
|
||||
@@ -133,7 +133,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
const isNamedAnchorNode = node => node && isEmptyString(node.attr('href')) && !isEmptyString(node.attr('id') || node.attr('name'));
|
||||
const isNamedAnchorNode = node => isEmptyString(node.attr('href')) && !isEmptyString(node.attr('id') || node.attr('name'));
|
||||
const isEmptyNamedAnchorNode = node => isNamedAnchorNode(node) && !node.firstChild;
|
||||
const setContentEditable = state => nodes => {
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
@@ -165,16 +165,17 @@
|
||||
};
|
||||
|
||||
const register = editor => {
|
||||
const onAction = () => editor.execCommand('mceAnchor');
|
||||
editor.ui.registry.addToggleButton('anchor', {
|
||||
icon: 'bookmark',
|
||||
tooltip: 'Anchor',
|
||||
onAction: () => editor.execCommand('mceAnchor'),
|
||||
onAction,
|
||||
onSetup: buttonApi => editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind
|
||||
});
|
||||
editor.ui.registry.addMenuItem('anchor', {
|
||||
icon: 'bookmark',
|
||||
text: 'Anchor...',
|
||||
onAction: () => editor.execCommand('mceAnchor')
|
||||
onAction
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");const o=("allow_html_in_named_anchor",e=>e.options.get("allow_html_in_named_anchor"));const a="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>e&&"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),c=(e,a)=>{const r=s(e);r?((e,t,n)=>{n.removeAttribute("name"),n.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{o(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{const o=e.dom;t(o).walk(e.selection.getRng(),(e=>{n.each(e,(e=>{var t;l(t=e)&&!t.firstChild&&o.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",null,null,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},d=e=>(e=>e&&r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(let n=0;n<t.length;n++){const o=t[n];d(o)&&o.attr("contenteditable",e)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{const t=(e=>{const t=s(e);return t?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(c(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:()=>e.execCommand("mceAnchor"),onSetup:t=>e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:()=>e.execCommand("mceAnchor")})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,n)=>l(e)})})(e)}))}))}();
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=("allow_html_in_named_anchor",e=>e.options.get("allow_html_in_named_anchor"));const a="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),d=(e,a)=>{const r=s(e);r?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{const n=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{var t;l(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},c=e=>(e=>r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];c(n)&&n.attr("contenteditable",e)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{const t=(e=>{const t=s(e);return t?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(d(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>l(e)})})(e)}))}))}();
|
||||
+97
-101
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
const link = () => /(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
const getAutoLinkPattern = option('autolink_pattern');
|
||||
const getDefaultLinkTarget = option('link_default_target');
|
||||
const getDefaultLinkProtocol = option('link_default_protocol');
|
||||
const allowUnsafeLinkTarget = option('allow_unsafe_link_target');
|
||||
|
||||
const hasProto = (v, constructor, predicate) => {
|
||||
var _a;
|
||||
@@ -47,123 +48,113 @@
|
||||
}
|
||||
};
|
||||
const isType = type => value => typeOf(value) === type;
|
||||
const eq = t => a => t === a;
|
||||
const isString = isType('string');
|
||||
const isUndefined = eq(undefined);
|
||||
const isNullable = a => a === null || a === undefined;
|
||||
const isNonNullable = a => !isNullable(a);
|
||||
|
||||
const not = f => t => !f(t);
|
||||
|
||||
const hasOwnProperty = Object.hasOwnProperty;
|
||||
const has = (obj, key) => hasOwnProperty.call(obj, key);
|
||||
|
||||
const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
|
||||
const contains = (str, substr) => {
|
||||
return str.indexOf(substr) !== -1;
|
||||
const contains = (str, substr, start = 0, end) => {
|
||||
const idx = str.indexOf(substr, start);
|
||||
if (idx !== -1) {
|
||||
return isUndefined(end) ? true : idx + substr.length <= end;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const startsWith = (str, prefix) => {
|
||||
return checkRange(str, prefix, 0);
|
||||
};
|
||||
|
||||
const rangeEqualsBracketOrSpace = rangeString => /^[(\[{ \u00a0]$/.test(rangeString);
|
||||
const zeroWidth = '\uFEFF';
|
||||
const isZwsp = char => char === zeroWidth;
|
||||
const removeZwsp = s => s.replace(/\uFEFF/g, '');
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');
|
||||
|
||||
const isTextNode = node => node.nodeType === 3;
|
||||
const isElement = node => node.nodeType === 1;
|
||||
const scopeIndex = (container, index) => {
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
if (isTextNode(container)) {
|
||||
const len = container.data.length;
|
||||
if (index > len) {
|
||||
index = len;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
};
|
||||
const setStart = (rng, container, offset) => {
|
||||
if (!isElement(container) || container.hasChildNodes()) {
|
||||
rng.setStart(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setStartBefore(container);
|
||||
}
|
||||
};
|
||||
const setEnd = (rng, container, offset) => {
|
||||
if (!isElement(container) || container.hasChildNodes()) {
|
||||
rng.setEnd(container, scopeIndex(container, offset));
|
||||
} else {
|
||||
rng.setEndAfter(container);
|
||||
}
|
||||
};
|
||||
const isBracketOrSpace = char => /^[(\[{ \u00a0]$/.test(char);
|
||||
const hasProtocol = url => /^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(url);
|
||||
const isPunctuation = char => /[?!,.;:]/.test(char);
|
||||
const parseCurrentLine = (editor, endOffset) => {
|
||||
let end, endContainer, text, prev, len, rngText;
|
||||
const findChar = (text, index, predicate) => {
|
||||
for (let i = index - 1; i >= 0; i--) {
|
||||
const char = text.charAt(i);
|
||||
if (!isZwsp(char) && predicate(char)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
const freefallRtl = (container, offset) => {
|
||||
let tempNode = container;
|
||||
let tempOffset = offset;
|
||||
while (isElement(tempNode) && tempNode.childNodes[tempOffset]) {
|
||||
tempNode = tempNode.childNodes[tempOffset];
|
||||
tempOffset = isTextNode(tempNode) ? tempNode.data.length : tempNode.childNodes.length;
|
||||
}
|
||||
return {
|
||||
container: tempNode,
|
||||
offset: tempOffset
|
||||
};
|
||||
};
|
||||
|
||||
const parseCurrentLine = (editor, offset) => {
|
||||
var _a;
|
||||
const voidElements = editor.schema.getVoidElements();
|
||||
const autoLinkPattern = getAutoLinkPattern(editor);
|
||||
if (editor.dom.getParent(editor.selection.getNode(), 'a[href]') !== null) {
|
||||
return;
|
||||
const {dom, selection} = editor;
|
||||
if (dom.getParent(selection.getNode(), 'a[href]') !== null) {
|
||||
return null;
|
||||
}
|
||||
const rng = editor.selection.getRng().cloneRange();
|
||||
if (rng.startOffset < 5) {
|
||||
prev = rng.endContainer.previousSibling;
|
||||
if (!prev) {
|
||||
if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
|
||||
return;
|
||||
}
|
||||
prev = rng.endContainer.firstChild.nextSibling;
|
||||
}
|
||||
len = prev.length;
|
||||
setStart(rng, prev, len);
|
||||
setEnd(rng, prev, len);
|
||||
if (rng.endOffset < 5) {
|
||||
return;
|
||||
}
|
||||
end = rng.endOffset;
|
||||
endContainer = prev;
|
||||
const rng = selection.getRng();
|
||||
const textSeeker = global(dom, node => {
|
||||
return dom.isBlock(node) || has(voidElements, node.nodeName.toLowerCase()) || dom.getContentEditable(node) === 'false';
|
||||
});
|
||||
const {
|
||||
container: endContainer,
|
||||
offset: endOffset
|
||||
} = freefallRtl(rng.endContainer, rng.endOffset);
|
||||
const root = (_a = dom.getParent(endContainer, dom.isBlock)) !== null && _a !== void 0 ? _a : dom.getRoot();
|
||||
const endSpot = textSeeker.backwards(endContainer, endOffset + offset, (node, offset) => {
|
||||
const text = node.data;
|
||||
const idx = findChar(text, offset, not(isBracketOrSpace));
|
||||
return idx === -1 || isPunctuation(text[idx]) ? idx : idx + 1;
|
||||
}, root);
|
||||
if (!endSpot) {
|
||||
return null;
|
||||
}
|
||||
let lastTextNode = endSpot.container;
|
||||
const startSpot = textSeeker.backwards(endSpot.container, endSpot.offset, (node, offset) => {
|
||||
lastTextNode = node;
|
||||
const idx = findChar(node.data, offset, isBracketOrSpace);
|
||||
return idx === -1 ? idx : idx + 1;
|
||||
}, root);
|
||||
const newRng = dom.createRng();
|
||||
if (!startSpot) {
|
||||
newRng.setStart(lastTextNode, 0);
|
||||
} else {
|
||||
endContainer = rng.endContainer;
|
||||
if (!isTextNode(endContainer) && endContainer.firstChild) {
|
||||
while (!isTextNode(endContainer) && endContainer.firstChild) {
|
||||
endContainer = endContainer.firstChild;
|
||||
}
|
||||
if (isTextNode(endContainer)) {
|
||||
setStart(rng, endContainer, 0);
|
||||
setEnd(rng, endContainer, endContainer.nodeValue.length);
|
||||
}
|
||||
}
|
||||
if (rng.endOffset === 1) {
|
||||
end = 2;
|
||||
} else {
|
||||
end = rng.endOffset - 1 - endOffset;
|
||||
}
|
||||
newRng.setStart(startSpot.container, startSpot.offset);
|
||||
}
|
||||
const start = end;
|
||||
do {
|
||||
setStart(rng, endContainer, end >= 2 ? end - 2 : 0);
|
||||
setEnd(rng, endContainer, end >= 1 ? end - 1 : 0);
|
||||
end -= 1;
|
||||
rngText = rng.toString();
|
||||
} while (!rangeEqualsBracketOrSpace(rngText) && end - 2 >= 0);
|
||||
if (rangeEqualsBracketOrSpace(rng.toString())) {
|
||||
setStart(rng, endContainer, end);
|
||||
setEnd(rng, endContainer, start);
|
||||
end += 1;
|
||||
} else if (rng.startOffset === 0) {
|
||||
setStart(rng, endContainer, 0);
|
||||
setEnd(rng, endContainer, start);
|
||||
} else {
|
||||
setStart(rng, endContainer, end);
|
||||
setEnd(rng, endContainer, start);
|
||||
}
|
||||
text = rng.toString();
|
||||
if (isPunctuation(text.charAt(text.length - 1))) {
|
||||
setEnd(rng, endContainer, start - 1);
|
||||
}
|
||||
text = rng.toString().trim();
|
||||
const matches = text.match(autoLinkPattern);
|
||||
const protocol = getDefaultLinkProtocol(editor);
|
||||
newRng.setEnd(endSpot.container, endSpot.offset);
|
||||
const rngText = removeZwsp(newRng.toString());
|
||||
const matches = rngText.match(autoLinkPattern);
|
||||
if (matches) {
|
||||
let url = matches[0];
|
||||
if (startsWith(url, 'www.')) {
|
||||
const protocol = getDefaultLinkProtocol(editor);
|
||||
url = protocol + '://' + url;
|
||||
} else if (contains(url, '@') && !hasProtocol(url)) {
|
||||
url = 'mailto:' + url;
|
||||
}
|
||||
return {
|
||||
rng,
|
||||
rng: newRng,
|
||||
url
|
||||
};
|
||||
} else {
|
||||
@@ -171,10 +162,10 @@
|
||||
}
|
||||
};
|
||||
const convertToLink = (editor, result) => {
|
||||
const defaultLinkTarget = getDefaultLinkTarget(editor);
|
||||
const {dom, selection} = editor;
|
||||
const {rng, url} = result;
|
||||
const bookmark = editor.selection.getBookmark();
|
||||
editor.selection.setRng(rng);
|
||||
const bookmark = selection.getBookmark();
|
||||
selection.setRng(rng);
|
||||
const command = 'createlink';
|
||||
const args = {
|
||||
command,
|
||||
@@ -185,22 +176,27 @@
|
||||
if (!beforeExecEvent.isDefaultPrevented()) {
|
||||
editor.getDoc().execCommand(command, false, url);
|
||||
editor.dispatch('ExecCommand', args);
|
||||
const defaultLinkTarget = getDefaultLinkTarget(editor);
|
||||
if (isString(defaultLinkTarget)) {
|
||||
editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget);
|
||||
const anchor = selection.getNode();
|
||||
dom.setAttrib(anchor, 'target', defaultLinkTarget);
|
||||
if (defaultLinkTarget === '_blank' && !allowUnsafeLinkTarget(editor)) {
|
||||
dom.setAttrib(anchor, 'rel', 'noopener');
|
||||
}
|
||||
}
|
||||
}
|
||||
editor.selection.moveToBookmark(bookmark);
|
||||
selection.moveToBookmark(bookmark);
|
||||
editor.nodeChanged();
|
||||
};
|
||||
const handleSpacebar = editor => {
|
||||
const result = parseCurrentLine(editor, 0);
|
||||
const result = parseCurrentLine(editor, -1);
|
||||
if (isNonNullable(result)) {
|
||||
convertToLink(editor, result);
|
||||
}
|
||||
};
|
||||
const handleBracket = handleSpacebar;
|
||||
const handleEnter = editor => {
|
||||
const result = parseCurrentLine(editor, -1);
|
||||
const result = parseCurrentLine(editor, 0);
|
||||
if (isNonNullable(result)) {
|
||||
convertToLink(editor, result);
|
||||
}
|
||||
@@ -221,7 +217,7 @@
|
||||
};
|
||||
|
||||
var Plugin = () => {
|
||||
global.add('autolink', editor => {
|
||||
global$1.add('autolink', editor => {
|
||||
register(editor);
|
||||
setup(editor);
|
||||
});
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>e.options.get(t),n=e("autolink_pattern"),o=e("link_default_target"),r=e("link_default_protocol"),i=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(n=o=t,(r=String).prototype.isPrototypeOf(n)||(null===(i=o.constructor)||void 0===i?void 0:i.name)===r.name)?"string":e;var n,o,r,i})(t));const s=t=>!(t=>null==t)(t),l=t=>/^[(\[{ \u00a0]$/.test(t),a=t=>3===t.nodeType,d=t=>1===t.nodeType,c=(t,e)=>{if(e<0&&(e=0),a(t)){const n=t.data.length;e>n&&(e=n)}return e},f=(t,e,n)=>{!d(e)||e.hasChildNodes()?t.setStart(e,c(e,n)):t.setStartBefore(e)},g=(t,e,n)=>{!d(e)||e.hasChildNodes()?t.setEnd(e,c(e,n)):t.setEndAfter(e)},u=(t,e)=>{let o,i,s,d,c,u;const h=n(t);if(null!==t.dom.getParent(t.selection.getNode(),"a[href]"))return;const p=t.selection.getRng().cloneRange();if(p.startOffset<5){if(d=p.endContainer.previousSibling,!d){if(!p.endContainer.firstChild||!p.endContainer.firstChild.nextSibling)return;d=p.endContainer.firstChild.nextSibling}if(c=d.length,f(p,d,c),g(p,d,c),p.endOffset<5)return;o=p.endOffset,i=d}else{if(i=p.endContainer,!a(i)&&i.firstChild){for(;!a(i)&&i.firstChild;)i=i.firstChild;a(i)&&(f(p,i,0),g(p,i,i.nodeValue.length))}o=1===p.endOffset?2:p.endOffset-1-e}const m=o;do{f(p,i,o>=2?o-2:0),g(p,i,o>=1?o-1:0),o-=1,u=p.toString()}while(!l(u)&&o-2>=0);var C;l(p.toString())?(f(p,i,o),g(p,i,m),o+=1):0===p.startOffset?(f(p,i,0),g(p,i,m)):(f(p,i,o),g(p,i,m)),s=p.toString(),C=s.charAt(s.length-1),/[?!,.;:]/.test(C)&&g(p,i,m-1),s=p.toString().trim();const k=s.match(h),y=r(t);if(k){let t=k[0];return v="www.",(w=t).length>=v.length&&w.substr(0,0+v.length)===v?t=y+"://"+t:((t,e)=>-1!==t.indexOf("@"))(t)&&!(t=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(t))(t)&&(t="mailto:"+t),{rng:p,url:t}}var w,v;return null},h=(t,e)=>{const n=o(t),{rng:r,url:s}=e,l=t.selection.getBookmark();t.selection.setRng(r);const a="createlink",d={command:a,ui:!1,value:s};t.dispatch("BeforeExecCommand",d).isDefaultPrevented()||(t.getDoc().execCommand(a,!1,s),t.dispatch("ExecCommand",d),i(n)&&t.dom.setAttrib(t.selection.getNode(),"target",n)),t.selection.moveToBookmark(l),t.nodeChanged()},p=t=>{const e=u(t,0);s(e)&&h(t,e)},m=p;t.add("autolink",(t=>{(t=>{const e=t.options.register;e("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),e("link_default_target",{processor:"string"}),e("link_default_protocol",{processor:"string",default:"https"})})(t),(t=>{t.on("keydown",(e=>{13!==e.keyCode||e.isDefaultPrevented()||(t=>{const e=u(t,-1);s(e)&&h(t,e)})(t)})),t.on("keyup",(e=>{32===e.keyCode?p(t):(48===e.keyCode&&e.shiftKey||221===e.keyCode)&&m(t)}))})(t)}))}();
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("autolink_pattern"),o=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(a=o.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var n,o,r,a})(e));const l=(void 0,e=>undefined===e);const i=e=>!(e=>null==e)(e),c=Object.hasOwnProperty,d=e=>"\ufeff"===e;var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const f=e=>/^[(\[{ \u00a0]$/.test(e),g=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!d(t)&&n(t))return o}return-1},m=(e,t)=>{var o;const a=e.schema.getVoidElements(),s=n(e),{dom:i,selection:d}=e;if(null!==i.getParent(d.getNode(),"a[href]"))return null;const m=d.getRng(),k=u(i,(e=>{return i.isBlock(e)||(t=a,n=e.nodeName.toLowerCase(),c.call(t,n))||"false"===i.getContentEditable(e);var t,n})),{container:p,offset:y}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=3===n.nodeType?n.data.length:n.childNodes.length;return{container:n,offset:o}})(m.endContainer,m.endOffset),h=null!==(o=i.getParent(p,i.isBlock))&&void 0!==o?o:i.getRoot(),w=k.backwards(p,y+t,((e,t)=>{const n=e.data,o=g(n,t,(r=f,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),h);if(!w)return null;let v=w.container;const _=k.backwards(w.container,w.offset,((e,t)=>{v=e;const n=g(e.data,t,f);return-1===n?n:n+1}),h),A=i.createRng();_?A.setStart(_.container,_.offset):A.setStart(v,0),A.setEnd(w.container,w.offset);const C=A.toString().replace(/\uFEFF/g,"").match(s);if(C){let t=C[0];return $="www.",(b=t).length>=$.length&&b.substr(0,0+$.length)===$?t=r(e)+"://"+t:((e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!l(o)||r+t.length<=o)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:A,url:t}}var b,$;return null},k=(e,t)=>{const{dom:n,selection:r}=e,{rng:l,url:i}=t,c=r.getBookmark();r.setRng(l);const d="createlink",u={command:d,ui:!1,value:i};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,i),e.dispatch("ExecCommand",u);const t=o(e);if(s(t)){const o=r.getNode();n.setAttrib(o,"target",t),"_blank"!==t||a(e)||n.setAttrib(o,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},p=e=>{const t=m(e,-1);i(t)&&k(e,t)},y=p;e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=m(e,0);i(t)&&k(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?p(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&y(e)}))})(e)}))}();
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -53,7 +53,8 @@
|
||||
}
|
||||
};
|
||||
const parseCssValueToInt = (dom, elm, name, computed) => {
|
||||
const value = parseInt(dom.getStyle(elm, name, computed), 10);
|
||||
var _a;
|
||||
const value = parseInt((_a = dom.getStyle(elm, name, computed)) !== null && _a !== void 0 ? _a : '', 10);
|
||||
return isNaN(value) ? 0 : value;
|
||||
};
|
||||
const shouldScrollIntoView = trigger => {
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("min_height"),s=o("max_height"),i=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),l=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},a=(e,t,o,n)=>{const s=parseInt(e.getStyle(t,o,n),10);return isNaN(s)?0:s},g=(e,o,i)=>{var c;const u=e.dom,d=e.getDoc();if(!d)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void l(e,!0);const f=d.documentElement,m=r(e),p=null!==(c=n(e))&&void 0!==c?c:e.getElement().offsetHeight;let h=p;const y=a(u,f,"margin-top",!0),v=a(u,f,"margin-bottom",!0);let C=f.offsetHeight+y+v+m;C<0&&(C=0);const S=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+S>p&&(h=C+S);const z=s(e);if(z&&h>z?(h=z,l(e,!0)):l(e,!1),h!==o.get()){const n=h-o.get();if(u.setStyle(e.getContainer(),"height",h+"px"),o.set(h),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(i)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&n<0&&g(e,o,i)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const t=(e=>{let t=0;return{get:()=>t,set:e=>{t=e}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{g(e,t)}))})(e,t),((e,t)=>{e.on("init",(()=>{const t=i(e),o=e.dom;o.setStyles(e.getDoc().documentElement,{height:"auto"}),o.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t,"min-height":0})})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(o=>{g(e,t,o)}))})(e,t)}}))}();
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("min_height"),s=o("max_height"),i=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),l=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},a=(e,t,o,n)=>{var s;const i=parseInt(null!==(s=e.getStyle(t,o,n))&&void 0!==s?s:"",10);return isNaN(i)?0:i},g=(e,o,i)=>{var c;const u=e.dom,d=e.getDoc();if(!d)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void l(e,!0);const f=d.documentElement,m=r(e),p=null!==(c=n(e))&&void 0!==c?c:e.getElement().offsetHeight;let h=p;const v=a(u,f,"margin-top",!0),y=a(u,f,"margin-bottom",!0);let C=f.offsetHeight+v+y+m;C<0&&(C=0);const S=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+S>p&&(h=C+S);const z=s(e);if(z&&h>z?(h=z,l(e,!0)):l(e,!1),h!==o.get()){const n=h-o.get();if(u.setStyle(e.getContainer(),"height",h+"px"),o.set(h),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(i)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&n<0&&g(e,o,i)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const t=(e=>{let t=0;return{get:()=>t,set:e=>{t=e}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{g(e,t)}))})(e,t),((e,t)=>{e.on("init",(()=>{const t=i(e),o=e.dom;o.setStyles(e.getDoc().documentElement,{height:"auto"}),o.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t,"min-height":0})})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(o=>{g(e,t,o)}))})(e,t)}}))}();
|
||||
+11
-10
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -48,7 +48,7 @@
|
||||
m: 60000
|
||||
};
|
||||
const parsedTime = /^(\d+)([ms]?)$/.exec(timeString);
|
||||
return (parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(timeString, 10);
|
||||
return (parsedTime && parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(timeString, 10);
|
||||
};
|
||||
|
||||
const option = name => editor => editor.options.get(name);
|
||||
@@ -112,7 +112,8 @@
|
||||
}
|
||||
};
|
||||
const hasDraft = editor => {
|
||||
const time = parseInt(global$2.getItem(getAutoSavePrefix(editor) + 'time'), 10) || 0;
|
||||
var _a;
|
||||
const time = parseInt((_a = global$2.getItem(getAutoSavePrefix(editor) + 'time')) !== null && _a !== void 0 ? _a : '0', 10) || 0;
|
||||
if (new Date().getTime() - time > getAutoSaveRetention(editor)) {
|
||||
removeDraft(editor, false);
|
||||
return false;
|
||||
@@ -139,9 +140,10 @@
|
||||
}
|
||||
};
|
||||
const restoreDraft = editor => {
|
||||
var _a;
|
||||
const prefix = getAutoSavePrefix(editor);
|
||||
if (hasDraft(editor)) {
|
||||
editor.setContent(global$2.getItem(prefix + 'draft'), { format: 'raw' });
|
||||
editor.setContent((_a = global$2.getItem(prefix + 'draft')) !== null && _a !== void 0 ? _a : '', { format: 'raw' });
|
||||
fireRestoreDraft(editor);
|
||||
}
|
||||
};
|
||||
@@ -195,20 +197,19 @@
|
||||
};
|
||||
const register = editor => {
|
||||
startStoreDraft(editor);
|
||||
const onAction = () => {
|
||||
restoreLastDraft(editor);
|
||||
};
|
||||
editor.ui.registry.addButton('restoredraft', {
|
||||
tooltip: 'Restore last draft',
|
||||
icon: 'restore-draft',
|
||||
onAction: () => {
|
||||
restoreLastDraft(editor);
|
||||
},
|
||||
onAction,
|
||||
onSetup: makeSetupHandler(editor)
|
||||
});
|
||||
editor.ui.registry.addMenuItem('restoredraft', {
|
||||
text: 'Restore last draft',
|
||||
icon: 'restore-draft',
|
||||
onAction: () => {
|
||||
restoreLastDraft(editor);
|
||||
},
|
||||
onAction,
|
||||
onSetup: makeSetupHandler(editor)
|
||||
});
|
||||
};
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t));const r=(void 0,t=>undefined===t);var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),m=i("autosave_retention"),d=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},f=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},v=t=>{const e=parseInt(a.getItem(d(t)+"time"),10)||0;return!((new Date).getTime()-e>m(t)&&(p(t,!1),1))},p=(t,e)=>{const r=d(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},g=t=>{const e=d(t);!f(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},y=t=>{const e=d(t);v(t)&&(t.setContent(a.getItem(e+"draft"),{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))},D=t=>{t.undoManager.transact((()=>{y(t),p(t)})),t.focus()};var h=tinymce.util.Tools.resolve("tinymce.EditorManager");const _=t=>e=>{e.setEnabled(v(t));const r=()=>e.setEnabled(v(t));return t.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(h.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=c(t);o.setEditorInterval(t,(()=>{g(t)}),e)})(t),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:()=>{D(t)},onSetup:_(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:()=>{D(t)},onSetup:_(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),(t=>({hasDraft:()=>v(t),storeDraft:()=>g(t),restoreDraft:()=>y(t),removeDraft:e=>p(t,e),isEmpty:e=>f(t,e)}))(t))))}();
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t));const r=(void 0,t=>undefined===t);var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),d=i("autosave_retention"),m=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},v=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},f=t=>{var e;const r=parseInt(null!==(e=a.getItem(m(t)+"time"))&&void 0!==e?e:"0",10)||0;return!((new Date).getTime()-r>d(t)&&(p(t,!1),1))},p=(t,e)=>{const r=m(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},g=t=>{const e=m(t);!v(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},y=t=>{var e;const r=m(t);f(t)&&(t.setContent(null!==(e=a.getItem(r+"draft"))&&void 0!==e?e:"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};var D=tinymce.util.Tools.resolve("tinymce.EditorManager");const h=t=>e=>{e.setEnabled(f(t));const r=()=>e.setEnabled(f(t));return t.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(D.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=c(t);o.setEditorInterval(t,(()=>{g(t)}),e)})(t);const e=()=>{(t=>{t.undoManager.transact((()=>{y(t),p(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),(t=>({hasDraft:()=>f(t),storeDraft:()=>g(t),restoreDraft:()=>y(t),removeDraft:e=>p(t,e),isEmpty:e=>v(t,e)}))(t))))}();
|
||||
+17
-7
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -41,6 +41,7 @@
|
||||
const eq = t => a => t === a;
|
||||
const isArray$1 = isType('array');
|
||||
const isNull = eq(null);
|
||||
const isUndefined = eq(undefined);
|
||||
const isNullable = a => a === null || a === undefined;
|
||||
const isNonNullable = a => !isNullable(a);
|
||||
const isFunction = isSimpleType('function');
|
||||
@@ -1418,7 +1419,10 @@
|
||||
if (userCharMapAppend) {
|
||||
const userDefinedGroup = global.grep(charmap, cg => cg.name === UserDefined);
|
||||
if (userDefinedGroup.length) {
|
||||
userDefinedGroup[0].characters = [].concat(userDefinedGroup[0].characters).concat(getCharsFromOption(userCharMapAppend));
|
||||
userDefinedGroup[0].characters = [
|
||||
...userDefinedGroup[0].characters,
|
||||
...getCharsFromOption(userCharMapAppend)
|
||||
];
|
||||
return charmap;
|
||||
}
|
||||
return charmap.concat({
|
||||
@@ -1484,8 +1488,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
const contains = (str, substr) => {
|
||||
return str.indexOf(substr) !== -1;
|
||||
const contains = (str, substr, start = 0, end) => {
|
||||
const idx = str.indexOf(substr, start);
|
||||
if (idx !== -1) {
|
||||
return isUndefined(end) ? true : idx + substr.length <= end;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const fromCodePoint = String.fromCodePoint;
|
||||
|
||||
@@ -1593,7 +1602,7 @@
|
||||
|
||||
const init = (editor, all) => {
|
||||
editor.ui.registry.addAutocompleter('charmap', {
|
||||
ch: ':',
|
||||
trigger: ':',
|
||||
columns: 'auto',
|
||||
minChars: 2,
|
||||
fetch: (pattern, _maxResults) => new Promise((resolve, _reject) => {
|
||||
@@ -1608,15 +1617,16 @@
|
||||
};
|
||||
|
||||
const register = editor => {
|
||||
const onAction = () => editor.execCommand('mceShowCharmap');
|
||||
editor.ui.registry.addButton('charmap', {
|
||||
icon: 'insert-character',
|
||||
tooltip: 'Special character',
|
||||
onAction: () => editor.execCommand('mceShowCharmap')
|
||||
onAction
|
||||
});
|
||||
editor.ui.registry.addMenuItem('charmap', {
|
||||
icon: 'insert-character',
|
||||
text: 'Special character...',
|
||||
onAction: () => editor.execCommand('mceShowCharmap')
|
||||
onAction
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const o=(e=>e.getContent({source_view:!0}))(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:o},onSubmit:o=>{((e,o)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(o)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,o.getData().code),o.close()}})})(e)}))})(e),(e=>{const o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:o})})(e),{})))}();
|
||||
+4
-6
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -112,8 +112,6 @@
|
||||
const get$1 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
|
||||
const head = xs => get$1(xs, 0);
|
||||
|
||||
const someIf = (b, a) => b ? Optional.some(a) : Optional.none();
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
const Global = typeof window !== 'undefined' ? window : Function('return this;')();
|
||||
@@ -2206,12 +2204,12 @@
|
||||
const get = editor => Global.Prism && useGlobalPrismJS(editor) ? Global.Prism : prismjs;
|
||||
|
||||
const isCodeSample = elm => {
|
||||
return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1;
|
||||
return isNonNullable(elm) && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1;
|
||||
};
|
||||
|
||||
const getSelectedCodeSample = editor => {
|
||||
const node = editor.selection ? editor.selection.getNode() : null;
|
||||
return someIf(isCodeSample(node), node);
|
||||
return isCodeSample(node) ? Optional.some(node) : Optional.none();
|
||||
};
|
||||
const insertCodeSample = (editor, language, code) => {
|
||||
const dom = editor.dom;
|
||||
@@ -2233,7 +2231,7 @@
|
||||
};
|
||||
const getCurrentCode = editor => {
|
||||
const node = getSelectedCodeSample(editor);
|
||||
return node.fold(constant(''), n => n.textContent);
|
||||
return node.bind(n => Optional.from(n.textContent)).getOr('');
|
||||
};
|
||||
|
||||
const getLanguages = editor => {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>typeof e===t,o=t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(o=r=t,(n=String).prototype.isPrototypeOf(o)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===n.name)?"string":e;var o,r,n,i})(t),r=e("boolean"),n=t=>!(t=>null==t)(t),i=e("function"),s=e("number"),l=(!1,()=>false);class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return n(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=(t,e)=>{for(let o=0,r=t.length;o<r;o++)e(t[o],o)},c=t=>{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},d=c,h=(t,e)=>{const o=t.dom;if(1!==o.nodeType)return!1;{const t=o;if(void 0!==t.matches)return t.matches(e);if(void 0!==t.msMatchesSelector)return t.msMatchesSelector(e);if(void 0!==t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(void 0!==t.mozMatchesSelector)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}};"undefined"!=typeof window?window:Function("return this;")();const m=t=>e=>(t=>t.dom.nodeType)(e)===t,g=m(1),f=m(3),v=m(9),p=m(11),y=(t,e)=>{t.dom.removeAttribute(e)},w=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?t=>d(t.dom.getRootNode()):t=>v(t)?t:d(t.dom.ownerDocument),N=t=>d(t.dom.host),b=t=>{const e=f(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;const o=e.ownerDocument;return(t=>{const e=w(t);return p(o=e)&&n(o.dom.host)?a.some(e):a.none();var o})(d(e)).fold((()=>o.body.contains(e)),(r=b,i=N,t=>r(i(t))));var r,i},S=t=>"rtl"===((t,e)=>{const o=t.dom,r=window.getComputedStyle(o).getPropertyValue(e);return""!==r||b(t)?r:((t,e)=>(t=>void 0!==t.style&&i(t.style.getPropertyValue))(t)?t.style.getPropertyValue(e):"")(o,e)})(t,"direction")?"rtl":"ltr",A=(t,e)=>((t,o)=>((t,e)=>{const o=[];for(let r=0,n=t.length;r<n;r++){const n=t[r];e(n,r)&&o.push(n)}return o})(((t,e)=>{const o=t.length,r=new Array(o);for(let n=0;n<o;n++){const o=t[n];r[n]=e(o,n)}return r})(t.dom.childNodes,d),(t=>h(t,e))))(t),T=("li",t=>g(t)&&"li"===t.dom.nodeName.toLowerCase());const C=(t,e)=>{const n=t.selection.getSelectedBlocks();n.length>0&&(u(n,(t=>{const n=d(t),c=T(n),m=((t,e)=>{return(e?(o=t,r="ol,ul",((t,e,o)=>{let n=t.dom;const s=i(o)?o:l;for(;n.parentNode;){n=n.parentNode;const t=d(n);if(h(t,r))return a.some(t);if(s(t))break}return a.none()})(o,0,n)):a.some(t)).getOr(t);var o,r,n})(n,c);var f;(f=m,(t=>a.from(t.dom.parentNode).map(d))(f).filter(g)).each((t=>{if(S(t)!==e?((t,e,n)=>{((t,e,n)=>{if(!(o(n)||r(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)})(m,"dir",e):S(m)!==e&&y(m,"dir"),c){const t=A(m,"li[dir]");u(t,(t=>y(t,"dir")))}}))})),t.nodeChanged())},D=(t,e)=>o=>{const r=t=>{const r=d(t.element);o.setActive(S(r)===e)};return t.on("NodeChange",r),()=>t.off("NodeChange",r)};t.add("directionality",(t=>{(t=>{t.addCommand("mceDirectionLTR",(()=>{C(t,"ltr")})),t.addCommand("mceDirectionRTL",(()=>{C(t,"rtl")}))})(t),(t=>{t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:()=>t.execCommand("mceDirectionLTR"),onSetup:D(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:()=>t.execCommand("mceDirectionRTL"),onSetup:D(t,"rtl")})})(t)}))}();
|
||||
+10
-4
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
const eq = t => a => t === a;
|
||||
const isNull = eq(null);
|
||||
const isUndefined = eq(undefined);
|
||||
const isNullable = a => a === null || a === undefined;
|
||||
const isNonNullable = a => !isNullable(a);
|
||||
|
||||
@@ -256,8 +257,13 @@
|
||||
};
|
||||
|
||||
const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
|
||||
const contains = (str, substr) => {
|
||||
return str.indexOf(substr) !== -1;
|
||||
const contains = (str, substr, start = 0, end) => {
|
||||
const idx = str.indexOf(substr, start);
|
||||
if (idx !== -1) {
|
||||
return isUndefined(end) ? true : idx + substr.length <= end;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const startsWith = (str, prefix) => {
|
||||
return checkRange(str, prefix, 0);
|
||||
@@ -530,7 +536,7 @@
|
||||
|
||||
const init = (editor, database) => {
|
||||
editor.ui.registry.addAutocompleter('emoticons', {
|
||||
ch: ':',
|
||||
trigger: ':',
|
||||
columns: 'auto',
|
||||
minChars: 2,
|
||||
fetch: (pattern, maxResults) => database.waitForLoad().then(() => {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+11
-5
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -50,6 +50,7 @@
|
||||
const isArray = isType$1('array');
|
||||
const isNull = eq$1(null);
|
||||
const isBoolean = isSimpleType('boolean');
|
||||
const isUndefined = eq$1(undefined);
|
||||
const isNullable = a => a === null || a === undefined;
|
||||
const isNonNullable = a => !isNullable(a);
|
||||
const isFunction = isSimpleType('function');
|
||||
@@ -295,8 +296,13 @@
|
||||
}
|
||||
};
|
||||
|
||||
const contains = (str, substr) => {
|
||||
return str.indexOf(substr) !== -1;
|
||||
const contains = (str, substr, start = 0, end) => {
|
||||
const idx = str.indexOf(substr, start);
|
||||
if (idx !== -1) {
|
||||
return isUndefined(end) ? true : idx + substr.length <= end;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
||||
@@ -1008,7 +1014,7 @@
|
||||
const clobberedEls = all('[' + attr + ']');
|
||||
each$1(clobberedEls, element => {
|
||||
const restore = get$3(element, attr);
|
||||
if (restore !== 'no-styles') {
|
||||
if (restore && restore !== 'no-styles') {
|
||||
setAll(element, dom.parseStyle(restore));
|
||||
} else {
|
||||
remove(element, 'style');
|
||||
@@ -1074,7 +1080,7 @@
|
||||
const isTouch = global.deviceType.isTouch();
|
||||
const editorContainerStyle = editorContainer.style;
|
||||
const iframe = editor.iframeElement;
|
||||
const iframeStyle = iframe.style;
|
||||
const iframeStyle = iframe === null || iframe === void 0 ? void 0 : iframe.style;
|
||||
const handleClasses = handler => {
|
||||
handler(body, 'tox-fullscreen');
|
||||
handler(documentElement, 'tox-fullscreen');
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+92
-19
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -21,10 +21,21 @@
|
||||
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
let unique = 0;
|
||||
const generate = prefix => {
|
||||
const date = new Date();
|
||||
const time = date.getTime();
|
||||
const random = Math.floor(Math.random() * 1000000000);
|
||||
unique++;
|
||||
return prefix + '_' + random + unique + String(time);
|
||||
};
|
||||
|
||||
const get$1 = customTabs => {
|
||||
const addTab = spec => {
|
||||
var _a;
|
||||
const name = (_a = spec.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
||||
const currentCustomTabs = customTabs.get();
|
||||
currentCustomTabs[spec.name] = spec;
|
||||
currentCustomTabs[name] = spec;
|
||||
customTabs.set(currentCustomTabs);
|
||||
};
|
||||
return { addTab };
|
||||
@@ -56,10 +67,34 @@
|
||||
});
|
||||
};
|
||||
|
||||
const hasProto = (v, constructor, predicate) => {
|
||||
var _a;
|
||||
if (predicate(v, constructor.prototype)) {
|
||||
return true;
|
||||
} else {
|
||||
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
||||
}
|
||||
};
|
||||
const typeOf = x => {
|
||||
const t = typeof x;
|
||||
if (x === null) {
|
||||
return 'null';
|
||||
} else if (t === 'object' && Array.isArray(x)) {
|
||||
return 'array';
|
||||
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
||||
return 'string';
|
||||
} else {
|
||||
return t;
|
||||
}
|
||||
};
|
||||
const isType = type => value => typeOf(value) === type;
|
||||
const isSimpleType = type => value => typeof value === type;
|
||||
const eq = t => a => t === a;
|
||||
const isString = isType('string');
|
||||
const isUndefined = eq(undefined);
|
||||
const isNullable = a => a === null || a === undefined;
|
||||
const isNonNullable = a => !isNullable(a);
|
||||
const isFunction = isSimpleType('function');
|
||||
|
||||
const constant = value => {
|
||||
return () => {
|
||||
@@ -161,6 +196,7 @@
|
||||
}
|
||||
Optional.singletonNone = new Optional(false);
|
||||
|
||||
const nativeSlice = Array.prototype.slice;
|
||||
const nativeIndexOf = Array.prototype.indexOf;
|
||||
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
||||
const contains = (xs, x) => rawIndexOf(xs, x) > -1;
|
||||
@@ -197,6 +233,11 @@
|
||||
const find = (xs, pred) => {
|
||||
return findUntil(xs, pred, never);
|
||||
};
|
||||
const sort = (xs, comparator) => {
|
||||
const copy = nativeSlice.call(xs, 0);
|
||||
copy.sort(comparator);
|
||||
return copy;
|
||||
};
|
||||
|
||||
const keys = Object.keys;
|
||||
const hasOwnProperty = Object.hasOwnProperty;
|
||||
@@ -586,11 +627,6 @@
|
||||
name: 'Advanced Tables',
|
||||
type: 'premium'
|
||||
},
|
||||
{
|
||||
key: 'autocorrect',
|
||||
name: 'Autocorrect',
|
||||
type: 'premium'
|
||||
},
|
||||
{
|
||||
key: 'casechange',
|
||||
name: 'Case Change',
|
||||
@@ -606,6 +642,11 @@
|
||||
name: 'Enhanced Image Editing',
|
||||
type: 'premium'
|
||||
},
|
||||
{
|
||||
key: 'footnotes',
|
||||
name: 'Footnotes',
|
||||
type: 'premium'
|
||||
},
|
||||
{
|
||||
key: 'mediaembed',
|
||||
name: 'Enhanced Media Embed',
|
||||
@@ -632,6 +673,11 @@
|
||||
name: 'Mentions',
|
||||
type: 'premium'
|
||||
},
|
||||
{
|
||||
key: 'mergetags',
|
||||
name: 'Merge Tags',
|
||||
type: 'premium'
|
||||
},
|
||||
{
|
||||
key: 'pageembed',
|
||||
name: 'Page Embed',
|
||||
@@ -660,6 +706,11 @@
|
||||
type: 'premium',
|
||||
slug: 'introduction-to-tiny-spellchecker'
|
||||
},
|
||||
{
|
||||
key: 'autocorrect',
|
||||
name: 'Spelling Autocorrect',
|
||||
type: 'premium'
|
||||
},
|
||||
{
|
||||
key: 'tinycomments',
|
||||
name: 'Tiny Comments',
|
||||
@@ -685,24 +736,43 @@
|
||||
|
||||
const tab$1 = editor => {
|
||||
const availablePlugins = () => {
|
||||
const premiumPlugins = filter(urls, ({key, type}) => {
|
||||
return key !== 'autocorrect' && type === 'premium';
|
||||
const premiumPlugins = filter(urls, ({type}) => {
|
||||
return type === 'premium';
|
||||
});
|
||||
const premiumPluginList = map(premiumPlugins, plugin => '<li>' + global$1.translate(plugin.name) + '</li>').join('');
|
||||
const sortedPremiumPlugins = sort(map(premiumPlugins, p => p.name), (s1, s2) => s1.localeCompare(s2));
|
||||
const premiumPluginList = map(sortedPremiumPlugins, pluginName => `<li>${ pluginName }</li>`).join('');
|
||||
return '<div data-mce-tabstop="1" tabindex="-1">' + '<p><b>' + global$1.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">' + global$1.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
|
||||
};
|
||||
const makeLink = p => `<a href="${ p.url }" target="_blank" rel="noopener">${ p.name }</a>`;
|
||||
const maybeUrlize = (editor, key) => find(urls, x => {
|
||||
const identifyUnknownPlugin = (editor, key) => {
|
||||
const getMetadata = editor.plugins[key].getMetadata;
|
||||
if (isFunction(getMetadata)) {
|
||||
const metadata = getMetadata();
|
||||
return {
|
||||
name: metadata.name,
|
||||
html: makeLink(metadata)
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
name: key,
|
||||
html: key
|
||||
};
|
||||
}
|
||||
};
|
||||
const getPluginData = (editor, key) => find(urls, x => {
|
||||
return x.key === key;
|
||||
}).fold(() => {
|
||||
const getMetadata = editor.plugins[key].getMetadata;
|
||||
return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
|
||||
return identifyUnknownPlugin(editor, key);
|
||||
}, x => {
|
||||
const name = x.type === 'premium' ? `${ x.name }*` : x.name;
|
||||
return makeLink({
|
||||
const html = makeLink({
|
||||
name,
|
||||
url: `https://www.tiny.cloud/docs/tinymce/6/${ x.slug }/`
|
||||
});
|
||||
return {
|
||||
name,
|
||||
html
|
||||
};
|
||||
});
|
||||
const getPluginKeys = editor => {
|
||||
const keys$1 = keys(editor.plugins);
|
||||
@@ -711,8 +781,9 @@
|
||||
};
|
||||
const pluginLister = editor => {
|
||||
const pluginKeys = getPluginKeys(editor);
|
||||
const pluginLis = map(pluginKeys, key => {
|
||||
return '<li>' + maybeUrlize(editor, key) + '</li>';
|
||||
const sortedPluginData = sort(map(pluginKeys, k => getPluginData(editor, k)), (pd1, pd2) => pd1.name.localeCompare(pd2.name));
|
||||
const pluginLis = map(sortedPluginData, key => {
|
||||
return '<li>' + key.html + '</li>';
|
||||
});
|
||||
const count = pluginLis.length;
|
||||
const pluginsString = pluginLis.join('');
|
||||
@@ -767,14 +838,16 @@
|
||||
const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
|
||||
const newTabs = {};
|
||||
const names = map(tabsFromSettings, t => {
|
||||
if (typeof t === 'string') {
|
||||
var _a;
|
||||
if (isString(t)) {
|
||||
if (has(tabs, t)) {
|
||||
newTabs[t] = tabs[t];
|
||||
}
|
||||
return t;
|
||||
} else {
|
||||
newTabs[t.name] = t;
|
||||
return t.name;
|
||||
const name = (_a = t.name) !== null && _a !== void 0 ? _a : generate('tab-name');
|
||||
newTabs[name] = t;
|
||||
return name;
|
||||
}
|
||||
});
|
||||
return {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+50
-37
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -164,11 +164,9 @@
|
||||
r[i] = x;
|
||||
};
|
||||
const internalFilter = (obj, pred, onTrue, onFalse) => {
|
||||
const r = {};
|
||||
each(obj, (x, i) => {
|
||||
(pred(x, i) ? onTrue : onFalse)(x, i);
|
||||
});
|
||||
return r;
|
||||
};
|
||||
const filter = (obj, pred) => {
|
||||
const t = {};
|
||||
@@ -433,7 +431,8 @@
|
||||
resolve(reader.result);
|
||||
};
|
||||
reader.onerror = () => {
|
||||
reject(reader.error.message);
|
||||
var _a;
|
||||
reject((_a = reader.error) === null || _a === void 0 ? void 0 : _a.message);
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
});
|
||||
@@ -470,16 +469,16 @@
|
||||
}
|
||||
};
|
||||
const getAttrib = (image, name) => {
|
||||
var _a;
|
||||
if (image.hasAttribute(name)) {
|
||||
return image.getAttribute(name);
|
||||
return (_a = image.getAttribute(name)) !== null && _a !== void 0 ? _a : '';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
const getStyle = (image, name) => image.style[name] ? image.style[name] : '';
|
||||
const hasCaption = image => image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';
|
||||
const updateAttrib = (image, name, value) => {
|
||||
if (value === '') {
|
||||
if (value === '' || value === null) {
|
||||
image.removeAttribute(name);
|
||||
} else {
|
||||
image.setAttribute(name, value);
|
||||
@@ -494,8 +493,10 @@
|
||||
};
|
||||
const removeFigure = image => {
|
||||
const figureElm = image.parentNode;
|
||||
DOM.insertAfter(image, figureElm);
|
||||
DOM.remove(figureElm);
|
||||
if (isNonNullable(figureElm)) {
|
||||
DOM.insertAfter(image, figureElm);
|
||||
DOM.remove(figureElm);
|
||||
}
|
||||
};
|
||||
const toggleCaption = image => {
|
||||
if (hasCaption(image)) {
|
||||
@@ -515,8 +516,9 @@
|
||||
}
|
||||
};
|
||||
const setSize = (name, normalizeCss) => (image, name, value) => {
|
||||
if (image.style[name]) {
|
||||
image.style[name] = addPixelSuffix(value);
|
||||
const styles = image.style;
|
||||
if (styles[name]) {
|
||||
styles[name] = addPixelSuffix(value);
|
||||
normalizeStyle(image, normalizeCss);
|
||||
} else {
|
||||
updateAttrib(image, name, value);
|
||||
@@ -546,8 +548,11 @@
|
||||
const setBorderStyle = (image, value) => {
|
||||
image.style.borderStyle = value;
|
||||
};
|
||||
const getBorderStyle = image => getStyle(image, 'borderStyle');
|
||||
const isFigure = elm => elm.nodeName === 'FIGURE';
|
||||
const getBorderStyle = image => {
|
||||
var _a;
|
||||
return (_a = image.style.borderStyle) !== null && _a !== void 0 ? _a : '';
|
||||
};
|
||||
const isFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE';
|
||||
const isImage = elm => elm.nodeName === 'IMG';
|
||||
const getIsDecorative = image => DOM.getAttrib(image, 'alt').length === 0 && DOM.getAttrib(image, 'role') === 'presentation';
|
||||
const getAlt = image => {
|
||||
@@ -573,6 +578,7 @@
|
||||
isDecorative: false
|
||||
});
|
||||
const getStyleValue = (normalizeCss, data) => {
|
||||
var _a;
|
||||
const image = document.createElement('img');
|
||||
updateAttrib(image, 'style', data.style);
|
||||
if (getHspace(image) || data.hspace !== '') {
|
||||
@@ -587,7 +593,7 @@
|
||||
if (getBorderStyle(image) || data.borderStyle !== '') {
|
||||
setBorderStyle(image, data.borderStyle);
|
||||
}
|
||||
return normalizeCss(image.getAttribute('style'));
|
||||
return normalizeCss((_a = image.getAttribute('style')) !== null && _a !== void 0 ? _a : '');
|
||||
};
|
||||
const create = (normalizeCss, data) => {
|
||||
const image = document.createElement('img');
|
||||
@@ -618,12 +624,12 @@
|
||||
hspace: getHspace(image),
|
||||
vspace: getVspace(image),
|
||||
border: getBorder(image),
|
||||
borderStyle: getStyle(image, 'borderStyle'),
|
||||
borderStyle: getBorderStyle(image),
|
||||
isDecorative: getIsDecorative(image)
|
||||
});
|
||||
const updateProp = (image, oldData, newData, name, set) => {
|
||||
if (newData[name] !== oldData[name]) {
|
||||
set(image, name, newData[name]);
|
||||
set(image, name, String(newData[name]));
|
||||
}
|
||||
};
|
||||
const setAlt = (image, alt, isDecorative) => {
|
||||
@@ -687,11 +693,12 @@
|
||||
return imgElm;
|
||||
};
|
||||
const splitTextBlock = (editor, figure) => {
|
||||
var _a;
|
||||
const dom = editor.dom;
|
||||
const textBlockElements = filter(editor.schema.getTextBlockElements(), (_, parentElm) => !editor.schema.isValidChild(parentElm, 'figure'));
|
||||
const textBlock = dom.getParent(figure.parentNode, node => hasNonNullableKey(textBlockElements, node.nodeName), editor.getBody());
|
||||
if (textBlock) {
|
||||
return dom.split(textBlock, figure);
|
||||
return (_a = dom.split(textBlock, figure)) !== null && _a !== void 0 ? _a : figure;
|
||||
} else {
|
||||
return figure;
|
||||
}
|
||||
@@ -731,15 +738,17 @@
|
||||
};
|
||||
const writeImageDataToSelection = (editor, data) => {
|
||||
const image = getSelectedImage(editor);
|
||||
write(css => normalizeCss$1(editor, css), data, image);
|
||||
syncSrcAttr(editor, image);
|
||||
if (isFigure(image.parentNode)) {
|
||||
const figure = image.parentNode;
|
||||
splitTextBlock(editor, figure);
|
||||
editor.selection.select(image.parentNode);
|
||||
} else {
|
||||
editor.selection.select(image);
|
||||
waitLoadImage(editor, data, image);
|
||||
if (image) {
|
||||
write(css => normalizeCss$1(editor, css), data, image);
|
||||
syncSrcAttr(editor, image);
|
||||
if (isFigure(image.parentNode)) {
|
||||
const figure = image.parentNode;
|
||||
splitTextBlock(editor, figure);
|
||||
editor.selection.select(image.parentNode);
|
||||
} else {
|
||||
editor.selection.select(image);
|
||||
waitLoadImage(editor, data, image);
|
||||
}
|
||||
}
|
||||
};
|
||||
const sanitizeImageData = (editor, data) => {
|
||||
@@ -935,7 +944,7 @@
|
||||
const AdvTab = { makeTab: makeTab$2 };
|
||||
|
||||
const collect = editor => {
|
||||
const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url, 'src'));
|
||||
const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url || '', 'src'));
|
||||
const futureImageList = new Promise(completer => {
|
||||
createImageList(editor, imageList => {
|
||||
completer(urlListSanitizer(imageList).map(items => flatten([
|
||||
@@ -1102,7 +1111,7 @@
|
||||
});
|
||||
const toImageData = (data, removeEmptyAlt) => ({
|
||||
src: data.src.value,
|
||||
alt: data.alt.length === 0 && removeEmptyAlt ? null : data.alt,
|
||||
alt: (data.alt === null || data.alt.length === 0) && removeEmptyAlt ? null : data.alt,
|
||||
title: data.title,
|
||||
width: data.dimensions.width,
|
||||
height: data.dimensions.height,
|
||||
@@ -1346,13 +1355,16 @@
|
||||
}));
|
||||
}
|
||||
};
|
||||
const createBlobCache = editor => (file, blobUri, dataUrl) => editor.editorUpload.blobCache.create({
|
||||
blob: file,
|
||||
blobUri,
|
||||
name: file.name ? file.name.replace(/\.[^\.]+$/, '') : null,
|
||||
filename: file.name,
|
||||
base64: dataUrl.split(',')[1]
|
||||
});
|
||||
const createBlobCache = editor => (file, blobUri, dataUrl) => {
|
||||
var _a;
|
||||
return editor.editorUpload.blobCache.create({
|
||||
blob: file,
|
||||
blobUri,
|
||||
name: (_a = file.name) === null || _a === void 0 ? void 0 : _a.replace(/\.[^\.]+$/, ''),
|
||||
filename: file.name,
|
||||
base64: dataUrl.split(',')[1]
|
||||
});
|
||||
};
|
||||
const addToBlobCache = editor => blobInfo => {
|
||||
editor.editorUpload.blobCache.add(blobInfo);
|
||||
};
|
||||
@@ -1363,10 +1375,11 @@
|
||||
const parseStyle = editor => cssText => editor.dom.parseStyle(cssText);
|
||||
const serializeStyle = editor => (stylesArg, name) => editor.dom.serializeStyle(stylesArg, name);
|
||||
const uploadImage = editor => blobInfo => global$1(editor).upload([blobInfo], false).then(results => {
|
||||
var _a;
|
||||
if (results.length === 0) {
|
||||
return Promise.reject('Failed to upload image');
|
||||
} else if (results[0].status === false) {
|
||||
return Promise.reject(results[0].error.message);
|
||||
return Promise.reject((_a = results[0].error) === null || _a === void 0 ? void 0 : _a.message);
|
||||
} else {
|
||||
return results[0];
|
||||
}
|
||||
@@ -1421,7 +1434,7 @@
|
||||
|
||||
const hasImageClass = node => {
|
||||
const className = node.attr('class');
|
||||
return className && /\bimage\b/.test(className);
|
||||
return isNonNullable(className) && /\bimage\b/.test(className);
|
||||
};
|
||||
const toggleContentEditableState = state => nodes => {
|
||||
let i = nodes.length;
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+8
-6
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -163,9 +163,10 @@
|
||||
const selectors = [];
|
||||
const contentCSSUrls = {};
|
||||
const append = (styleSheet, imported) => {
|
||||
let href = styleSheet.href, rules;
|
||||
let href = styleSheet.href;
|
||||
let rules;
|
||||
href = removeCacheSuffix(href);
|
||||
if (!href || !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
|
||||
if (!href || fileFilter && !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
|
||||
return;
|
||||
}
|
||||
global.each(styleSheet.imports, styleSheet => {
|
||||
@@ -202,7 +203,7 @@
|
||||
return selectors;
|
||||
};
|
||||
const defaultConvertSelectorToFormat = (editor, selectorText) => {
|
||||
let format;
|
||||
let format = {};
|
||||
const selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
||||
if (!selector) {
|
||||
return;
|
||||
@@ -262,10 +263,11 @@
|
||||
};
|
||||
const convertSelectorToFormat = (editor, plugin, selector, group) => {
|
||||
let selectorConverter;
|
||||
const converter = getSelectorConverter(editor);
|
||||
if (group && group.selector_converter) {
|
||||
selectorConverter = group.selector_converter;
|
||||
} else if (getSelectorConverter(editor)) {
|
||||
selectorConverter = getSelectorConverter(editor);
|
||||
} else if (converter) {
|
||||
selectorConverter = converter;
|
||||
} else {
|
||||
selectorConverter = () => {
|
||||
return defaultConvertSelectorToFormat(editor, selector);
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void 0===n?void 0:n.name)===o.name)?"string":t;var s,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=("function",e=>"function"==typeof e);var c=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=e=>t=>t.options.get(e),u=p("importcss_merge_classes"),m=p("importcss_exclusive"),f=p("importcss_selector_converter"),y=p("importcss_selector_filter"),d=p("importcss_groups"),h=p("importcss_append"),_=p("importcss_file_filter"),g=p("skin"),v=p("skin_url"),b=Array.prototype.push,x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s;const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=a.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),u(e)?s.classes=n:s.attributes={class:n},s},k=(e,t)=>null===t||m(e),w=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);b.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(r,n))).concat(e);var r,n}}})(),r={},n=T(y(e)),p=(e=>a.map(e,(e=>a.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(d(e)),u=(t,s)=>{if(((e,t,s,r)=>!(k(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{k(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;return o=r&&r.selector_converter?r.selector_converter:f(e)?f(e):()=>S(e,s),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||c.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};a.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let p,u=t.href;if(u=(e=>{const t=l.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&r(u,n)&&!((e,t)=>{const s=g(e);if(s){const r=v(e),o=r?e.documentBaseURI.toAbsolute(r):i.baseURL+"/skins/ui/"+s,n=i.baseURL+"/skins/content/";return t===o+"/content"+(e.inline?".inline":"")+".min.css"||-1!==t.indexOf(n)}return!1})(e,u)){a.each(t.imports,(e=>{c(e,!0)}));try{p=t.cssRules||t.rules}catch(e){}a.each(p,(e=>{e.styleSheet?c(e.styleSheet,!0):e.selectorText&&a.each(e.selectorText.split(","),(e=>{o.push(a.trim(e))}))}))}};a.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{a.each(t.styleSheets,(e=>{c(e)}))}catch(e){}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>a.grep(e,(e=>!e.filter||e.filter(t))))(p,e);if(s.length>0)a.each(s,(s=>{const r=u(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=u(e,null);s&&t.addItem(s)}}}));const m=t.toFormats();e.dispatch("addStyleModifications",{items:m,replace:!h(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),w(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void 0===n?void 0:n.name)===o.name)?"string":t;var s,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=("function",e=>"function"==typeof e);var c=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=e=>t=>t.options.get(e),u=p("importcss_merge_classes"),m=p("importcss_exclusive"),f=p("importcss_selector_converter"),y=p("importcss_selector_filter"),d=p("importcss_groups"),h=p("importcss_append"),_=p("importcss_file_filter"),g=p("skin"),v=p("skin_url"),b=Array.prototype.push,x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s={};const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=a.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),u(e)?s.classes=n:s.attributes={class:n},s},k=(e,t)=>null===t||m(e),w=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);b.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(r,n))).concat(e);var r,n}}})(),r={},n=T(y(e)),p=(e=>a.map(e,(e=>a.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(d(e)),u=(t,s)=>{if(((e,t,s,r)=>!(k(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{k(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;const n=f(e);return o=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||c.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};a.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let p,u=t.href;if(u=(e=>{const t=l.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{const s=g(e);if(s){const r=v(e),o=r?e.documentBaseURI.toAbsolute(r):i.baseURL+"/skins/ui/"+s,n=i.baseURL+"/skins/content/";return t===o+"/content"+(e.inline?".inline":"")+".min.css"||-1!==t.indexOf(n)}return!1})(e,u)){a.each(t.imports,(e=>{c(e,!0)}));try{p=t.cssRules||t.rules}catch(e){}a.each(p,(e=>{e.styleSheet?c(e.styleSheet,!0):e.selectorText&&a.each(e.selectorText.split(","),(e=>{o.push(a.trim(e))}))}))}};a.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{a.each(t.styleSheets,(e=>{c(e)}))}catch(e){}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>a.grep(e,(e=>!e.filter||e.filter(t))))(p,e);if(s.length>0)a.each(s,(s=>{const r=u(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=u(e,null);s&&t.addItem(s)}}}));const m=t.toFormats();e.dispatch("addStyleModifications",{items:m,replace:!h(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),w(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -75,8 +75,7 @@
|
||||
};
|
||||
const updateElement = (editor, timeElm, computerTime, userTime) => {
|
||||
const newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
|
||||
timeElm.parentNode.insertBefore(newTimeElm, timeElm);
|
||||
editor.dom.remove(timeElm);
|
||||
editor.dom.replace(newTimeElm, timeElm);
|
||||
editor.selection.select(newTimeElm, true);
|
||||
editor.selection.collapse(false);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),r=t("insertdatetime_dateformat"),a=t("insertdatetime_timeformat"),n=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(let r=0;r<t-e.length;r++)e="0"+e;return e},d=(e,t,r=new Date)=>(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+r.getFullYear())).replace("%y",""+r.getYear())).replace("%m",c(r.getMonth()+1,2))).replace("%d",c(r.getDate(),2))).replace("%H",""+c(r.getHours(),2))).replace("%M",""+c(r.getMinutes(),2))).replace("%S",""+c(r.getSeconds(),2))).replace("%I",""+((r.getHours()+11)%12+1))).replace("%p",r.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[r.getMonth()]))).replace("%b",""+e.translate(l[r.getMonth()]))).replace("%A",""+e.translate(o[r.getDay()]))).replace("%a",""+e.translate(i[r.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)){const r=d(e,t);let a;a=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const n=e.dom.getParent(e.selection.getStart(),"time");n?((e,t,r,a)=>{const n=e.dom.create("time",{datetime:r},a);t.parentNode.insertBefore(n,t),e.dom.remove(t),e.selection.select(n,!0),e.selection.collapse(!1)})(e,n,a,r):e.insertContent('<time datetime="'+a+'">'+r+"</time>")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,a)=>{u(e,null!=a?a:r(e))})),e.addCommand("mceInsertTime",((t,r)=>{u(e,null!=r?r:a(e))}))})(e),(e=>{const t=n(e),r=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=n(e);return t.length>0?t[0]:a(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===r.get(),fetch:r=>{r(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(r.get())},onItemAction:(e,t)=>{r.set(t),s(t)}});const i=e=>()=>{r.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)})))})})(e)}))}();
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),a=t("insertdatetime_dateformat"),r=t("insertdatetime_timeformat"),n=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(let a=0;a<t-e.length;a++)e="0"+e;return e},d=(e,t,a=new Date)=>(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",c(a.getMonth()+1,2))).replace("%d",c(a.getDate(),2))).replace("%H",""+c(a.getHours(),2))).replace("%M",""+c(a.getMinutes(),2))).replace("%S",""+c(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[a.getMonth()]))).replace("%b",""+e.translate(l[a.getMonth()]))).replace("%A",""+e.translate(o[a.getDay()]))).replace("%a",""+e.translate(i[a.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)){const a=d(e,t);let r;r=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const n=e.dom.getParent(e.selection.getStart(),"time");n?((e,t,a,r)=>{const n=e.dom.create("time",{datetime:a},r);e.dom.replace(n,t),e.selection.select(n,!0),e.selection.collapse(!1)})(e,n,r,a):e.insertContent('<time datetime="'+r+'">'+a+"</time>")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,r)=>{u(e,null!=r?r:a(e))})),e.addCommand("mceInsertTime",((t,a)=>{u(e,null!=a?a:r(e))}))})(e),(e=>{const t=n(e),a=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=n(e);return t.length>0?t[0]:r(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===a.get(),fetch:a=>{a(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(a.get())},onItemAction:(e,t)=>{a.set(t),s(t)}});const i=e=>()=>{a.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)})))})})(e)}))}();
|
||||
+57
-43
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -52,6 +52,11 @@
|
||||
|
||||
const noop = () => {
|
||||
};
|
||||
const constant = value => {
|
||||
return () => {
|
||||
return value;
|
||||
};
|
||||
};
|
||||
const tripleEquals = (a, b) => {
|
||||
return a === b;
|
||||
};
|
||||
@@ -348,11 +353,9 @@
|
||||
r[i] = x;
|
||||
};
|
||||
const internalFilter = (obj, pred, onTrue, onFalse) => {
|
||||
const r = {};
|
||||
each(obj, (x, i) => {
|
||||
(pred(x, i) ? onTrue : onFalse)(x, i);
|
||||
});
|
||||
return r;
|
||||
};
|
||||
const filter = (obj, pred) => {
|
||||
const t = {};
|
||||
@@ -366,16 +369,17 @@
|
||||
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');
|
||||
|
||||
const isAnchor = elm => elm && elm.nodeName.toLowerCase() === 'a';
|
||||
const isAnchor = elm => isNonNullable(elm) && elm.nodeName.toLowerCase() === 'a';
|
||||
const isLink = elm => isAnchor(elm) && !!getHref(elm);
|
||||
const collectNodesInRange = (rng, predicate) => {
|
||||
if (rng.collapsed) {
|
||||
return [];
|
||||
} else {
|
||||
const contents = rng.cloneContents();
|
||||
const walker = new global$3(contents.firstChild, contents);
|
||||
const firstChild = contents.firstChild;
|
||||
const walker = new global$3(firstChild, contents);
|
||||
const elements = [];
|
||||
let current = contents.firstChild;
|
||||
let current = firstChild;
|
||||
do {
|
||||
if (predicate(current)) {
|
||||
elements.push(current);
|
||||
@@ -386,8 +390,8 @@
|
||||
};
|
||||
const hasProtocol = url => /^\w+:/i.test(url);
|
||||
const getHref = elm => {
|
||||
const href = elm.getAttribute('data-mce-href');
|
||||
return href ? href : elm.getAttribute('href');
|
||||
var _a, _b;
|
||||
return (_b = (_a = elm.getAttribute('data-mce-href')) !== null && _a !== void 0 ? _a : elm.getAttribute('href')) !== null && _b !== void 0 ? _b : '';
|
||||
};
|
||||
const applyRelTargetRules = (rel, isUnsafe) => {
|
||||
const rules = ['noopener'];
|
||||
@@ -405,13 +409,14 @@
|
||||
const getAnchorElement = (editor, selectedElm) => {
|
||||
selectedElm = selectedElm || editor.selection.getNode();
|
||||
if (isImageFigure(selectedElm)) {
|
||||
return editor.dom.select('a[href]', selectedElm)[0];
|
||||
return Optional.from(editor.dom.select('a[href]', selectedElm)[0]);
|
||||
} else {
|
||||
return editor.dom.getParent(selectedElm, 'a[href]');
|
||||
return Optional.from(editor.dom.getParent(selectedElm, 'a[href]'));
|
||||
}
|
||||
};
|
||||
const isInAnchor = (editor, selectedElm) => getAnchorElement(editor, selectedElm).isSome();
|
||||
const getAnchorText = (selection, anchorElm) => {
|
||||
const text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
|
||||
const text = anchorElm.fold(() => selection.getContent({ format: 'text' }), anchorElm => anchorElm.innerText || anchorElm.textContent || '');
|
||||
return trimCaretContainers(text);
|
||||
};
|
||||
const hasLinks = elements => global$4.grep(elements, isLink).length > 0;
|
||||
@@ -422,7 +427,7 @@
|
||||
const elements = collectNodesInRange(editor.selection.getRng(), isElement);
|
||||
return elements.length === 0;
|
||||
};
|
||||
const isImageFigure = elm => elm && elm.nodeName === 'FIGURE' && /\bimage\b/i.test(elm.className);
|
||||
const isImageFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE' && /\bimage\b/i.test(elm.className);
|
||||
const getLinkAttrs = data => {
|
||||
const attrs = [
|
||||
'title',
|
||||
@@ -467,13 +472,14 @@
|
||||
editor.selection.select(anchorElm);
|
||||
};
|
||||
const createLink = (editor, selectedElm, text, linkAttrs) => {
|
||||
const dom = editor.dom;
|
||||
if (isImageFigure(selectedElm)) {
|
||||
linkImageFigure(editor, selectedElm, linkAttrs);
|
||||
linkImageFigure(dom, selectedElm, linkAttrs);
|
||||
} else {
|
||||
text.fold(() => {
|
||||
editor.execCommand('mceInsertLink', false, linkAttrs);
|
||||
}, text => {
|
||||
editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(text)));
|
||||
editor.insertContent(dom.createHTML('a', linkAttrs, dom.encode(text)));
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -485,12 +491,12 @@
|
||||
if (data.href === attachState.href) {
|
||||
attachState.attach();
|
||||
}
|
||||
if (anchorElm) {
|
||||
editor.focus();
|
||||
updateLink(editor, anchorElm, data.text, linkAttrs);
|
||||
} else {
|
||||
anchorElm.fold(() => {
|
||||
createLink(editor, selectedElm, data.text, linkAttrs);
|
||||
}
|
||||
}, elm => {
|
||||
editor.focus();
|
||||
updateLink(editor, elm, data.text, linkAttrs);
|
||||
});
|
||||
});
|
||||
};
|
||||
const unlinkSelection = editor => {
|
||||
@@ -559,20 +565,22 @@
|
||||
editor.hasPlugin('rtc', true) ? editor.execCommand('unlink') : unlinkDomMutation(editor);
|
||||
};
|
||||
const unlinkImageFigure = (editor, fig) => {
|
||||
var _a;
|
||||
const img = editor.dom.select('img', fig)[0];
|
||||
if (img) {
|
||||
const a = editor.dom.getParents(img, 'a[href]', fig)[0];
|
||||
if (a) {
|
||||
a.parentNode.insertBefore(img, a);
|
||||
(_a = a.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(img, a);
|
||||
editor.dom.remove(a);
|
||||
}
|
||||
}
|
||||
};
|
||||
const linkImageFigure = (editor, fig, attrs) => {
|
||||
const img = editor.dom.select('img', fig)[0];
|
||||
const linkImageFigure = (dom, fig, attrs) => {
|
||||
var _a;
|
||||
const img = dom.select('img', fig)[0];
|
||||
if (img) {
|
||||
const a = editor.dom.create('a', attrs);
|
||||
img.parentNode.insertBefore(a, img);
|
||||
const a = dom.create('a', attrs);
|
||||
(_a = img.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(a, img);
|
||||
a.appendChild(img);
|
||||
}
|
||||
};
|
||||
@@ -613,8 +621,14 @@
|
||||
text: initialData.text,
|
||||
title: initialData.title
|
||||
};
|
||||
const getTitleFromUrlChange = url => someIf(persistentData.title.length <= 0, Optional.from(url.meta.title).getOr(''));
|
||||
const getTextFromUrlChange = url => someIf(persistentData.text.length <= 0, Optional.from(url.meta.text).getOr(url.value));
|
||||
const getTitleFromUrlChange = url => {
|
||||
var _a;
|
||||
return someIf(persistentData.title.length <= 0, Optional.from((_a = url.meta) === null || _a === void 0 ? void 0 : _a.title).getOr(''));
|
||||
};
|
||||
const getTextFromUrlChange = url => {
|
||||
var _a;
|
||||
return someIf(persistentData.text.length <= 0, Optional.from((_a = url.meta) === null || _a === void 0 ? void 0 : _a.text).getOr(url.value));
|
||||
};
|
||||
const onUrlChange = data => {
|
||||
const text = getTextFromUrlChange(data.url);
|
||||
const title = getTitleFromUrlChange(data.url);
|
||||
@@ -628,8 +642,8 @@
|
||||
}
|
||||
};
|
||||
const onCatalogChange = (data, change) => {
|
||||
const catalog = findCatalog(linkCatalog, change.name).getOr([]);
|
||||
return getDelta(persistentData.text, change.name, catalog, data);
|
||||
const catalog = findCatalog(linkCatalog, change).getOr([]);
|
||||
return getDelta(persistentData.text, change, catalog, data);
|
||||
};
|
||||
const onChange = (getData, change) => {
|
||||
const name = change.name;
|
||||
@@ -639,7 +653,7 @@
|
||||
'anchor',
|
||||
'link'
|
||||
], name)) {
|
||||
return onCatalogChange(getData(), change);
|
||||
return onCatalogChange(getData(), name);
|
||||
} else if (name === 'text' || name === 'title') {
|
||||
persistentData[name] = getData()[name];
|
||||
return Optional.none();
|
||||
@@ -730,7 +744,7 @@
|
||||
}
|
||||
};
|
||||
const getLinks = editor => {
|
||||
const extractor = item => editor.convertURL(item.value || item.url, 'href');
|
||||
const extractor = item => editor.convertURL(item.value || item.url || '', 'href');
|
||||
const linkList = getLinkList(editor);
|
||||
return new Promise(resolve => {
|
||||
if (isString(linkList)) {
|
||||
@@ -796,11 +810,11 @@
|
||||
const dom = editor.dom;
|
||||
const onlyText = isOnlyTextSelected(editor);
|
||||
const text = onlyText ? Optional.some(getAnchorText(editor.selection, anchor)) : Optional.none();
|
||||
const url = anchor ? Optional.some(dom.getAttrib(anchor, 'href')) : Optional.none();
|
||||
const target = anchor ? Optional.from(dom.getAttrib(anchor, 'target')) : Optional.none();
|
||||
const rel = nonEmptyAttr(dom, anchor, 'rel');
|
||||
const linkClass = nonEmptyAttr(dom, anchor, 'class');
|
||||
const title = nonEmptyAttr(dom, anchor, 'title');
|
||||
const url = anchor.bind(anchorElm => Optional.from(dom.getAttrib(anchorElm, 'href')));
|
||||
const target = anchor.bind(anchorElm => Optional.from(dom.getAttrib(anchorElm, 'target')));
|
||||
const rel = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'rel'));
|
||||
const linkClass = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'class'));
|
||||
const title = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'title'));
|
||||
return {
|
||||
url,
|
||||
text,
|
||||
@@ -821,7 +835,7 @@
|
||||
anchor: AnchorListOptions.getAnchors(editor),
|
||||
link: links
|
||||
},
|
||||
optNode: Optional.from(linkNode),
|
||||
optNode: linkNode,
|
||||
flags: { titleEnabled: shouldShowLinkTitle(editor) }
|
||||
};
|
||||
});
|
||||
@@ -1019,12 +1033,12 @@
|
||||
return () => editor.off('NodeChange', toggler);
|
||||
};
|
||||
const toggleActiveState = editor => api => {
|
||||
const updateState = () => api.setActive(!editor.mode.isReadOnly() && getAnchorElement(editor, editor.selection.getNode()) !== null);
|
||||
const updateState = () => api.setActive(!editor.mode.isReadOnly() && isInAnchor(editor, editor.selection.getNode()));
|
||||
updateState();
|
||||
return toggleState(editor, updateState);
|
||||
};
|
||||
const toggleEnabledState = editor => api => {
|
||||
const updateState = () => api.setEnabled(getAnchorElement(editor, editor.selection.getNode()) !== null);
|
||||
const updateState = () => api.setEnabled(isInAnchor(editor, editor.selection.getNode()));
|
||||
updateState();
|
||||
return toggleState(editor, updateState);
|
||||
};
|
||||
@@ -1092,13 +1106,13 @@
|
||||
};
|
||||
const onSetupLink = buttonApi => {
|
||||
const node = editor.selection.getNode();
|
||||
buttonApi.setEnabled(getAnchorElement(editor, node) !== null);
|
||||
buttonApi.setEnabled(isInAnchor(editor, node));
|
||||
return noop;
|
||||
};
|
||||
const getLinkText = value => {
|
||||
const anchor = getAnchorElement(editor);
|
||||
const onlyText = isOnlyTextSelected(editor);
|
||||
if (!anchor && onlyText) {
|
||||
if (anchor.isNone() && onlyText) {
|
||||
const text = getAnchorText(editor.selection, anchor);
|
||||
return Optional.some(text.length > 0 ? text : value);
|
||||
} else {
|
||||
@@ -1113,10 +1127,10 @@
|
||||
onSetup: toggleActiveState(editor)
|
||||
},
|
||||
label: 'Link',
|
||||
predicate: node => !!getAnchorElement(editor, node) && hasContextToolbar(editor),
|
||||
predicate: node => hasContextToolbar(editor) && isInAnchor(editor, node),
|
||||
initValue: () => {
|
||||
const elm = getAnchorElement(editor);
|
||||
return !!elm ? getHref(elm) : '';
|
||||
return elm.fold(constant(''), getHref);
|
||||
},
|
||||
commands: [
|
||||
{
|
||||
@@ -1126,7 +1140,7 @@
|
||||
primary: true,
|
||||
onSetup: buttonApi => {
|
||||
const node = editor.selection.getNode();
|
||||
buttonApi.setActive(!!getAnchorElement(editor, node));
|
||||
buttonApi.setActive(isInAnchor(editor, node));
|
||||
return toggleActiveState(editor)(buttonApi);
|
||||
},
|
||||
onAction: formApi => {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+120
-74
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -272,30 +272,30 @@
|
||||
console.error(message, html);
|
||||
throw new Error(message);
|
||||
}
|
||||
return fromDom(div.childNodes[0]);
|
||||
return fromDom$1(div.childNodes[0]);
|
||||
};
|
||||
const fromTag = (tag, scope) => {
|
||||
const doc = scope || document;
|
||||
const node = doc.createElement(tag);
|
||||
return fromDom(node);
|
||||
return fromDom$1(node);
|
||||
};
|
||||
const fromText = (text, scope) => {
|
||||
const doc = scope || document;
|
||||
const node = doc.createTextNode(text);
|
||||
return fromDom(node);
|
||||
return fromDom$1(node);
|
||||
};
|
||||
const fromDom = node => {
|
||||
const fromDom$1 = node => {
|
||||
if (node === null || node === undefined) {
|
||||
throw new Error('Node cannot be null or undefined');
|
||||
}
|
||||
return { dom: node };
|
||||
};
|
||||
const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
|
||||
const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$1);
|
||||
const SugarElement = {
|
||||
fromHtml,
|
||||
fromTag,
|
||||
fromText,
|
||||
fromDom,
|
||||
fromDom: fromDom$1,
|
||||
fromPoint
|
||||
};
|
||||
|
||||
@@ -345,10 +345,11 @@
|
||||
};
|
||||
const type = element => element.dom.nodeType;
|
||||
const isType = t => element => type(element) === t;
|
||||
const isElement = isType(ELEMENT);
|
||||
const isTag = tag => e => isElement(e) && name(e) === tag;
|
||||
const isElement$1 = isType(ELEMENT);
|
||||
const isTag = tag => e => isElement$1(e) && name(e) === tag;
|
||||
|
||||
const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
|
||||
const parentElement = element => Optional.from(element.dom.parentElement).map(SugarElement.fromDom);
|
||||
const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);
|
||||
const children = element => map(element.dom.childNodes, SugarElement.fromDom);
|
||||
const child = (element, index) => {
|
||||
@@ -428,6 +429,8 @@
|
||||
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
||||
|
||||
const fromDom = nodes => map(nodes, SugarElement.fromDom);
|
||||
|
||||
const keys = Object.keys;
|
||||
const each = (obj, f) => {
|
||||
const props = keys(obj);
|
||||
@@ -441,11 +444,9 @@
|
||||
r[i] = x;
|
||||
};
|
||||
const internalFilter = (obj, pred, onTrue, onFalse) => {
|
||||
const r = {};
|
||||
each(obj, (x, i) => {
|
||||
(pred(x, i) ? onTrue : onFalse)(x, i);
|
||||
});
|
||||
return r;
|
||||
};
|
||||
const filter = (obj, pred) => {
|
||||
const t = {};
|
||||
@@ -493,9 +494,10 @@
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
const matchNodeName = name => node => node && node.nodeName.toLowerCase() === name;
|
||||
const matchNodeNames = regex => node => node && regex.test(node.nodeName);
|
||||
const isTextNode = node => node && node.nodeType === 3;
|
||||
const matchNodeName = name => node => isNonNullable(node) && node.nodeName.toLowerCase() === name;
|
||||
const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);
|
||||
const isTextNode = node => isNonNullable(node) && node.nodeType === 3;
|
||||
const isElement = node => isNonNullable(node) && node.nodeType === 1;
|
||||
const isListNode = matchNodeNames(/^(OL|UL|DL)$/);
|
||||
const isOlUlNode = matchNodeNames(/^(OL|UL)$/);
|
||||
const isOlNode = matchNodeName('ol');
|
||||
@@ -503,9 +505,12 @@
|
||||
const isDlItemNode = matchNodeNames(/^(DT|DD)$/);
|
||||
const isTableCellNode = matchNodeNames(/^(TH|TD)$/);
|
||||
const isBr = matchNodeName('br');
|
||||
const isFirstChild = node => node.parentNode.firstChild === node;
|
||||
const isTextBlock = (editor, node) => node && !!editor.schema.getTextBlockElements()[node.nodeName];
|
||||
const isBlock = (node, blockElements) => node && node.nodeName in blockElements;
|
||||
const isFirstChild = node => {
|
||||
var _a;
|
||||
return ((_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === node;
|
||||
};
|
||||
const isTextBlock = (editor, node) => isNonNullable(node) && node.nodeName in editor.schema.getTextBlockElements();
|
||||
const isBlock = (node, blockElements) => isNonNullable(node) && node.nodeName in blockElements;
|
||||
const isBogusBr = (dom, node) => {
|
||||
if (!isBr(node)) {
|
||||
return false;
|
||||
@@ -539,7 +544,9 @@
|
||||
const fragment = dom.createFragment();
|
||||
const blockName = getForcedRootBlock(editor);
|
||||
const blockAttrs = getForcedRootBlockAttrs(editor);
|
||||
let node, textBlock, hasContentNode;
|
||||
let node;
|
||||
let textBlock;
|
||||
let hasContentNode = false;
|
||||
textBlock = dom.create(blockName, blockAttrs);
|
||||
if (!isBlock(contentNode.firstChild, blockElements)) {
|
||||
fragment.appendChild(textBlock);
|
||||
@@ -560,7 +567,7 @@
|
||||
textBlock.appendChild(node);
|
||||
}
|
||||
}
|
||||
if (!hasContentNode) {
|
||||
if (!hasContentNode && textBlock) {
|
||||
textBlock.appendChild(dom.create('br', { 'data-mce-bogus': '1' }));
|
||||
}
|
||||
return fragment;
|
||||
@@ -569,9 +576,12 @@
|
||||
const DOM$2 = global$2.DOM;
|
||||
const splitList = (editor, list, li) => {
|
||||
const removeAndKeepBookmarks = targetNode => {
|
||||
global$1.each(bookmarks, node => {
|
||||
targetNode.parentNode.insertBefore(node, li.parentNode);
|
||||
});
|
||||
const parent = targetNode.parentNode;
|
||||
if (parent) {
|
||||
global$1.each(bookmarks, node => {
|
||||
parent.insertBefore(node, li.parentNode);
|
||||
});
|
||||
}
|
||||
DOM$2.remove(targetNode);
|
||||
};
|
||||
const bookmarks = DOM$2.select('span[data-mce-type="bookmark"]', list);
|
||||
@@ -590,8 +600,9 @@
|
||||
DOM$2.insertAfter(fragment, list);
|
||||
}
|
||||
DOM$2.insertAfter(newBlock, list);
|
||||
if (isEmpty$1(editor.dom, li.parentNode)) {
|
||||
removeAndKeepBookmarks(li.parentNode);
|
||||
const parent = li.parentElement;
|
||||
if (parent && isEmpty$1(editor.dom, parent)) {
|
||||
removeAndKeepBookmarks(parent);
|
||||
}
|
||||
DOM$2.remove(li);
|
||||
if (isEmpty$1(editor.dom, list)) {
|
||||
@@ -605,7 +616,7 @@
|
||||
if (isDescriptionDetail(item)) {
|
||||
mutate(item, 'dt');
|
||||
} else if (isDescriptionTerm(item)) {
|
||||
parent(item).each(dl => splitList(editor, dl.dom, item.dom));
|
||||
parentElement(item).each(dl => splitList(editor, dl.dom, item.dom));
|
||||
}
|
||||
};
|
||||
const indentDlItem = item => {
|
||||
@@ -669,7 +680,7 @@
|
||||
const selectionStart = node || editor.selection.getStart(true);
|
||||
return editor.dom.getParent(selectionStart, listSelector, getClosestListHost(editor, selectionStart));
|
||||
};
|
||||
const isParentListSelected = (parentList, selectedBlocks) => parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
|
||||
const isParentListSelected = (parentList, selectedBlocks) => isNonNullable(parentList) && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
|
||||
const findSubLists = parentList => filter$1(parentList.querySelectorAll(listSelector), isListNode);
|
||||
const getSelectedSubLists = editor => {
|
||||
const parentList = getParentList(editor);
|
||||
@@ -722,6 +733,27 @@
|
||||
return unique(listRoots);
|
||||
};
|
||||
|
||||
const isCustomList = list => /\btox\-/.test(list.className);
|
||||
const inList = (parents, listName) => findUntil(parents, isListNode, isTableCellNode).exists(list => list.nodeName === listName && !isCustomList(list));
|
||||
const isWithinNonEditable = (editor, element) => element !== null && editor.dom.getContentEditableParent(element) === 'false';
|
||||
const selectionIsWithinNonEditableList = editor => {
|
||||
const parentList = getParentList(editor);
|
||||
return isWithinNonEditable(editor, parentList);
|
||||
};
|
||||
const isWithinNonEditableList = (editor, element) => {
|
||||
const parentList = editor.dom.getParent(element, 'ol,ul,dl');
|
||||
return isWithinNonEditable(editor, parentList);
|
||||
};
|
||||
const setNodeChangeHandler = (editor, nodeChangeHandler) => {
|
||||
const initialNode = editor.selection.getNode();
|
||||
nodeChangeHandler({
|
||||
parents: editor.dom.getParents(initialNode),
|
||||
element: initialNode
|
||||
});
|
||||
editor.on('NodeChange', nodeChangeHandler);
|
||||
return () => editor.off('NodeChange', nodeChangeHandler);
|
||||
};
|
||||
|
||||
const fromElements = (elements, scope) => {
|
||||
const doc = scope || document;
|
||||
const fragment = doc.createDocumentFragment();
|
||||
@@ -843,7 +875,7 @@
|
||||
const content = hasLastChildList(li) ? children$1.slice(0, -1) : children$1;
|
||||
return map(content, deep);
|
||||
};
|
||||
const createEntry = (li, depth, isSelected) => parent(li).filter(isElement).map(list => ({
|
||||
const createEntry = (li, depth, isSelected) => parent(li).filter(isElement$1).map(list => ({
|
||||
depth,
|
||||
dirty: false,
|
||||
isSelected,
|
||||
@@ -973,8 +1005,8 @@
|
||||
};
|
||||
|
||||
const selectionIndentation = (editor, indentation) => {
|
||||
const lists = map(getSelectedListRoots(editor), SugarElement.fromDom);
|
||||
const dlItems = map(getSelectedDlItems(editor), SugarElement.fromDom);
|
||||
const lists = fromDom(getSelectedListRoots(editor));
|
||||
const dlItems = fromDom(getSelectedDlItems(editor));
|
||||
let isHandled = false;
|
||||
if (lists.length || dlItems.length) {
|
||||
const bookmark = editor.selection.getBookmark();
|
||||
@@ -987,9 +1019,10 @@
|
||||
}
|
||||
return isHandled;
|
||||
};
|
||||
const indentListSelection = editor => selectionIndentation(editor, 'Indent');
|
||||
const outdentListSelection = editor => selectionIndentation(editor, 'Outdent');
|
||||
const flattenListSelection = editor => selectionIndentation(editor, 'Flatten');
|
||||
const handleIndentation = (editor, indentation) => !selectionIsWithinNonEditableList(editor) && selectionIndentation(editor, indentation);
|
||||
const indentListSelection = editor => handleIndentation(editor, 'Indent');
|
||||
const outdentListSelection = editor => handleIndentation(editor, 'Outdent');
|
||||
const flattenListSelection = editor => handleIndentation(editor, 'Flatten');
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');
|
||||
|
||||
@@ -999,7 +1032,7 @@
|
||||
const setupEndPoint = start => {
|
||||
let container = rng[start ? 'startContainer' : 'endContainer'];
|
||||
let offset = rng[start ? 'startOffset' : 'endOffset'];
|
||||
if (container.nodeType === 1) {
|
||||
if (isElement(container)) {
|
||||
const offsetNode = DOM$1.create('span', { 'data-mce-type': 'bookmark' });
|
||||
if (container.hasChildNodes()) {
|
||||
offset = Math.min(offset, container.childNodes.length - 1);
|
||||
@@ -1025,26 +1058,28 @@
|
||||
};
|
||||
const resolveBookmark = bookmark => {
|
||||
const restoreEndPoint = start => {
|
||||
let node;
|
||||
const nodeIndex = container => {
|
||||
let node = container.parentNode.firstChild, idx = 0;
|
||||
var _a;
|
||||
let node = (_a = container.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild;
|
||||
let idx = 0;
|
||||
while (node) {
|
||||
if (node === container) {
|
||||
return idx;
|
||||
}
|
||||
if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') {
|
||||
if (!isElement(node) || node.getAttribute('data-mce-type') !== 'bookmark') {
|
||||
idx++;
|
||||
}
|
||||
node = node.nextSibling;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
let container = node = bookmark[start ? 'startContainer' : 'endContainer'];
|
||||
let container = bookmark[start ? 'startContainer' : 'endContainer'];
|
||||
let offset = bookmark[start ? 'startOffset' : 'endOffset'];
|
||||
if (!container) {
|
||||
return;
|
||||
}
|
||||
if (container.nodeType === 1) {
|
||||
if (isElement(container) && container.parentNode) {
|
||||
const node = container;
|
||||
offset = nodeIndex(container);
|
||||
container = container.parentNode;
|
||||
DOM$1.remove(node);
|
||||
@@ -1076,18 +1111,6 @@
|
||||
}
|
||||
};
|
||||
|
||||
const isCustomList = list => /\btox\-/.test(list.className);
|
||||
const listState = (editor, listName, activate) => {
|
||||
const nodeChangeHandler = e => {
|
||||
const inList = findUntil(e.parents, isListNode, isTableCellNode).filter(list => list.nodeName === listName && !isCustomList(list)).isSome();
|
||||
activate(inList);
|
||||
};
|
||||
const parents = editor.dom.getParents(editor.selection.getNode());
|
||||
nodeChangeHandler({ parents });
|
||||
editor.on('NodeChange', nodeChangeHandler);
|
||||
return () => editor.off('NodeChange', nodeChangeHandler);
|
||||
};
|
||||
|
||||
const updateListStyle = (dom, el, detail) => {
|
||||
const type = detail['list-style-type'] ? detail['list-style-type'] : null;
|
||||
dom.setStyle(el, 'list-style-type', type);
|
||||
@@ -1113,20 +1136,21 @@
|
||||
const getEndPointNode = (editor, rng, start, root) => {
|
||||
let container = rng[start ? 'startContainer' : 'endContainer'];
|
||||
const offset = rng[start ? 'startOffset' : 'endOffset'];
|
||||
if (container.nodeType === 1) {
|
||||
if (isElement(container)) {
|
||||
container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
|
||||
}
|
||||
if (!start && isBr(container.nextSibling)) {
|
||||
container = container.nextSibling;
|
||||
}
|
||||
while (container.parentNode !== root) {
|
||||
const parent = container.parentNode;
|
||||
if (isTextBlock(editor, container)) {
|
||||
return container;
|
||||
}
|
||||
if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
|
||||
if (/^(TD|TH)$/.test(parent.nodeName)) {
|
||||
return container;
|
||||
}
|
||||
container = container.parentNode;
|
||||
container = parent;
|
||||
}
|
||||
return container;
|
||||
};
|
||||
@@ -1144,6 +1168,7 @@
|
||||
}
|
||||
}
|
||||
global$1.each(siblings, node => {
|
||||
var _a;
|
||||
if (isTextBlock(editor, node)) {
|
||||
textBlocks.push(node);
|
||||
block = null;
|
||||
@@ -1165,7 +1190,7 @@
|
||||
}
|
||||
if (!block) {
|
||||
block = dom.create('p');
|
||||
node.parentNode.insertBefore(block, node);
|
||||
(_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(block, node);
|
||||
textBlocks.push(block);
|
||||
}
|
||||
block.appendChild(node);
|
||||
@@ -1203,7 +1228,7 @@
|
||||
sibling.appendChild(block);
|
||||
} else {
|
||||
listBlock = dom.create(listName);
|
||||
block.parentNode.insertBefore(listBlock, block);
|
||||
parent.insertBefore(listBlock, block);
|
||||
listBlock.appendChild(block);
|
||||
block = dom.rename(block, listItemName);
|
||||
}
|
||||
@@ -1226,7 +1251,7 @@
|
||||
editor.selection.setRng(resolveBookmark(bookmark));
|
||||
};
|
||||
const isValidLists = (list1, list2) => {
|
||||
return list1 && list2 && isListNode(list1) && list1.nodeName === list2.nodeName;
|
||||
return isListNode(list1) && list1.nodeName === (list2 === null || list2 === void 0 ? void 0 : list2.nodeName);
|
||||
};
|
||||
const hasSameListStyle = (dom, list1, list2) => {
|
||||
const targetStyle = dom.getStyle(list1, 'list-style-type', true);
|
||||
@@ -1240,20 +1265,22 @@
|
||||
return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
|
||||
};
|
||||
const mergeWithAdjacentLists = (dom, listBlock) => {
|
||||
let sibling, node;
|
||||
sibling = listBlock.nextSibling;
|
||||
let node;
|
||||
let sibling = listBlock.nextSibling;
|
||||
if (shouldMerge(dom, listBlock, sibling)) {
|
||||
while (node = sibling.firstChild) {
|
||||
const liSibling = sibling;
|
||||
while (node = liSibling.firstChild) {
|
||||
listBlock.appendChild(node);
|
||||
}
|
||||
dom.remove(sibling);
|
||||
dom.remove(liSibling);
|
||||
}
|
||||
sibling = listBlock.previousSibling;
|
||||
if (shouldMerge(dom, listBlock, sibling)) {
|
||||
while (node = sibling.lastChild) {
|
||||
const liSibling = sibling;
|
||||
while (node = liSibling.lastChild) {
|
||||
listBlock.insertBefore(node, listBlock.firstChild);
|
||||
}
|
||||
dom.remove(sibling);
|
||||
dom.remove(liSibling);
|
||||
}
|
||||
};
|
||||
const updateList$1 = (editor, list, listName, detail) => {
|
||||
@@ -1309,6 +1336,9 @@
|
||||
};
|
||||
const toggleList = (editor, listName, _detail) => {
|
||||
const parentList = getParentList(editor);
|
||||
if (isWithinNonEditableList(editor, parentList)) {
|
||||
return;
|
||||
}
|
||||
const selectedSubLists = getSelectedSubLists(editor);
|
||||
const detail = isObject(_detail) ? _detail : {};
|
||||
if (selectedSubLists.length > 0) {
|
||||
@@ -1320,8 +1350,8 @@
|
||||
|
||||
const DOM = global$2.DOM;
|
||||
const normalizeList = (dom, list) => {
|
||||
const parentNode = list.parentNode;
|
||||
if (parentNode.nodeName === 'LI' && parentNode.firstChild === list) {
|
||||
const parentNode = list.parentElement;
|
||||
if (parentNode && parentNode.nodeName === 'LI' && parentNode.firstChild === list) {
|
||||
const sibling = parentNode.previousSibling;
|
||||
if (sibling && sibling.nodeName === 'LI') {
|
||||
sibling.appendChild(list);
|
||||
@@ -1353,7 +1383,7 @@
|
||||
return node;
|
||||
}
|
||||
const nonEmptyBlocks = editor.schema.getNonEmptyElements();
|
||||
if (node.nodeType === 1) {
|
||||
if (isElement(node)) {
|
||||
node = global$5.getNode(node, offset);
|
||||
}
|
||||
const walker = new global$4(node, root);
|
||||
@@ -1374,6 +1404,7 @@
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const hasOnlyOneBlockChild = (dom, elm) => {
|
||||
const childNodes = elm.childNodes;
|
||||
@@ -1455,7 +1486,7 @@
|
||||
const root = getClosestEditingHost(editor, selectionStartElm);
|
||||
const li = dom.getParent(selection.getStart(), 'LI', root);
|
||||
if (li) {
|
||||
const ul = li.parentNode;
|
||||
const ul = li.parentElement;
|
||||
if (ul === editor.getBody() && isEmpty$1(dom, ul)) {
|
||||
return true;
|
||||
}
|
||||
@@ -1543,7 +1574,8 @@
|
||||
return false;
|
||||
};
|
||||
const backspaceDelete = (editor, isForward) => {
|
||||
return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
|
||||
const selection = editor.selection;
|
||||
return !isWithinNonEditableList(editor, selection.getNode()) && (selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor));
|
||||
};
|
||||
const setup$1 = editor => {
|
||||
editor.on('ExecCommand', e => {
|
||||
@@ -1573,6 +1605,9 @@
|
||||
|
||||
const updateList = (editor, update) => {
|
||||
const parentList = getParentList(editor);
|
||||
if (parentList === null || isWithinNonEditableList(editor, parentList)) {
|
||||
return;
|
||||
}
|
||||
editor.undoManager.transact(() => {
|
||||
if (isObject(update.styles)) {
|
||||
editor.dom.setStyles(parentList, update.styles);
|
||||
@@ -1658,7 +1693,7 @@
|
||||
|
||||
const open = editor => {
|
||||
const currentList = getParentList(editor);
|
||||
if (!isOlNode(currentList)) {
|
||||
if (!isOlNode(currentList) || isWithinNonEditableList(editor, currentList)) {
|
||||
return;
|
||||
}
|
||||
editor.windowManager.open({
|
||||
@@ -1675,7 +1710,7 @@
|
||||
initialData: {
|
||||
start: parseDetail({
|
||||
start: editor.dom.getAttrib(currentList, 'start', '1'),
|
||||
listStyleType: Optional.some(editor.dom.getStyle(currentList, 'list-style-type'))
|
||||
listStyleType: Optional.from(editor.dom.getStyle(currentList, 'list-style-type'))
|
||||
})
|
||||
},
|
||||
buttons: [
|
||||
@@ -1706,7 +1741,7 @@
|
||||
|
||||
const queryListCommandState = (editor, listName) => () => {
|
||||
const parentList = getParentList(editor);
|
||||
return parentList && parentList.nodeName === listName;
|
||||
return isNonNullable(parentList) && parentList.nodeName === listName;
|
||||
};
|
||||
const registerDialog = editor => {
|
||||
editor.addCommand('mceListProps', () => {
|
||||
@@ -1764,6 +1799,13 @@
|
||||
setup$1(editor);
|
||||
};
|
||||
|
||||
const setupToggleButtonHandler = (editor, listName) => api => {
|
||||
const toggleButtonHandler = e => {
|
||||
api.setActive(inList(e.parents, listName));
|
||||
api.setEnabled(!isWithinNonEditableList(editor, e.element));
|
||||
};
|
||||
return setNodeChangeHandler(editor, toggleButtonHandler);
|
||||
};
|
||||
const register$1 = editor => {
|
||||
const exec = command => () => editor.execCommand(command);
|
||||
if (!editor.hasPlugin('advlist')) {
|
||||
@@ -1772,24 +1814,28 @@
|
||||
active: false,
|
||||
tooltip: 'Numbered list',
|
||||
onAction: exec('InsertOrderedList'),
|
||||
onSetup: api => listState(editor, 'OL', api.setActive)
|
||||
onSetup: setupToggleButtonHandler(editor, 'OL')
|
||||
});
|
||||
editor.ui.registry.addToggleButton('bullist', {
|
||||
icon: 'unordered-list',
|
||||
active: false,
|
||||
tooltip: 'Bullet list',
|
||||
onAction: exec('InsertUnorderedList'),
|
||||
onSetup: api => listState(editor, 'UL', api.setActive)
|
||||
onSetup: setupToggleButtonHandler(editor, 'UL')
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const setupMenuButtonHandler = (editor, listName) => api => {
|
||||
const menuButtonHandler = e => api.setEnabled(inList(e.parents, listName) && !isWithinNonEditableList(editor, e.element));
|
||||
return setNodeChangeHandler(editor, menuButtonHandler);
|
||||
};
|
||||
const register = editor => {
|
||||
const listProperties = {
|
||||
text: 'List properties...',
|
||||
icon: 'ordered-list',
|
||||
onAction: () => editor.execCommand('mceListProps'),
|
||||
onSetup: api => listState(editor, 'OL', api.setEnabled)
|
||||
onSetup: setupMenuButtonHandler(editor, 'OL')
|
||||
};
|
||||
editor.ui.registry.addMenuItem('listprops', listProperties);
|
||||
editor.ui.registry.addContextMenu('lists', {
|
||||
@@ -1803,7 +1849,7 @@
|
||||
var Plugin = () => {
|
||||
global$6.add('lists', editor => {
|
||||
register$3(editor);
|
||||
if (editor.hasPlugin('rtc', true) === false) {
|
||||
if (!editor.hasPlugin('rtc', true)) {
|
||||
setup(editor);
|
||||
register$2(editor);
|
||||
} else {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+39
-24
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -274,13 +274,14 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
data.source = data.source || data.src || data.data;
|
||||
data.source = data.source || data.src || '';
|
||||
data.altsource = data.altsource || '';
|
||||
data.poster = data.poster || '';
|
||||
return data;
|
||||
};
|
||||
|
||||
const guess = url => {
|
||||
var _a;
|
||||
const mimes = {
|
||||
mp3: 'audio/mpeg',
|
||||
m4a: 'audio/x-m4a',
|
||||
@@ -290,9 +291,8 @@
|
||||
ogg: 'video/ogg',
|
||||
swf: 'application/x-shockwave-flash'
|
||||
};
|
||||
const fileEnd = url.toLowerCase().split('.').pop();
|
||||
const mime = mimes[fileEnd];
|
||||
return mime ? mime : '';
|
||||
const fileEnd = (_a = url.toLowerCase().split('.').pop()) !== null && _a !== void 0 ? _a : '';
|
||||
return get$1(mimes, fileEnd).getOr('');
|
||||
};
|
||||
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
||||
@@ -311,8 +311,12 @@
|
||||
const updateEphoxEmbed = (data, node) => {
|
||||
const style = node.attr('style');
|
||||
const styleMap = style ? DOM.parseStyle(style) : {};
|
||||
styleMap['max-width'] = addPx(data.width);
|
||||
styleMap['max-height'] = addPx(data.height);
|
||||
if (isNonNullable(data.width)) {
|
||||
styleMap['max-width'] = addPx(data.width);
|
||||
}
|
||||
if (isNonNullable(data.height)) {
|
||||
styleMap['max-height'] = addPx(data.height);
|
||||
}
|
||||
node.attr('style', DOM.serializeStyle(styleMap));
|
||||
};
|
||||
const sources = [
|
||||
@@ -474,8 +478,10 @@
|
||||
const protocol = getProtocol(url);
|
||||
const match = pattern.regex.exec(url);
|
||||
let newUrl = protocol + pattern.url;
|
||||
for (let i = 0; i < match.length; i++) {
|
||||
newUrl = newUrl.replace('$' + i, () => match[i] ? match[i] : '');
|
||||
if (isNonNullable(match)) {
|
||||
for (let i = 0; i < match.length; i++) {
|
||||
newUrl = newUrl.replace('$' + i, () => match[i] ? match[i] : '');
|
||||
}
|
||||
}
|
||||
return newUrl.replace(/\?$/, '');
|
||||
};
|
||||
@@ -522,9 +528,10 @@
|
||||
return '<script src="' + data.source + '"></script>';
|
||||
};
|
||||
const dataToHtml = (editor, dataIn) => {
|
||||
var _a;
|
||||
const data = global$5.extend({}, dataIn);
|
||||
if (!data.source) {
|
||||
global$5.extend(data, htmlToData(data.embed, editor.schema));
|
||||
global$5.extend(data, htmlToData((_a = data.embed) !== null && _a !== void 0 ? _a : '', editor.schema));
|
||||
if (!data.source) {
|
||||
return '';
|
||||
}
|
||||
@@ -656,7 +663,7 @@
|
||||
return dimensions;
|
||||
};
|
||||
const unwrap = (data, sourceInput) => {
|
||||
const metaData = sourceInput ? extractMeta(sourceInput, data).getOr({}) : {};
|
||||
const metaData = sourceInput && sourceInput !== 'dimensions' ? extractMeta(sourceInput, data).getOr({}) : {};
|
||||
const get = getValue(data, metaData, sourceInput);
|
||||
return {
|
||||
...get('source'),
|
||||
@@ -730,7 +737,8 @@
|
||||
editor.nodeChanged();
|
||||
};
|
||||
const submitForm = (prevData, newData, editor) => {
|
||||
newData.embed = updateHtml(newData.embed, newData, false, editor.schema);
|
||||
var _a;
|
||||
newData.embed = updateHtml((_a = newData.embed) !== null && _a !== void 0 ? _a : '', newData, false, editor.schema);
|
||||
if (newData.embed && (prevData.source === newData.source || isCached(newData.source))) {
|
||||
handleInsert(editor, newData.embed);
|
||||
} else {
|
||||
@@ -754,8 +762,9 @@
|
||||
}
|
||||
};
|
||||
const handleEmbed = api => {
|
||||
var _a;
|
||||
const data = unwrap(api.getData());
|
||||
const dataFromEmbed = htmlToData(data.embed, editor.schema);
|
||||
const dataFromEmbed = htmlToData((_a = data.embed) !== null && _a !== void 0 ? _a : '', editor.schema);
|
||||
api.setData(wrap(dataFromEmbed));
|
||||
};
|
||||
const handleUpdate = (api, sourceInput) => {
|
||||
@@ -935,6 +944,7 @@
|
||||
return placeHolder;
|
||||
};
|
||||
const createPreviewNode = (editor, node) => {
|
||||
var _a;
|
||||
const name = node.name;
|
||||
const previewWrapper = new global$2('span', 1);
|
||||
previewWrapper.attr({
|
||||
@@ -944,7 +954,7 @@
|
||||
'class': 'mce-preview-object mce-object-' + name
|
||||
});
|
||||
retainAttributesAndInnerHtml(editor, node, previewWrapper);
|
||||
const styles = editor.dom.parseStyle(node.attr('style'));
|
||||
const styles = editor.dom.parseStyle((_a = node.attr('style')) !== null && _a !== void 0 ? _a : '');
|
||||
const previewNode = new global$2(name, 1);
|
||||
setDimensions(node, previewNode, styles);
|
||||
previewNode.attr({
|
||||
@@ -982,7 +992,8 @@
|
||||
return previewWrapper;
|
||||
};
|
||||
const retainAttributesAndInnerHtml = (editor, sourceNode, targetNode) => {
|
||||
const attribs = sourceNode.attributes;
|
||||
var _a;
|
||||
const attribs = (_a = sourceNode.attributes) !== null && _a !== void 0 ? _a : [];
|
||||
let ai = attribs.length;
|
||||
while (ai--) {
|
||||
const attrName = attribs[ai].name;
|
||||
@@ -1005,11 +1016,12 @@
|
||||
};
|
||||
const isPageEmbedWrapper = node => {
|
||||
const nodeClass = node.attr('class');
|
||||
return nodeClass && /\btiny-pageembed\b/.test(nodeClass);
|
||||
return isString(nodeClass) && /\btiny-pageembed\b/.test(nodeClass);
|
||||
};
|
||||
const isWithinEmbedWrapper = node => {
|
||||
while (node = node.parent) {
|
||||
if (node.attr('data-ephox-embed-iri') || isPageEmbedWrapper(node)) {
|
||||
let tempNode = node;
|
||||
while (tempNode = tempNode.parent) {
|
||||
if (tempNode.attr('data-ephox-embed-iri') || isPageEmbedWrapper(tempNode)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1052,13 +1064,16 @@
|
||||
});
|
||||
each({ embed: ['wmode'] }, (attrs, name) => {
|
||||
const rule = schema.getElementRule(name);
|
||||
each$1(attrs, attr => {
|
||||
rule.attributes[attr] = {};
|
||||
rule.attributesOrder.push(attr);
|
||||
});
|
||||
if (rule) {
|
||||
each$1(attrs, attr => {
|
||||
rule.attributes[attr] = {};
|
||||
rule.attributesOrder.push(attr);
|
||||
});
|
||||
}
|
||||
});
|
||||
parser.addNodeFilter('iframe,video,audio,object,embed,script', placeHolderConverter(editor));
|
||||
serializer.addAttributeFilter('data-mce-object', (nodes, name) => {
|
||||
var _a;
|
||||
let i = nodes.length;
|
||||
while (i--) {
|
||||
const node = nodes[i];
|
||||
@@ -1069,7 +1084,7 @@
|
||||
const realElm = new global$2(realElmName, 1);
|
||||
if (realElmName !== 'audio' && realElmName !== 'script') {
|
||||
const className = node.attr('class');
|
||||
if (className && className.indexOf('mce-preview-object') !== -1) {
|
||||
if (className && className.indexOf('mce-preview-object') !== -1 && node.firstChild) {
|
||||
realElm.attr({
|
||||
width: node.firstChild.attr('width'),
|
||||
height: node.firstChild.attr('height')
|
||||
@@ -1082,7 +1097,7 @@
|
||||
}
|
||||
}
|
||||
realElm.attr({ style: node.attr('style') });
|
||||
const attribs = node.attributes;
|
||||
const attribs = (_a = node.attributes) !== null && _a !== void 0 ? _a : [];
|
||||
let ai = attribs.length;
|
||||
while (ai--) {
|
||||
const attrName = attribs[ai].name;
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=n=>e=>typeof e===n,a=e("boolean"),o=e("number"),t=n=>e=>e.options.get(n),i=t("nonbreaking_force_tab"),r=t("nonbreaking_wrap"),s=(n,e)=>{let a="";for(let o=0;o<e;o++)a+=n;return a},c=(n,e)=>{const a=r(n)||n.plugins.visualchars?`<span class="${(n=>!!n.plugins.visualchars&&n.plugins.visualchars.isEnabled())(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap"}" contenteditable="false">${s(" ",e)}</span>`:s(" ",e);n.undoManager.transact((()=>n.insertContent(a)))};var l=tinymce.util.Tools.resolve("tinymce.util.VK");n.add("nonbreaking",(n=>{(n=>{const e=n.options.register;e("nonbreaking_force_tab",{processor:n=>a(n)?{value:n?3:0,valid:!0}:o(n)?{value:n,valid:!0}:{valid:!1,message:"Must be a boolean or number."},default:!1}),e("nonbreaking_wrap",{processor:"boolean",default:!0})})(n),(n=>{n.addCommand("mceNonBreaking",(()=>{c(n,1)}))})(n),(n=>{const e=()=>n.execCommand("mceNonBreaking");n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:e}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:e})})(n),(n=>{const e=i(n);e>0&&n.on("keydown",(a=>{if(a.keyCode===l.TAB&&!a.isDefaultPrevented()){if(a.shiftKey)return;a.preventDefault(),a.stopImmediatePropagation(),c(n,e)}}))})(n)}))}();
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -46,7 +46,7 @@
|
||||
className = node.attr('class');
|
||||
if (className && className.indexOf(pageBreakClass) !== -1) {
|
||||
const parentNode = node.parent;
|
||||
if (editor.schema.getBlockElements()[parentNode.name] && shouldSplitBlock$1()) {
|
||||
if (parentNode && editor.schema.getBlockElements()[parentNode.name] && shouldSplitBlock$1()) {
|
||||
parentNode.type = 3;
|
||||
parentNode.value = separatorHtml;
|
||||
parentNode.raw = true;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env");const t=e=>a=>a.options.get(e),r=t("pagebreak_separator"),n=t("pagebreak_split_block"),o="mce-pagebreak",s=e=>{const t=`<img src="${a.transparentSrc}" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />`;return e?`<p>${t}</p>`:t};e.add("pagebreak",(e=>{(e=>{const a=e.options.register;a("pagebreak_separator",{processor:"string",default:"\x3c!-- pagebreak --\x3e"}),a("pagebreak_split_block",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mcePageBreak",(()=>{e.insertContent(s(n(e)))}))})(e),(e=>{const a=()=>e.execCommand("mcePageBreak");e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:a}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:a})})(e),(e=>{const a=r(e),t=()=>n(e),c=new RegExp(a.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(e=>"\\"+e)),"gi");e.on("BeforeSetContent",(e=>{e.content=e.content.replace(c,s(t()))})),e.on("PreInit",(()=>{e.serializer.addNodeFilter("img",(r=>{let n,s,c=r.length;for(;c--;)if(n=r[c],s=n.attr("class"),s&&-1!==s.indexOf(o)){const r=n.parent;if(e.schema.getBlockElements()[r.name]&&t()){r.type=3,r.value=a,r.raw=!0,n.remove();continue}n.type=3,n.value=a,n.raw=!0}}))}))})(e),(e=>{e.on("ResolveName",(a=>{"IMG"===a.target.nodeName&&e.dom.hasClass(a.target,o)&&(a.name="pagebreak")}))})(e)}))}();
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env");const t=e=>a=>a.options.get(e),r=t("pagebreak_separator"),n=t("pagebreak_split_block"),o="mce-pagebreak",s=e=>{const t=`<img src="${a.transparentSrc}" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />`;return e?`<p>${t}</p>`:t};e.add("pagebreak",(e=>{(e=>{const a=e.options.register;a("pagebreak_separator",{processor:"string",default:"\x3c!-- pagebreak --\x3e"}),a("pagebreak_split_block",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mcePageBreak",(()=>{e.insertContent(s(n(e)))}))})(e),(e=>{const a=()=>e.execCommand("mcePageBreak");e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:a}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:a})})(e),(e=>{const a=r(e),t=()=>n(e),c=new RegExp(a.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(e=>"\\"+e)),"gi");e.on("BeforeSetContent",(e=>{e.content=e.content.replace(c,s(t()))})),e.on("PreInit",(()=>{e.serializer.addNodeFilter("img",(r=>{let n,s,c=r.length;for(;c--;)if(n=r[c],s=n.attr("class"),s&&-1!==s.indexOf(o)){const r=n.parent;if(r&&e.schema.getBlockElements()[r.name]&&t()){r.type=3,r.value=a,r.raw=!0,n.remove();continue}n.type=3,n.value=a,n.raw=!0}}))}))})(e),(e=>{e.on("ResolveName",(a=>{"IMG"===a.target.nodeName&&e.dom.hasClass(a.target,o)&&(a.name="pagebreak")}))})(e)}))}();
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),i=n("content_style"),s=n("content_css_cors"),c=n("body_class"),r=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const a=e.dom.encode,d=null!==(n=i(e))&&void 0!==n?n:"";l+='<base href="'+a(e.documentBaseURI.getURI())+'">';const m=s(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{l+='<link type="text/css" rel="stylesheet" href="'+a(e.documentBaseURI.toAbsolute(t))+'"'+m+">"})),d&&(l+='<style type="text/css">'+d+"</style>");const y=r(e),u=c(e),v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(t.os.isMacOS()||t.os.isiOS()?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",p=e.getBody().dir,w=p?' dir="'+a(p)+'"':"";return"<!DOCTYPE html><html><head>"+l+'</head><body id="'+a(y)+'" class="mce-content-body '+a(u)+'"'+w+">"+e.getContent()+v+"</body></html>"})(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,transparent:!1}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:n}}).focus("close")})(e)}))})(e),(e=>{const t=()=>e.execCommand("mcePreview");e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:t}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:t})})(e)}))}();
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -130,8 +130,9 @@
|
||||
fileInput.addEventListener('change', changeHandler);
|
||||
const cancelHandler = e => {
|
||||
const cleanup = () => {
|
||||
var _a;
|
||||
resolve([]);
|
||||
fileInput.parentNode.removeChild(fileInput);
|
||||
(_a = fileInput.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(fileInput);
|
||||
};
|
||||
if (global$1.os.isAndroid() && e.type !== 'remove') {
|
||||
global.setEditorTimeout(editor, cleanup, 0);
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(i=n.constructor)||void 0===i?void 0:i.name)===r.name)?"string":t;var o,n,r,i})(e));const n=t("boolean"),r=t("function"),i=e=>t=>t.options.get(e),s=i("quickbars_selection_toolbar"),a=i("quickbars_insert_toolbar"),l=i("quickbars_image_toolbar");let c=0;var u=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay");const m=e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>{(e=>new Promise((t=>{const o=document.createElement("input");o.type="file",o.accept="image/*",o.style.position="fixed",o.style.left="0",o.style.top="0",o.style.opacity="0.001",document.body.appendChild(o),o.addEventListener("change",(e=>{t(Array.prototype.slice.call(e.target.files))}));const n=r=>{const i=()=>{t([]),o.parentNode.removeChild(o)};u.os.isAndroid()&&"remove"!==r.type?d.setEditorTimeout(e,i,0):i(),e.off("focusin remove",n)};e.on("focusin remove",n),o.click()})))(e).then((t=>{if(t.length>0){const o=t[0];(e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])},o.readAsDataURL(e)})))(o).then((t=>{((e,t,o)=>{const n=e.editorUpload.blobCache,r=n.create((e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return c++,"mceu_"+o+c+String(t)})(),o,t);n.add(r),e.insertContent(e.dom.createHTML("img",{src:r.blobUri()}))})(e,t,o)}))}}))}}),e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{((e,t,o)=>{e.execCommand("mceInsertTable",!1,{rows:2,columns:2})})(e)}})},g=(!1,()=>false);class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?h.none():h.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);var b=(e,t,o,n,i)=>e(o,n)?h.some(o):r(i)&&i(o)?h.none():t(o,n,i);const p=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},f=p,v=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}};"undefined"!=typeof window?window:Function("return this;")();const y=(e,t,o)=>{let n=e.dom;const i=r(o)?o:g;for(;n.parentNode;){n=n.parentNode;const e=f(n);if(t(e))return h.some(e);if(i(e))break}return h.none()},k=(e,t,o)=>y(e,(e=>v(e,t)),o),w=e=>{const t=a(e);t.length>0&&e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=f(t),n=e.schema.getTextBlockElements(),r=t=>t.dom===e.getBody();return((e,t,o)=>b(((e,t)=>v(e,t)),k,e,"table",o))(o,0,r).fold((()=>((t,o,r)=>b(((e,t)=>t(e)),y,t,(t=>t.dom.nodeName.toLowerCase()in n&&e.dom.isEmpty(t.dom)),r))(o,0,r).isSome()),g)},items:t,position:"line",scope:"editor"})};e.add("quickbars",(e=>{(e=>{const t=e.options.register,r=e=>t=>{const r=n(t)||o(t);return r?n(t)?{value:t?e:"",valid:r}:{value:t.trim(),valid:r}:{valid:!1,message:"Must be a boolean or string."}},i="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:r(i),default:i});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:r(s),default:s});const a="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:r(a),default:a})})(e),m(e),w(e),(e=>{const t=e=>"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className),o=l(e);o.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:t,items:o,position:"node"});const n=s(e);n.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:o=>!t(o)&&!e.selection.isCollapsed()&&(t=>"false"!==e.dom.getContentEditableParent(t))(o),items:n,position:"selection",scope:"editor"})})(e)}))}();
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(i=n.constructor)||void 0===i?void 0:i.name)===r.name)?"string":t;var o,n,r,i})(e));const n=t("boolean"),r=t("function"),i=e=>t=>t.options.get(e),s=i("quickbars_selection_toolbar"),a=i("quickbars_insert_toolbar"),l=i("quickbars_image_toolbar");let c=0;var u=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay");const m=e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>{(e=>new Promise((t=>{const o=document.createElement("input");o.type="file",o.accept="image/*",o.style.position="fixed",o.style.left="0",o.style.top="0",o.style.opacity="0.001",document.body.appendChild(o),o.addEventListener("change",(e=>{t(Array.prototype.slice.call(e.target.files))}));const n=r=>{const i=()=>{var e;t([]),null===(e=o.parentNode)||void 0===e||e.removeChild(o)};u.os.isAndroid()&&"remove"!==r.type?d.setEditorTimeout(e,i,0):i(),e.off("focusin remove",n)};e.on("focusin remove",n),o.click()})))(e).then((t=>{if(t.length>0){const o=t[0];(e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])},o.readAsDataURL(e)})))(o).then((t=>{((e,t,o)=>{const n=e.editorUpload.blobCache,r=n.create((e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return c++,"mceu_"+o+c+String(t)})(),o,t);n.add(r),e.insertContent(e.dom.createHTML("img",{src:r.blobUri()}))})(e,t,o)}))}}))}}),e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{((e,t,o)=>{e.execCommand("mceInsertTable",!1,{rows:2,columns:2})})(e)}})},g=(!1,()=>false);class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?h.none():h.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);var v=(e,t,o,n,i)=>e(o,n)?h.some(o):r(i)&&i(o)?h.none():t(o,n,i);const b=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},p=b,f=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}};"undefined"!=typeof window?window:Function("return this;")();const y=(e,t,o)=>{let n=e.dom;const i=r(o)?o:g;for(;n.parentNode;){n=n.parentNode;const e=p(n);if(t(e))return h.some(e);if(i(e))break}return h.none()},k=(e,t,o)=>y(e,(e=>f(e,t)),o),w=e=>{const t=a(e);t.length>0&&e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=p(t),n=e.schema.getTextBlockElements(),r=t=>t.dom===e.getBody();return((e,t,o)=>v(((e,t)=>f(e,t)),k,e,"table",o))(o,0,r).fold((()=>((t,o,r)=>v(((e,t)=>t(e)),y,t,(t=>t.dom.nodeName.toLowerCase()in n&&e.dom.isEmpty(t.dom)),r))(o,0,r).isSome()),g)},items:t,position:"line",scope:"editor"})};e.add("quickbars",(e=>{(e=>{const t=e.options.register,r=e=>t=>{const r=n(t)||o(t);return r?n(t)?{value:t?e:"",valid:r}:{value:t.trim(),valid:r}:{valid:!1,message:"Must be a boolean or string."}},i="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:r(i),default:i});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:r(s),default:s});const a="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:r(a),default:a})})(e),m(e),w(e),(e=>{const t=e=>"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className),o=l(e);o.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:t,items:o,position:"node"});const n=s(e);n.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:o=>!t(o)&&!e.selection.isCollapsed()&&(t=>"false"!==e.dom.getContentEditableParent(t))(o),items:n,position:"selection",scope:"editor"})})(e)}))}();
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=("function",e=>"function"==typeof e);var o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),t=tinymce.util.Tools.resolve("tinymce.util.Tools");const a=e=>n=>n.options.get(e),c=a("save_enablewhendirty"),i=a("save_onsavecallback"),s=a("save_oncancelcallback"),r=(e,n)=>{e.notificationManager.open({text:n,type:"error"})},l=e=>n=>{const o=()=>{n.setEnabled(!c(e)||e.isDirty())};return o(),e.on("NodeChange dirty",o),()=>e.off("NodeChange dirty",o)};e.add("save",(e=>{(e=>{const n=e.options.register;n("save_enablewhendirty",{processor:"boolean",default:!0}),n("save_onsavecallback",{processor:"function"}),n("save_oncancelcallback",{processor:"function"})})(e),(e=>{e.ui.registry.addButton("save",{icon:"save",tooltip:"Save",enabled:!1,onAction:()=>e.execCommand("mceSave"),onSetup:l(e)}),e.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",enabled:!1,onAction:()=>e.execCommand("mceCancel"),onSetup:l(e)}),e.addShortcut("Meta+S","","mceSave")})(e),(e=>{e.addCommand("mceSave",(()=>{(e=>{const t=o.DOM.getParent(e.id,"form");if(c(e)&&!e.isDirty())return;e.save();const a=i(e);if(n(a))return a.call(e,e),void e.nodeChanged();t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeof t.submit?t.submit():r(e,"Error: Form submit field collision.")),e.nodeChanged()):r(e,"Error: No form element found.")})(e)})),e.addCommand("mceCancel",(()=>{(e=>{const o=t.trim(e.startContent),a=s(e);n(a)?a.call(e,e):e.resetContent(o)})(e)}))})(e)}))}();
|
||||
+13
-13
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -361,7 +361,7 @@
|
||||
|
||||
const isSimpleBoundary = (dom, node) => dom.isBlock(node) || has(dom.schema.getVoidElements(), node.nodeName);
|
||||
const isContentEditableFalse = (dom, node) => dom.getContentEditable(node) === 'false';
|
||||
const isContentEditableTrueInCef = (dom, node) => dom.getContentEditable(node) === 'true' && dom.getContentEditableParent(node.parentNode) === 'false';
|
||||
const isContentEditableTrueInCef = (dom, node) => dom.getContentEditable(node) === 'true' && node.parentNode && dom.getContentEditableParent(node.parentNode) === 'false';
|
||||
const isHidden = (dom, node) => !dom.isBlock(node) && has(dom.schema.getWhitespaceElements(), node.nodeName);
|
||||
const isBoundary = (dom, node) => isSimpleBoundary(dom, node) || isContentEditableFalse(dom, node) || isHidden(dom, node) || isContentEditableTrueInCef(dom, node);
|
||||
const isText = node => node.nodeType === 3;
|
||||
@@ -398,10 +398,11 @@
|
||||
}
|
||||
};
|
||||
const collectTextToBoundary = (dom, section, node, rootNode, forwards) => {
|
||||
var _a;
|
||||
if (isBoundary(dom, node)) {
|
||||
return;
|
||||
}
|
||||
const rootBlock = dom.getParent(rootNode, dom.isBlock);
|
||||
const rootBlock = (_a = dom.getParent(rootNode, dom.isBlock)) !== null && _a !== void 0 ? _a : dom.getRoot();
|
||||
const walker = new global(node, rootBlock);
|
||||
const walkerFn = forwards ? walker.next.bind(walker) : walker.prev.bind(walker);
|
||||
walk(dom, walkerFn, node, {
|
||||
@@ -570,11 +571,7 @@
|
||||
};
|
||||
|
||||
const getElmIndex = elm => {
|
||||
const value = elm.getAttribute('data-mce-index');
|
||||
if (typeof value === 'number') {
|
||||
return '' + value;
|
||||
}
|
||||
return value;
|
||||
return elm.getAttribute('data-mce-index');
|
||||
};
|
||||
const markAllMatches = (editor, currentSearchState, pattern, inSelection) => {
|
||||
const marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
|
||||
@@ -588,11 +585,12 @@
|
||||
}
|
||||
};
|
||||
const unwrap = node => {
|
||||
var _a;
|
||||
const parentNode = node.parentNode;
|
||||
if (node.firstChild) {
|
||||
parentNode.insertBefore(node.firstChild, node);
|
||||
}
|
||||
node.parentNode.removeChild(node);
|
||||
(_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);
|
||||
};
|
||||
const findSpansByIndex = (editor, index) => {
|
||||
const spans = [];
|
||||
@@ -614,7 +612,6 @@
|
||||
const searchState = currentSearchState.get();
|
||||
let testIndex = searchState.index;
|
||||
const dom = editor.dom;
|
||||
forward = forward !== false;
|
||||
if (forward) {
|
||||
if (testIndex + 1 === searchState.count) {
|
||||
testIndex = 0;
|
||||
@@ -640,7 +637,7 @@
|
||||
const removeNode = (dom, node) => {
|
||||
const parent = node.parentNode;
|
||||
dom.remove(node);
|
||||
if (dom.isEmpty(parent)) {
|
||||
if (parent && dom.isEmpty(parent)) {
|
||||
dom.remove(parent);
|
||||
}
|
||||
};
|
||||
@@ -704,7 +701,7 @@
|
||||
let matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
|
||||
if (all || matchIndex === searchState.index) {
|
||||
if (text.length) {
|
||||
nodes[i].firstChild.nodeValue = text;
|
||||
nodes[i].innerText = text;
|
||||
unwrap(nodes[i]);
|
||||
} else {
|
||||
removeNode(editor.dom, nodes[i]);
|
||||
@@ -738,7 +735,8 @@
|
||||
return !all && currentSearchState.get().count > 0;
|
||||
};
|
||||
const done = (editor, currentSearchState, keepEditorSelection) => {
|
||||
let startContainer, endContainer;
|
||||
let startContainer;
|
||||
let endContainer;
|
||||
const searchState = currentSearchState.get();
|
||||
const nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
@@ -767,6 +765,8 @@
|
||||
editor.selection.setRng(rng);
|
||||
}
|
||||
return rng;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
const hasNext = (editor, currentSearchState) => currentSearchState.get().count > 1;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+42
-37
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -59,6 +59,9 @@
|
||||
return fn.apply(null, all);
|
||||
};
|
||||
}
|
||||
const call = f => {
|
||||
f();
|
||||
};
|
||||
const never = constant(false);
|
||||
const always = constant(true);
|
||||
|
||||
@@ -169,11 +172,9 @@
|
||||
r[i] = x;
|
||||
};
|
||||
const internalFilter = (obj, pred, onTrue, onFalse) => {
|
||||
const r = {};
|
||||
each$1(obj, (x, i) => {
|
||||
(pred(x, i) ? onTrue : onFalse)(x, i);
|
||||
});
|
||||
return r;
|
||||
};
|
||||
const filter$1 = (obj, pred) => {
|
||||
const t = {};
|
||||
@@ -578,6 +579,10 @@
|
||||
const trim = blank(/^\s+|\s+$/g);
|
||||
const isNotEmpty = s => s.length > 0;
|
||||
const isEmpty = s => !isNotEmpty(s);
|
||||
const toInt = (value, radix = 10) => {
|
||||
const num = parseInt(value, radix);
|
||||
return isNaN(num) ? Optional.none() : Optional.some(num);
|
||||
};
|
||||
const toFloat = value => {
|
||||
const num = parseFloat(value);
|
||||
return isNaN(num) ? Optional.none() : Optional.some(num);
|
||||
@@ -852,19 +857,16 @@
|
||||
const getTDTHOverallStyle = (dom, elm, name) => {
|
||||
const cells = dom.select('td,th', elm);
|
||||
let firstChildStyle;
|
||||
const checkChildren = (firstChildStyle, elms) => {
|
||||
for (let i = 0; i < elms.length; i++) {
|
||||
const currentStyle = dom.getStyle(elms[i], name);
|
||||
if (typeof firstChildStyle === 'undefined') {
|
||||
firstChildStyle = currentStyle;
|
||||
}
|
||||
if (firstChildStyle !== currentStyle) {
|
||||
return '';
|
||||
}
|
||||
for (let i = 0; i < cells.length; i++) {
|
||||
const currentStyle = dom.getStyle(cells[i], name);
|
||||
if (isUndefined(firstChildStyle)) {
|
||||
firstChildStyle = currentStyle;
|
||||
}
|
||||
return firstChildStyle;
|
||||
};
|
||||
return checkChildren(firstChildStyle, cells);
|
||||
if (firstChildStyle !== currentStyle) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
return firstChildStyle;
|
||||
};
|
||||
const setAlign = (editor, elm, name) => {
|
||||
global$2.each('left center right'.split(' '), align => {
|
||||
@@ -1583,7 +1585,7 @@
|
||||
};
|
||||
const isListGroup = item => hasNonNullableKey(item, 'menu');
|
||||
const buildListItems = items => map(items, item => {
|
||||
const text = item.text || item.title;
|
||||
const text = item.text || item.title || '';
|
||||
if (isListGroup(item)) {
|
||||
return {
|
||||
text,
|
||||
@@ -2088,7 +2090,7 @@
|
||||
if (shouldStyleWithCss(editor) && optBorderWidth.isSome()) {
|
||||
return optBorderWidth.getOr('');
|
||||
}
|
||||
return dom.getAttrib(elm, 'border') || getTDTHOverallStyle(editor.dom, elm, 'border-width') || getTDTHOverallStyle(editor.dom, elm, 'border');
|
||||
return dom.getAttrib(elm, 'border') || getTDTHOverallStyle(editor.dom, elm, 'border-width') || getTDTHOverallStyle(editor.dom, elm, 'border') || '';
|
||||
};
|
||||
const dom = editor.dom;
|
||||
const cellspacing = shouldStyleWithCss(editor) ? dom.getStyle(elm, 'border-spacing') || dom.getAttrib(elm, 'cellspacing') : dom.getAttrib(elm, 'cellspacing') || dom.getStyle(elm, 'border-spacing');
|
||||
@@ -2096,8 +2098,8 @@
|
||||
return {
|
||||
width: dom.getStyle(elm, 'width') || dom.getAttrib(elm, 'width'),
|
||||
height: dom.getStyle(elm, 'height') || dom.getAttrib(elm, 'height'),
|
||||
cellspacing,
|
||||
cellpadding,
|
||||
cellspacing: cellspacing !== null && cellspacing !== void 0 ? cellspacing : '',
|
||||
cellpadding: cellpadding !== null && cellpadding !== void 0 ? cellpadding : '',
|
||||
border: getBorder(dom, elm),
|
||||
caption: !!dom.select('caption', elm)[0],
|
||||
class: dom.getAttrib(elm, 'class', ''),
|
||||
@@ -2536,7 +2538,7 @@
|
||||
|
||||
const styleTDTH = (dom, elm, name, value) => {
|
||||
if (elm.tagName === 'TD' || elm.tagName === 'TH') {
|
||||
if (isString(name)) {
|
||||
if (isString(name) && isNonNullable(value)) {
|
||||
dom.setStyle(elm, name, value);
|
||||
} else {
|
||||
dom.setStyles(elm, name);
|
||||
@@ -2553,7 +2555,9 @@
|
||||
const dom = editor.dom;
|
||||
const attrs = {};
|
||||
const styles = {};
|
||||
attrs.class = data.class;
|
||||
if (!isUndefined(data.class)) {
|
||||
attrs.class = data.class;
|
||||
}
|
||||
styles.height = addPxSuffix(data.height);
|
||||
if (shouldStyleWithCss(editor)) {
|
||||
styles.width = addPxSuffix(data.width);
|
||||
@@ -2580,9 +2584,10 @@
|
||||
}
|
||||
}
|
||||
if (hasAdvancedTableTab(editor)) {
|
||||
styles['background-color'] = data.backgroundcolor;
|
||||
styles['border-color'] = data.bordercolor;
|
||||
styles['border-style'] = data.borderstyle;
|
||||
const advData = data;
|
||||
styles['background-color'] = advData.backgroundcolor;
|
||||
styles['border-color'] = advData.bordercolor;
|
||||
styles['border-style'] = advData.borderstyle;
|
||||
}
|
||||
attrs.style = dom.serializeStyle({
|
||||
...getDefaultStyles(editor),
|
||||
@@ -2603,13 +2608,13 @@
|
||||
}
|
||||
editor.undoManager.transact(() => {
|
||||
if (!tableElm) {
|
||||
const cols = parseInt(data.cols, 10) || 1;
|
||||
const rows = parseInt(data.rows, 10) || 1;
|
||||
const cols = toInt(data.cols).getOr(1);
|
||||
const rows = toInt(data.rows).getOr(1);
|
||||
editor.execCommand('mceInsertTable', false, {
|
||||
rows,
|
||||
columns: cols
|
||||
});
|
||||
tableElm = getSelectionCell(getSelectionStart(editor), getIsRoot(editor)).bind(cell => table(cell, getIsRoot(editor))).map(table => table.dom).getOrUndefined();
|
||||
tableElm = getSelectionCell(getSelectionStart(editor), getIsRoot(editor)).bind(cell => table(cell, getIsRoot(editor))).map(table => table.dom).getOrDie();
|
||||
}
|
||||
if (size(modifiedData) > 0) {
|
||||
applyDataToElement(editor, tableElm, data);
|
||||
@@ -2635,7 +2640,15 @@
|
||||
const dom = editor.dom;
|
||||
let tableElm;
|
||||
let data = extractDataFromSettings(editor, hasAdvancedTableTab(editor));
|
||||
if (insertNewTable === false) {
|
||||
if (insertNewTable) {
|
||||
data.cols = '1';
|
||||
data.rows = '1';
|
||||
if (hasAdvancedTableTab(editor)) {
|
||||
data.borderstyle = '';
|
||||
data.bordercolor = '';
|
||||
data.backgroundcolor = '';
|
||||
}
|
||||
} else {
|
||||
tableElm = dom.getParent(editor.selection.getStart(), 'table', editor.getBody());
|
||||
if (tableElm) {
|
||||
data = extractDataFromTableElement(editor, tableElm, hasAdvancedTableTab(editor));
|
||||
@@ -2646,14 +2659,6 @@
|
||||
data.backgroundcolor = '';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
data.cols = '1';
|
||||
data.rows = '1';
|
||||
if (hasAdvancedTableTab(editor)) {
|
||||
data.borderstyle = '';
|
||||
data.bordercolor = '';
|
||||
data.backgroundcolor = '';
|
||||
}
|
||||
}
|
||||
const classes = buildListItems(getTableClassList(editor));
|
||||
if (classes.length > 0) {
|
||||
@@ -2795,7 +2800,7 @@
|
||||
const resetTargets = () => {
|
||||
targets.set(cached(findTargets)());
|
||||
selectionDetails = targets.get().bind(getExtractedDetails);
|
||||
each(changeHandlers.get(), handler => handler());
|
||||
each(changeHandlers.get(), call);
|
||||
};
|
||||
const setupHandler = handler => {
|
||||
handler();
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+7
-4
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -81,7 +81,10 @@
|
||||
});
|
||||
registerOption('template_preview_replace_values', { processor: 'object' });
|
||||
registerOption('template_replace_values', { processor: 'object' });
|
||||
registerOption('templates', { processor: value => isString(value) || isArrayOf(value, isObject) || isFunction(value) });
|
||||
registerOption('templates', {
|
||||
processor: value => isString(value) || isArrayOf(value, isObject) || isFunction(value),
|
||||
default: []
|
||||
});
|
||||
registerOption('template_cdate_format', {
|
||||
processor: 'string',
|
||||
default: editor.translate('%Y-%m-%d')
|
||||
@@ -319,10 +322,10 @@
|
||||
const dom = editor.dom;
|
||||
const sel = editor.selection.getContent();
|
||||
html = replaceTemplateValues(html, getTemplateReplaceValues(editor));
|
||||
let el = dom.create('div', null, html);
|
||||
let el = dom.create('div', {}, html);
|
||||
const n = dom.select('.mceTmpl', el);
|
||||
if (n && n.length > 0) {
|
||||
el = dom.create('div', null);
|
||||
el = dom.create('div');
|
||||
el.appendChild(n[0].cloneNode(true));
|
||||
}
|
||||
global$1.each(dom.select('*', el), n => {
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const s=(t,s,o)=>{t.dom.toggleClass(t.getBody(),"mce-visualblocks"),o.set(!o.get()),((t,s)=>{t.dispatch("VisualBlocks",{state:s})})(t,o.get())},o=("visualblocks_default_state",t=>t.options.get("visualblocks_default_state"));const e=(t,s)=>o=>{o.setActive(s.get());const e=t=>o.setActive(t.state);return t.on("VisualBlocks",e),()=>t.off("VisualBlocks",e)};t.add("visualblocks",((t,l)=>{(t=>{(0,t.options.register)("visualblocks_default_state",{processor:"boolean",default:!1})})(t);const a=(t=>{let s=!1;return{get:()=>s,set:t=>{s=t}}})();((t,o,e)=>{t.addCommand("mceVisualBlocks",(()=>{s(t,0,e)}))})(t,0,a),((t,s)=>{const o=()=>t.execCommand("mceVisualBlocks");t.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:o,onSetup:e(t,s)}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:o,onSetup:e(t,s)})})(t,a),((t,e,l)=>{t.on("PreviewFormats AfterPreviewFormats",(s=>{l.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===s.type)})),t.on("init",(()=>{o(t)&&s(t,0,l)}))})(t,0,a)}))}();
|
||||
+9
-6
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
const isMatch = n => {
|
||||
const value$1 = value(n);
|
||||
return isText(n) && value$1 !== undefined && regExp.test(value$1);
|
||||
return isText(n) && isString(value$1) && regExp.test(value$1);
|
||||
};
|
||||
const filterDescendants = (scope, predicate) => {
|
||||
let result = [];
|
||||
@@ -350,26 +350,29 @@
|
||||
const findParentElm = (elm, rootElm) => {
|
||||
while (elm.parentNode) {
|
||||
if (elm.parentNode === rootElm) {
|
||||
return elm;
|
||||
return rootElm;
|
||||
}
|
||||
elm = elm.parentNode;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
const replaceWithSpans = text => text.replace(regExpGlobal, wrapCharWithSpan);
|
||||
|
||||
const isWrappedNbsp = node => node.nodeName.toLowerCase() === 'span' && node.classList.contains('mce-nbsp-wrap');
|
||||
const show = (editor, rootElm) => {
|
||||
const dom = editor.dom;
|
||||
const nodeList = filterDescendants(SugarElement.fromDom(rootElm), isMatch);
|
||||
each$1(nodeList, n => {
|
||||
var _a;
|
||||
const parent = n.dom.parentNode;
|
||||
if (isWrappedNbsp(parent)) {
|
||||
add(SugarElement.fromDom(parent), nbspClass);
|
||||
} else {
|
||||
const withSpans = replaceWithSpans(editor.dom.encode(value(n)));
|
||||
const div = editor.dom.create('div', null, withSpans);
|
||||
const withSpans = replaceWithSpans(dom.encode((_a = value(n)) !== null && _a !== void 0 ? _a : ''));
|
||||
const div = dom.create('div', {}, withSpans);
|
||||
let node;
|
||||
while (node = div.lastChild) {
|
||||
editor.dom.insertAfter(node, n.dom);
|
||||
dom.insertAfter(node, n.dom);
|
||||
}
|
||||
editor.dom.remove(n.dom);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
+6
-5
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* TinyMCE version 6.1.2 (2022-07-29)
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
@@ -237,10 +237,11 @@
|
||||
const textBlocks = [];
|
||||
let txt = '';
|
||||
const treeWalker = new global$1(node, node);
|
||||
while (node = treeWalker.next()) {
|
||||
if (node.nodeType === 3) {
|
||||
txt += removeZwsp$1(node.data);
|
||||
} else if (isNewline(node) && txt.length) {
|
||||
let tempNode;
|
||||
while (tempNode = treeWalker.next()) {
|
||||
if (tempNode.nodeType === 3) {
|
||||
txt += removeZwsp$1(tempNode.data);
|
||||
} else if (isNewline(tempNode) && txt.length) {
|
||||
textBlocks.push(txt);
|
||||
txt = '';
|
||||
}
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
@@ -203,6 +203,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -232,6 +253,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.3);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.3);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
@@ -222,6 +222,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -251,6 +272,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+39
-4
@@ -1531,6 +1531,8 @@ body.tox-dialog__disable-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tox .tox-editor-header {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr min-content;
|
||||
z-index: 1;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
||||
@@ -2121,16 +2123,45 @@ body.tox-dialog__disable-scroll {
|
||||
margin: 0;
|
||||
}
|
||||
.tox .tox-menubar {
|
||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='transparent'/%3E%3C/svg%3E") left 0 top 0 #222F3E;
|
||||
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
|
||||
background-color: #222F3E;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
padding: 0 11px 0 12px;
|
||||
}
|
||||
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
|
||||
border-top: 1px solid transparent;
|
||||
.tox .tox-promotion + .tox-menubar {
|
||||
grid-column: 1;
|
||||
}
|
||||
.tox .tox-promotion {
|
||||
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
|
||||
background-color: #222F3E;
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
padding-inline-end: 8px;
|
||||
padding-inline-start: 4px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.tox .tox-promotion-link {
|
||||
align-items: unsafe center;
|
||||
background-color: #E8F1F8;
|
||||
border-radius: 5px;
|
||||
color: #086BE6;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
height: 26.6px;
|
||||
padding: 4px 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tox .tox-promotion-link:hover {
|
||||
background-color: #B4D7FF;
|
||||
}
|
||||
.tox .tox-promotion-link:focus {
|
||||
background-color: #D9EDF7;
|
||||
}
|
||||
/* Deprecated. Remove in next major release */
|
||||
.tox .tox-mbtn {
|
||||
@@ -2910,10 +2941,14 @@ body.tox-dialog__disable-scroll {
|
||||
.tox .tox-toolbar__overflow--shrinking {
|
||||
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
|
||||
}
|
||||
.tox .tox-toolbar-overlord,
|
||||
.tox .tox-anchorbar {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.tox .tox-menubar + .tox-toolbar,
|
||||
.tox .tox-menubar + .tox-toolbar-overlord {
|
||||
border-top: 1px solid transparent;
|
||||
margin-top: 0px;
|
||||
margin-top: -1px;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -222,6 +222,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -251,6 +272,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
@@ -222,6 +222,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -251,6 +272,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+39
-4
@@ -1531,6 +1531,8 @@ body.tox-dialog__disable-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tox .tox-editor-header {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr min-content;
|
||||
z-index: 1;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
||||
@@ -2121,16 +2123,45 @@ body.tox-dialog__disable-scroll {
|
||||
margin: 0;
|
||||
}
|
||||
.tox .tox-menubar {
|
||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='transparent'/%3E%3C/svg%3E") left 0 top 0 #fff;
|
||||
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
padding: 0 11px 0 12px;
|
||||
}
|
||||
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
|
||||
border-top: 1px solid transparent;
|
||||
.tox .tox-promotion + .tox-menubar {
|
||||
grid-column: 1;
|
||||
}
|
||||
.tox .tox-promotion {
|
||||
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
|
||||
background-color: #fff;
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
padding-inline-end: 8px;
|
||||
padding-inline-start: 4px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.tox .tox-promotion-link {
|
||||
align-items: unsafe center;
|
||||
background-color: #E8F1F8;
|
||||
border-radius: 5px;
|
||||
color: #086BE6;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
height: 26.6px;
|
||||
padding: 4px 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tox .tox-promotion-link:hover {
|
||||
background-color: #B4D7FF;
|
||||
}
|
||||
.tox .tox-promotion-link:focus {
|
||||
background-color: #D9EDF7;
|
||||
}
|
||||
/* Deprecated. Remove in next major release */
|
||||
.tox .tox-mbtn {
|
||||
@@ -2910,10 +2941,14 @@ body.tox-dialog__disable-scroll {
|
||||
.tox .tox-toolbar__overflow--shrinking {
|
||||
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
|
||||
}
|
||||
.tox .tox-toolbar-overlord,
|
||||
.tox .tox-anchorbar {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.tox .tox-menubar + .tox-toolbar,
|
||||
.tox .tox-menubar + .tox-toolbar-overlord {
|
||||
border-top: 1px solid transparent;
|
||||
margin-top: 0px;
|
||||
margin-top: -1px;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -203,6 +203,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -232,6 +253,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.3);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.3);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
@@ -222,6 +222,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -251,6 +272,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+44
-3
@@ -1531,6 +1531,8 @@ body.tox-dialog__disable-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tox .tox-editor-header {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr min-content;
|
||||
z-index: 1;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
||||
@@ -2127,10 +2129,39 @@ body.tox-dialog__disable-scroll {
|
||||
flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
padding: 0 4px 0 4px;
|
||||
}
|
||||
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
|
||||
border-top: 1px solid #000000;
|
||||
.tox .tox-promotion + .tox-menubar {
|
||||
grid-column: 1;
|
||||
}
|
||||
.tox .tox-promotion {
|
||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;
|
||||
background-color: #222f3e;
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
padding-inline-end: 8px;
|
||||
padding-inline-start: 4px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.tox .tox-promotion-link {
|
||||
align-items: unsafe center;
|
||||
background-color: #E8F1F8;
|
||||
border-radius: 5px;
|
||||
color: #086BE6;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
height: 26.6px;
|
||||
padding: 4px 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tox .tox-promotion-link:hover {
|
||||
background-color: #B4D7FF;
|
||||
}
|
||||
.tox .tox-promotion-link:focus {
|
||||
background-color: #D9EDF7;
|
||||
}
|
||||
/* Deprecated. Remove in next major release */
|
||||
.tox .tox-mbtn {
|
||||
@@ -2910,10 +2941,14 @@ body.tox-dialog__disable-scroll {
|
||||
.tox .tox-toolbar__overflow--shrinking {
|
||||
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
|
||||
}
|
||||
.tox .tox-toolbar-overlord,
|
||||
.tox .tox-anchorbar {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.tox .tox-menubar + .tox-toolbar,
|
||||
.tox .tox-menubar + .tox-toolbar-overlord {
|
||||
border-top: 1px solid #000000;
|
||||
margin-top: 0;
|
||||
margin-top: -1px;
|
||||
padding-bottom: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
@@ -3123,6 +3158,12 @@ body.tox-dialog__disable-scroll {
|
||||
border: 1px solid #000000;
|
||||
padding: 0;
|
||||
}
|
||||
.tox .tox-pop .tox-pop__dialog .tox-toolbar {
|
||||
padding: 0;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
|
||||
border-top: 1px solid #000000;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child {
|
||||
border-top: 1px solid #000000;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -222,6 +222,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -251,6 +272,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
@@ -222,6 +222,27 @@ pre[class*="language-"] {
|
||||
.tox-cursor-format-painter {
|
||||
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
|
||||
}
|
||||
div.mce-footnotes hr {
|
||||
margin-inline-end: auto;
|
||||
margin-inline-start: 0;
|
||||
width: 25%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media print {
|
||||
sup.mce-footnote a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.mce-footnotes {
|
||||
break-inside: avoid;
|
||||
width: 100%;
|
||||
}
|
||||
div.mce-footnotes li > a.mce-footnotes-backlink {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.mce-content-body figure.align-left {
|
||||
float: left;
|
||||
}
|
||||
@@ -251,6 +272,13 @@ pre[class*="language-"] {
|
||||
.mce-preview-object[data-mce-selected="2"] .mce-shim {
|
||||
display: none;
|
||||
}
|
||||
.mce-content-body .mce-mergetag:hover {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
}
|
||||
.mce-content-body .mce-mergetag-affix {
|
||||
background-color: rgba(0, 108, 231, 0.1);
|
||||
color: #006ce7;
|
||||
}
|
||||
.mce-object {
|
||||
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
|
||||
border: 1px dashed #aaa;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+45
-4
@@ -1531,6 +1531,8 @@ body.tox-dialog__disable-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tox .tox-editor-header {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr min-content;
|
||||
z-index: 1;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
||||
@@ -1541,7 +1543,7 @@ body.tox-dialog__disable-scroll {
|
||||
transition: box-shadow 0.5s;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header {
|
||||
border-top: 1px solid #c1c1c1;
|
||||
border-top: 1px solid #cccccc;
|
||||
box-shadow: none;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header {
|
||||
@@ -2127,10 +2129,39 @@ body.tox-dialog__disable-scroll {
|
||||
flex: 0 0 auto;
|
||||
flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
padding: 0 4px 0 4px;
|
||||
}
|
||||
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
|
||||
border-top: 1px solid #cccccc;
|
||||
.tox .tox-promotion + .tox-menubar {
|
||||
grid-column: 1;
|
||||
}
|
||||
.tox .tox-promotion {
|
||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;
|
||||
background-color: #fff;
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
padding-inline-end: 8px;
|
||||
padding-inline-start: 4px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.tox .tox-promotion-link {
|
||||
align-items: unsafe center;
|
||||
background-color: #E8F1F8;
|
||||
border-radius: 5px;
|
||||
color: #086BE6;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
height: 26.6px;
|
||||
padding: 4px 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tox .tox-promotion-link:hover {
|
||||
background-color: #B4D7FF;
|
||||
}
|
||||
.tox .tox-promotion-link:focus {
|
||||
background-color: #D9EDF7;
|
||||
}
|
||||
/* Deprecated. Remove in next major release */
|
||||
.tox .tox-mbtn {
|
||||
@@ -2910,10 +2941,14 @@ body.tox-dialog__disable-scroll {
|
||||
.tox .tox-toolbar__overflow--shrinking {
|
||||
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
|
||||
}
|
||||
.tox .tox-toolbar-overlord,
|
||||
.tox .tox-anchorbar {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.tox .tox-menubar + .tox-toolbar,
|
||||
.tox .tox-menubar + .tox-toolbar-overlord {
|
||||
border-top: 1px solid #cccccc;
|
||||
margin-top: 0;
|
||||
margin-top: -1px;
|
||||
padding-bottom: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
@@ -3123,6 +3158,12 @@ body.tox-dialog__disable-scroll {
|
||||
border: 1px solid #cccccc;
|
||||
padding: 0;
|
||||
}
|
||||
.tox .tox-pop .tox-pop__dialog .tox-toolbar {
|
||||
padding: 0;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
|
||||
border-top: 1px solid #cccccc;
|
||||
}
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,
|
||||
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child {
|
||||
border-top: 1px solid #cccccc;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user