jodit 4.2.6 → 4.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +47 -38
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.js +1 -1
  7. package/es2015/plugins/debug/debug.min.js +1 -1
  8. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  11. package/es2018/jodit.css +1 -1
  12. package/es2018/jodit.fat.min.js +2 -2
  13. package/es2018/jodit.js +47 -38
  14. package/es2018/jodit.min.js +2 -2
  15. package/es2018/plugins/debug/debug.js +1 -1
  16. package/es2018/plugins/debug/debug.min.js +1 -1
  17. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  18. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  20. package/es2021/jodit.css +1 -1
  21. package/es2021/jodit.fat.min.js +2 -2
  22. package/es2021/jodit.js +44 -38
  23. package/es2021/jodit.min.js +2 -2
  24. package/es2021/plugins/debug/debug.js +1 -1
  25. package/es2021/plugins/debug/debug.min.js +1 -1
  26. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  28. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  29. package/es2021.en/jodit.css +1 -1
  30. package/es2021.en/jodit.fat.min.js +2 -2
  31. package/es2021.en/jodit.js +44 -38
  32. package/es2021.en/jodit.min.js +2 -2
  33. package/es2021.en/plugins/debug/debug.js +1 -1
  34. package/es2021.en/plugins/debug/debug.min.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  37. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  38. package/es5/jodit.css +2 -2
  39. package/es5/jodit.fat.min.js +2 -2
  40. package/es5/jodit.js +47 -40
  41. package/es5/jodit.min.css +2 -2
  42. package/es5/jodit.min.js +2 -2
  43. package/es5/plugins/debug/debug.js +1 -1
  44. package/es5/plugins/debug/debug.min.js +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  48. package/esm/core/constants.js +1 -1
  49. package/esm/core/ui/group/list.js +2 -1
  50. package/esm/core/ui/popup/popup.js +1 -1
  51. package/esm/plugins/color/config.js +37 -1
  52. package/esm/plugins/inline-popup/config/items/cells.js +1 -31
  53. package/esm/types/toolbar.d.ts +1 -0
  54. package/package.json +1 -1
  55. package/types/types/toolbar.d.ts +1 -0
package/es2018/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.2.6
4
+ * Version: v4.2.9
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1736,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
1736
1736
  * Released under MIT see LICENSE.txt in the project root for license information.
1737
1737
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1738
1738
  */
1739
- const APP_VERSION = "4.2.6";
1739
+ const APP_VERSION = "4.2.9";
1740
1740
  // prettier-ignore
1741
1741
  const ES = "es2018";
1742
1742
  const IS_ES_MODERN = true;
@@ -14798,7 +14798,11 @@ let UIList = class UIList extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MO
14798
14798
  group.append(elm);
14799
14799
  }
14800
14800
  };
