jodit 4.15.6 → 4.15.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +112 -28
- package/es2015/jodit.min.js +4 -4
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +4 -4
- package/es2018/jodit.min.js +4 -4
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +110 -27
- package/es2021/jodit.min.js +5 -5
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +110 -27
- package/es2021.en/jodit.min.js +5 -5
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +153 -62
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +12 -1
- package/esm/core/constants.js +1 -1
- package/esm/plugins/clean-html/clean-html.d.ts +7 -3
- package/esm/plugins/clean-html/clean-html.js +37 -0
- package/esm/plugins/clean-html/config.d.ts +12 -1
- package/esm/plugins/clean-html/config.js +1 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +10 -0
- package/esm/plugins/drag-and-drop-element/drag-and-drop-element.d.ts +1 -0
- package/esm/plugins/drag-and-drop-element/drag-and-drop-element.js +19 -4
- package/esm/plugins/mobile/mobile.js +25 -4
- package/package.json +1 -1
- package/types/config.d.ts +12 -1
- package/types/plugins/clean-html/clean-html.d.ts +7 -3
- package/types/plugins/clean-html/config.d.ts +12 -1
- package/types/plugins/drag-and-drop-element/drag-and-drop-element.d.ts +1 -0
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.15.
|
|
4
|
+
* Version: v4.15.8
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1785,7 +1785,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1785
1785
|
* ```
|
|
1786
1786
|
* @packageDocumentation
|
|
1787
1787
|
* @module constants
|
|
1788
|
-
*/ const APP_VERSION = "4.15.
|
|
1788
|
+
*/ const APP_VERSION = "4.15.8";
|
|
1789
1789
|
// prettier-ignore
|
|
1790
1790
|
const ES = "es2015";
|
|
1791
1791
|
const IS_ES_MODERN = true;
|
|
@@ -28540,7 +28540,8 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
28540
28540
|
|
|
28541
28541
|
/**
|
|
28542
28542
|
* Clean HTML after removeFormat and insertHorizontalRule command
|
|
28543
|
-
*/
|
|
28543
|
+
*/ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
|
|
28544
|
+
class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin {
|
|
28544
28545
|
/** @override */ afterInit(jodit) {}
|
|
28545
28546
|
get isEditMode() {
|
|
28546
28547
|
return !(this.j.isInDestruct || !this.j.isEditorMode() || this.j.getReadOnly());
|
|
@@ -28599,6 +28600,7 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
28599
28600
|
* opt-in via `cleanHTML.collapseEmptyValueToEmptyString`. See #1149
|
|
28600
28601
|
*/ onAfterGetValueFromEditor(data) {
|
|
28601
28602
|
this.__singleQuotesInFontFamily(data);
|
|
28603
|
+
this.__removeTrailingBr(data);
|
|
28602
28604
|
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
28603
28605
|
return;
|
|
28604
28606
|
}
|
|
@@ -28613,7 +28615,39 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
28613
28615
|
* `style="font-family: "Open Sans", …"` — broken markup. Single quotes
|
|
28614
28616
|
* survive that round trip. Names that already contain an apostrophe are
|
|
28615
28617
|
* left alone.
|
|
28616
|
-
*/
|
|
28618
|
+
*/ /**
|
|
28619
|
+
* Drop a `<br>` that is the last node of a block (or of the value) and
|
|
28620
|
+
* follows other content — the caret placeholder browsers leave behind
|
|
28621
|
+
* after typing into an empty block. An empty block (`<p><br></p>`) and a
|
|
28622
|
+
* deliberate empty line (`text<br><br>`) are kept.
|
|
28623
|
+
*/ __removeTrailingBr(data) {
|
|
28624
|
+
if (!this.j.o.cleanHTML.removeTrailingBr || !/<br/i.test(data.value)) {
|
|
28625
|
+
return;
|
|
28626
|
+
}
|
|
28627
|
+
const box = this.j.c.div();
|
|
28628
|
+
box.innerHTML = data.value;
|
|
28629
|
+
const blocks = [
|
|
28630
|
+
box,
|
|
28631
|
+
...box.querySelectorAll(TRAILING_BR_BLOCKS)
|
|
28632
|
+
];
|
|
28633
|
+
blocks.forEach((block)=>{
|
|
28634
|
+
var _prev_nodeValue;
|
|
28635
|
+
const last = block.lastChild;
|
|
28636
|
+
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(last, 'br')) {
|
|
28637
|
+
return;
|
|
28638
|
+
}
|
|
28639
|
+
const prev = last.previousSibling;
|
|
28640
|
+
if (!prev || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(prev, 'br')) {
|
|
28641
|
+
return;
|
|
28642
|
+
}
|
|
28643
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isText(prev) && !((_prev_nodeValue = prev.nodeValue) === null || _prev_nodeValue === void 0 ? void 0 : _prev_nodeValue.trim()) && !prev.previousSibling) {
|
|
28644
|
+
return;
|
|
28645
|
+
}
|
|
28646
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(last);
|
|
28647
|
+
});
|
|
28648
|
+
data.value = box.innerHTML;
|
|
28649
|
+
}
|
|
28650
|
+
__singleQuotesInFontFamily(data) {
|
|
28617
28651
|
if (!this.j.o.cleanHTML.singleQuotesInFontFamily || !data.value.includes('"')) {
|
|
28618
28652
|
return;
|
|
28619
28653
|
}
|
|
@@ -28700,6 +28734,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
|
|
|
28700
28734
|
fillEmptyParagraph: true,
|
|
28701
28735
|
collapseEmptyValueToEmptyString: false,
|
|
28702
28736
|
singleQuotesInFontFamily: true,
|
|
28737
|
+
removeTrailingBr: false,
|
|
28703
28738
|
replaceNBSP: true,
|
|
28704
28739
|
replaceOldTags: {
|
|
28705
28740
|
i: 'em',
|
|
@@ -29563,7 +29598,14 @@ function filterStyleProperties(style, allowed) {
|
|
|
29563
29598
|
// a pending-format marker the user is about to type into (#1291). `current`
|
|
29564
29599
|
// is captured before a click moves the caret, so also check the live caret.
|
|
29565
29600
|
const liveCaret = jodit.s.isCollapsed() ? jodit.s.range.startContainer : null;
|
|
29566
|
-
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && node.nodeName.match(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE) != null && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTemporary(node) && (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__.trimInv)(node.innerHTML).length === 0 && (current == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, current)) && (liveCaret == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, liveCaret));
|
|
29601
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && node.nodeName.match(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE) != null && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTemporary(node) && !isFragmentTarget(node) && (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__.trimInv)(node.innerHTML).length === 0 && (current == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, current)) && (liveCaret == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, liveCaret));
|
|
29602
|
+
}
|
|
29603
|
+
/**
|
|
29604
|
+
* An element with an `id`, or an `<a>` with a `name`, is where an in-page link
|
|
29605
|
+
* (`#fragment`) lands. It is usually empty (`<a name="top"></a>`), and removing
|
|
29606
|
+
* it silently breaks every link that points at it.
|
|
29607
|
+
*/ function isFragmentTarget(element) {
|
|
29608
|
+
return element.hasAttribute('id') || element.nodeName === 'A' && element.hasAttribute('name');
|
|
29567
29609
|
}
|
|
29568
29610
|
|
|
29569
29611
|
|
|
@@ -30800,6 +30842,11 @@ var DragState = /*#__PURE__*/ (/* unused pure expression or super */ null && (fu
|
|
|
30800
30842
|
this.state = 2;
|
|
30801
30843
|
}
|
|
30802
30844
|
this.j.e.fire('hidePopup hideResizer');
|
|
30845
|
+
// The ghost lives in the top document (position: fixed), but the
|
|
30846
|
+
// mousemove comes from the editor document. In iframe mode those are
|
|
30847
|
+
// different viewports, so the iframe's own offset has to be added or
|
|
30848
|
+
// the ghost trails the pointer by exactly that distance (#1455).
|
|
30849
|
+
const offset = this.__ghostOffset();
|
|
30803
30850
|
if (!this.draggable.parentNode) {
|
|
30804
30851
|
var _ref, _ref1;
|
|
30805
30852
|
const target = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.dataBind)(this.draggable, 'target');
|
|
@@ -30810,19 +30857,35 @@ var DragState = /*#__PURE__*/ (/* unused pure expression or super */ null && (fu
|
|
|
30810
30857
|
position: 'fixed',
|
|
30811
30858
|
opacity: 0.7,
|
|
30812
30859
|
display: 'inline-block',
|
|
30813
|
-
left: event.clientX,
|
|
30814
|
-
top: event.clientY,
|
|
30860
|
+
left: event.clientX + offset.left,
|
|
30861
|
+
top: event.clientY + offset.top,
|
|
30815
30862
|
width: (_ref = target === null || target === void 0 ? void 0 : target.offsetWidth) !== null && _ref !== void 0 ? _ref : 100,
|
|
30816
30863
|
height: (_ref1 = target === null || target === void 0 ? void 0 : target.offsetHeight) !== null && _ref1 !== void 0 ? _ref1 : 100
|
|
30817
30864
|
});
|
|
30818
30865
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.append((0,jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.getContainer)(this.j, dragAndDropElement), this.draggable);
|
|
30819
30866
|
}
|
|
30820
30867
|
;(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.css)(this.draggable, {
|
|
30821
|
-
left: event.clientX,
|
|
30822
|
-
top: event.clientY
|
|
30868
|
+
left: event.clientX + offset.left,
|
|
30869
|
+
top: event.clientY + offset.top
|
|
30823
30870
|
});
|
|
30871
|
+
// The caret goes into the editor document, so it keeps the raw
|
|
30872
|
+
// (iframe-relative) coordinates.
|
|
30824
30873
|
this.j.s.insertCursorAtPoint(event.clientX, event.clientY);
|
|
30825
30874
|
}
|
|
30875
|
+
__ghostOffset() {
|
|
30876
|
+
const iframe = this.j.iframe;
|
|
30877
|
+
if (!iframe) {
|
|
30878
|
+
return {
|
|
30879
|
+
left: 0,
|
|
30880
|
+
top: 0
|
|
30881
|
+
};
|
|
30882
|
+
}
|
|
30883
|
+
const rect = iframe.getBoundingClientRect();
|
|
30884
|
+
return {
|
|
30885
|
+
left: rect.left,
|
|
30886
|
+
top: rect.top
|
|
30887
|
+
};
|
|
30888
|
+
}
|
|
30826
30889
|
/**
|
|
30827
30890
|
* Mouseup handler in any place
|
|
30828
30891
|
*/ onDragEnd() {
|
|
@@ -37576,10 +37639,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.dots = {
|
|
|
37576
37639
|
|
|
37577
37640
|
"use strict";
|
|
37578
37641
|
/* unused harmony export mobile */
|
|
37579
|
-
/* harmony import */ var
|
|
37580
|
-
/* harmony import */ var
|
|
37581
|
-
/* harmony import */ var
|
|
37582
|
-
/* harmony import */ var
|
|
37642
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
37643
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
|
|
37644
|
+
/* harmony import */ var jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65946);
|
|
37645
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(85932);
|
|
37646
|
+
/* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2496);
|
|
37647
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3244);
|
|
37583
37648
|
/*!
|
|
37584
37649
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37585
37650
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -37592,6 +37657,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.dots = {
|
|
|
37592
37657
|
|
|
37593
37658
|
|
|
37594
37659
|
|
|
37660
|
+
|
|
37661
|
+
|
|
37595
37662
|
const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n';
|
|
37596
37663
|
/**
|
|
37597
37664
|
* Constrain a responsive breakpoint set (`buttonsMD/SM/XS`) to the buttons the
|
|
@@ -37605,13 +37672,13 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
37605
37672
|
* the standard grouped mobile layout — groups, separators and `dots` — is
|
|
37606
37673
|
* preserved. See #1389.
|
|
37607
37674
|
*/ function fitToButtons(list, editor) {
|
|
37608
|
-
const allowed = (0,
|
|
37675
|
+
const allowed = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_4__.flatButtonsSet)((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons), editor);
|
|
37609
37676
|
const groups = editor.getRegisteredButtonGroups();
|
|
37610
37677
|
let changed = false;
|
|
37611
37678
|
let hadDots = false;
|
|
37612
37679
|
const flat = [];
|
|
37613
37680
|
for (const item of list){
|
|
37614
|
-
if ((0,
|
|
37681
|
+
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_4__.isButtonGroup)(item)) {
|
|
37615
37682
|
var _groups_item_group;
|
|
37616
37683
|
const members = [
|
|
37617
37684
|
...item.buttons,
|
|
@@ -37649,17 +37716,32 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
37649
37716
|
// Keep the "show all" overflow button only if some requested button is still
|
|
37650
37717
|
// hidden at this breakpoint.
|
|
37651
37718
|
if (hadDots) {
|
|
37652
|
-
const shown = (0,
|
|
37653
|
-
if ((0,
|
|
37719
|
+
const shown = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_4__.flatButtonsSet)(cleaned, editor);
|
|
37720
|
+
if ((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.toArray)(allowed).some((button)=>!shown.has(button))) {
|
|
37654
37721
|
cleaned.push('dots');
|
|
37655
37722
|
}
|
|
37656
37723
|
}
|
|
37657
37724
|
return cleaned;
|
|
37658
37725
|
}
|
|
37726
|
+
/**
|
|
37727
|
+
* The width that decides which breakpoint set the toolbar uses. A toolbar
|
|
37728
|
+
* rendered into an external container (`toolbar` set to an element or a
|
|
37729
|
+
* selector) lays out in that container, so its width is what matters there.
|
|
37730
|
+
*/ function adaptiveWidth(editor) {
|
|
37731
|
+
var _editor_container_parentElement;
|
|
37732
|
+
const { toolbar } = editor.o;
|
|
37733
|
+
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_3__.isString)(toolbar) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(toolbar)) {
|
|
37734
|
+
const width = editor.toolbarContainer.offsetWidth;
|
|
37735
|
+
if (width) {
|
|
37736
|
+
return width;
|
|
37737
|
+
}
|
|
37738
|
+
}
|
|
37739
|
+
return ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
|
|
37740
|
+
}
|
|
37659
37741
|
/**
|
|
37660
37742
|
* Rebuild toolbar in depends on editor's width
|
|
37661
37743
|
*/ function mobile(editor) {
|
|
37662
|
-
let timeout = 0, store = (0,
|
|
37744
|
+
let timeout = 0, store = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons);
|
|
37663
37745
|
if (editor.o.mobileTapTimeout) {
|
|
37664
37746
|
// Emulate double tap
|
|
37665
37747
|
editor.e.on('touchend', (e)=>{
|
|
@@ -37676,8 +37758,8 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
37676
37758
|
}
|
|
37677
37759
|
editor.e.on('getDiffButtons.mobile', (toolbar)=>{
|
|
37678
37760
|
if (toolbar === editor.toolbar) {
|
|
37679
|
-
const buttons = (0,
|
|
37680
|
-
return (0,
|
|
37761
|
+
const buttons = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_4__.flatButtonsSet)((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons), editor), flatStore = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_4__.flatButtonsSet)(store, editor);
|
|
37762
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.toArray)(buttons).reduce((acc, item)=>{
|
|
37681
37763
|
if (!flatStore.has(item)) {
|
|
37682
37764
|
acc.push(item);
|
|
37683
37765
|
}
|
|
@@ -37687,22 +37769,24 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
37687
37769
|
});
|
|
37688
37770
|
if (editor.o.toolbarAdaptive) {
|
|
37689
37771
|
editor.e.on('resize afterInit recalcAdaptive changePlace afterAddPlace', ()=>{
|
|
37690
|
-
var _editor_container_parentElement;
|
|
37691
37772
|
if (!editor.o.toolbar) {
|
|
37692
37773
|
return;
|
|
37693
37774
|
}
|
|
37694
|
-
const width = ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
|
|
37695
37775
|
const newStore = (()=>{
|
|
37696
|
-
if (editor.isFullSize
|
|
37697
|
-
return (0,
|
|
37776
|
+
if (editor.isFullSize) {
|
|
37777
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons);
|
|
37778
|
+
}
|
|
37779
|
+
const width = adaptiveWidth(editor);
|
|
37780
|
+
if (width >= editor.o.sizeLG) {
|
|
37781
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons);
|
|
37698
37782
|
}
|
|
37699
37783
|
if (width >= editor.o.sizeMD) {
|
|
37700
|
-
return fitToButtons((0,
|
|
37784
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttonsMD), editor);
|
|
37701
37785
|
}
|
|
37702
37786
|
if (width >= editor.o.sizeSM) {
|
|
37703
|
-
return fitToButtons((0,
|
|
37787
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttonsSM), editor);
|
|
37704
37788
|
}
|
|
37705
|
-
return fitToButtons((0,
|
|
37789
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttonsXS), editor);
|
|
37706
37790
|
})();
|
|
37707
37791
|
if (newStore.toString() !== store.toString()) {
|
|
37708
37792
|
var _editor_toolbar;
|
|
@@ -37713,7 +37797,7 @@ const isButtonSeparator = (item)=>item === '|' || item === '---' || item === '\n
|
|
|
37713
37797
|
}).on(editor.ow, 'load resize', ()=>editor.e.fire('recalcAdaptive'));
|
|
37714
37798
|
}
|
|
37715
37799
|
}
|
|
37716
|
-
|
|
37800
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('mobile', mobile);
|
|
37717
37801
|
|
|
37718
37802
|
|
|
37719
37803
|
/***/ }),
|