jodit 4.5.20 → 4.6.2

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 (67) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +46 -13
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.css +1 -1
  13. package/es2018/jodit.fat.min.js +2 -2
  14. package/es2018/jodit.js +46 -13
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.css +1 -1
  17. package/es2018/plugins/debug/debug.js +1 -1
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  22. package/es2021/jodit.css +1 -1
  23. package/es2021/jodit.fat.min.js +2 -2
  24. package/es2021/jodit.js +46 -13
  25. package/es2021/jodit.min.js +2 -2
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  32. package/es2021.en/jodit.css +1 -1
  33. package/es2021.en/jodit.fat.min.js +2 -2
  34. package/es2021.en/jodit.js +46 -13
  35. package/es2021.en/jodit.min.js +2 -2
  36. package/es2021.en/plugins/debug/debug.css +1 -1
  37. package/es2021.en/plugins/debug/debug.js +1 -1
  38. package/es2021.en/plugins/debug/debug.min.js +1 -1
  39. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  40. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  42. package/es5/415.fat.min.js +1 -1
  43. package/es5/415.min.js +1 -1
  44. package/es5/5.fat.min.js +1 -1
  45. package/es5/5.min.js +1 -1
  46. package/es5/jodit.css +2 -2
  47. package/es5/jodit.fat.min.js +2 -2
  48. package/es5/jodit.js +51 -14
  49. package/es5/jodit.min.css +2 -2
  50. package/es5/jodit.min.js +2 -2
  51. package/es5/plugins/debug/debug.css +1 -1
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  57. package/esm/core/constants.d.ts +7 -0
  58. package/esm/core/constants.js +32 -12
  59. package/esm/core/helpers/utils/append-script.js +1 -1
  60. package/esm/core/plugin/helpers/load.js +2 -0
  61. package/esm/core/view/view.d.ts +4 -0
  62. package/esm/core/view/view.js +10 -1
  63. package/esm/types/view.d.ts +6 -1
  64. package/package.json +1 -1
  65. package/types/core/constants.d.ts +7 -0
  66. package/types/core/view/view.d.ts +4 -0
  67. package/types/types/view.d.ts +6 -1
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.5.20
4
+ * Version: v4.6.2
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -8305,6 +8305,7 @@ __webpack_require__.r(__webpack_exports__);
8305
8305
  /* harmony export */ ACCURACY: function() { return /* binding */ ACCURACY; },
8306
8306
  /* harmony export */ APP_VERSION: function() { return /* binding */ APP_VERSION; },
8307
8307
  /* harmony export */ BASE_PATH: function() { return /* binding */ BASE_PATH; },
8308
+ /* harmony export */ BASE_PATH_IS_MIN: function() { return /* binding */ BASE_PATH_IS_MIN; },
8308
8309
  /* harmony export */ BR: function() { return /* binding */ BR; },
8309
8310
  /* harmony export */ CLIPBOARD_ID: function() { return /* binding */ CLIPBOARD_ID; },
8310
8311
  /* harmony export */ COMMAND_KEYS: function() { return /* binding */ COMMAND_KEYS; },
@@ -8373,7 +8374,7 @@ __webpack_require__.r(__webpack_exports__);
8373
8374
  * Released under MIT see LICENSE.txt in the project root for license information.
8374
8375
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
8375
8376
  */
8376
- const APP_VERSION = "4.5.20";
8377
+ const APP_VERSION = "4.6.2";
8377
8378
  // prettier-ignore
8378
8379
  const ES = "es2018";
8379
8380
  const IS_ES_MODERN = true;
@@ -8545,17 +8546,30 @@ const KEY_ALIASES = {
8545
8546
  win: 'meta',
8546
8547
  windows: 'meta'
8547
8548
  };
8548
- const BASE_PATH = (() => {
8549
- if (typeof document === 'undefined') {
8550
- return '';
8549
+ const removeScriptName = (src) => {
8550
+ const parts = src.split('/');
8551
+ const isMin = true
8552
+ ? false
8553
+ : 0;
8554
+ if (/\.js/.test(parts[parts.length - 1])) {
8555
+ return {
8556
+ basePath: parts.slice(0, parts.length - 1).join('/') + '/',
8557
+ isMin
8558
+ };
8551
8559
  }
8552
- const script = globalDocument.currentScript, removeScriptName = (s) => {
8553
- const parts = s.split('/');
8554
- if (/\.js/.test(parts[parts.length - 1])) {
8555
- return parts.slice(0, parts.length - 1).join('/') + '/';
8556
- }
8557
- return s;
8560
+ return {
8561
+ basePath: src,
8562
+ isMin
8558
8563
  };
8564
+ };
8565
+ const { basePath, isMin } = (() => {
8566
+ if (typeof document === 'undefined') {
8567
+ return {
8568
+ basePath: '',
8569
+ isMin: Boolean(false)
8570
+ };
8571
+ }
8572
+ const script = globalDocument.currentScript;
8559
8573
  if (script) {
8560
8574
  return removeScriptName(script.src);
8561
8575
  }
@@ -8563,8 +8577,16 @@ const BASE_PATH = (() => {
8563
8577
  if (scripts && scripts.length) {
8564
8578
  return removeScriptName(scripts[scripts.length - 1].src);
8565
8579
  }
8566
- return globalWindow.location.href;
8580
+ return removeScriptName(globalWindow.location.href);
8567
8581
  })();
8582
+ /**
8583
+ * Path to the current script
8584
+ */
8585
+ const BASE_PATH = basePath;
8586
+ /**
8587
+ * Current script is minified
8588
+ */
8589
+ const BASE_PATH_IS_MIN = isMin;
8568
8590
  const TEMP_ATTR = 'data-jodit-temp';
8569
8591
  const lang = {};
8570
8592
  const CLIPBOARD_ID = 'clipboard';
@@ -11269,8 +11291,8 @@ const appendScriptAsync = cacheLoaders((jodit, url) => {
11269
11291
  async: true,
11270
11292
  src: (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url)
11271
11293
  });
11294
+ jodit.e.one(script, 'error', reject).one(script, 'load', resolve);
11272
11295
  jodit.od.body.appendChild(script);
11273
- jodit.e.on(script, 'error', reject).on(script, 'load', resolve);
11274
11296
  });
11275
11297
  });
11276
11298
  /**
@@ -13766,11 +13788,13 @@ async function loadStyle(jodit, pluginName) {
13766
13788
  */
13767
13789
  function getFullUrl(jodit, name, js) {
13768
13790
  name = (0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_2__/* .kebabCase */ .k)(name);
13791
+ const min = jodit.minified ? '.min' : '';
13769
13792
  return (jodit.basePath +
13770
13793
  'plugins/' +
13771
13794
  name +
13772
13795
  '/' +
13773
13796
  name +
13797
+ min +
13774
13798
  '.' +
13775
13799
  (js ? 'js' : 'css'));
13776
13800
  }
@@ -34570,6 +34594,15 @@ let View = View_1 = class View extends jodit_core_component_component__WEBPACK_I
34570
34594
  }
34571
34595
  return jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.BASE_PATH;
34572
34596
  }
34597
+ /**
34598
+ * Plugin autoloader should load minified version of the file
34599
+ */
34600
+ get minified() {
34601
+ if (this.o.minified !== undefined) {
34602
+ return this.o.minified;
34603
+ }
34604
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.BASE_PATH_IS_MIN;
34605
+ }
34573
34606
  /**
34574
34607
  * Return a default timeout period in milliseconds for some debounce or throttle functions.
34575
34608
  * By default, `{history.timeout}` options