14801
- const isNotRemoved = (b) => !this.removeButtons.includes(b.name);
14801
+ const isNotRemoved = (b) => {
14802
+ var _a;
14803
+ return !this.removeButtons.includes(b.name) &&
14804
+ (!b.isVisible || ((_a = b.isVisible) === null || _a === void 0 ? void 0 : _a.call(b, this.j, b)));
14805
+ };
14802
14806
  items.forEach(item => {
14803
14807
  if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item)) {
14804
14808
  const buttons = item.buttons.filter(b => b);
@@ -15475,7 +15479,7 @@ class Popup extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_7__/* .UI
15475
15479
  }
15476
15480
  return strategy;
15477
15481
  };
15478
- // Try find match position inside Jodit.container
15482
+ // Try to find match position inside Jodit.container
15479
15483
  let strategy = getMatchStrategy((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.position)(this.j.container, this.j));
15480
15484
  // If not found or is not inside window view
15481
15485
  if (!strategy || !Popup.boxInView(getPointByStrategy(strategy), view)) {
@@ -27832,7 +27836,43 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('color
27832
27836
 
27833
27837
 
27834
27838
  jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_2__/* .Icon */ .I.set('brush', (_brush_svg__WEBPACK_IMPORTED_MODULE_4___default()));
27839
+ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.brushCell = {
27840
+ isVisible: (editor) => {
27841
+ return !editor.o.disablePlugins.includes('color');
27842
+ },
27843
+ icon: 'brush',
27844
+ popup: (editor, _, close) => {
27845
+ if (!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.isJoditObject)(editor)) {
27846
+ return;
27847
+ }
27848
+ const tableModule = editor.getInstance('Table', editor.o), selected = tableModule.getAllSelectedCells();
27849
+ if (!selected.length) {
27850
+ return false;
27851
+ }
27852
+ const makeColorPicker = (key) => (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__/* .ColorPickerWidget */ .Kn)(editor, (value) => {
27853
+ selected.forEach(cell => {
27854
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(cell, key, value);
27855
+ });
27856
+ editor.lock();
27857
+ editor.synchronizeValues();
27858
+ close();
27859
+ editor.unlock();
27860
+ }, (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(selected[0], key));
27861
+ return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .Zg)(editor, [
27862
+ {
27863
+ name: 'Background',
27864
+ content: makeColorPicker('background-color')
27865
+ },
27866
+ { name: 'Text', content: makeColorPicker('color') },
27867
+ { name: 'Border', content: makeColorPicker('border-color') }
27868
+ ]);
27869
+ },
27870
+ tooltip: 'Background'
27871
+ };
27835
27872
  jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.brush = {
27873
+ isVisible: (editor) => {
27874
+ return !editor.o.disablePlugins.includes('color');
27875
+ },
27836
27876
  update(editor, button) {
27837
27877
  const color = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color');
27838
27878
  const update = (key, value) => {
@@ -33134,8 +33174,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.popup = {
33134
33174
 
33135
33175
  "use strict";
33136
33176
  /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9823);
33137
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38322);
33138
- /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16116);
33177
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38322);
33139
33178
  /*!
33140
33179
  * Jodit Editor (https://xdsoft.net/jodit/)
33141
33180
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -33143,41 +33182,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.popup = {
33143
33182
  */
33144
33183
 
33145
33184
 
33146
-
33147
33185
  const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .Kg)(control.args[0])
33148
33186
  ? control.args[0].toLowerCase()
33149
33187
  : '';
33150
33188
  /* harmony default export */ __webpack_exports__.A = ([
33151
- {
33152
- name: 'brush',
33153
- popup: (editor, _, close) => {
33154
- if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y0)(editor)) {
33155
- return;
33156
- }
33157
- const tableModule = editor.getInstance('Table', editor.o), selected = tableModule.getAllSelectedCells();
33158
- if (!selected.length) {
33159
- return false;
33160
- }
33161
- const makeColorPicker = (key) => (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__/* .ColorPickerWidget */ .Kn)(editor, (value) => {
33162
- selected.forEach(cell => {
33163
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(cell, key, value);
33164
- });
33165
- editor.lock();
33166
- editor.synchronizeValues();
33167
- close();
33168
- editor.unlock();
33169
- }, (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(selected[0], key));
33170
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_1__/* .TabsWidget */ .Zg)(editor, [
33171
- {
33172
- name: 'Background',
33173
- content: makeColorPicker('background-color')
33174
- },
33175
- { name: 'Text', content: makeColorPicker('color') },
33176
- { name: 'Border', content: makeColorPicker('border-color') }
33177
- ]);
33178
- },
33179
- tooltip: 'Background'
33180
- },
33189
+ 'brushCell',
33181
33190
  {
33182
33191
  name: 'valign',
33183
33192
  list: ['Top', 'Middle', 'Bottom', 'Normal'],
@@ -33188,7 +33197,7 @@ const cmd = (control) => control.args && (0,jodit_core_helpers_checker__WEBPACK_
33188
33197
  .getInstance('Table', editor.o)
33189
33198
  .getAllSelectedCells()
33190
33199
  .forEach((cell) => {
33191
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(cell, 'vertical-align', command === 'normal' ? '' : command);
33200
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .A)(cell, 'vertical-align', command === 'normal' ? '' : command);
33192
33201
  });
33193
33202
  },
33194
33203
  tooltip: 'Vertical align'