jodit 4.6.1 → 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 +22 -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 +31 -11
  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/es5/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.6.1
4
+ * Version: v4.6.2
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -8689,6 +8689,7 @@ __webpack_require__.r(__webpack_exports__);
8689
8689
  /* harmony export */ ACCURACY: function() { return /* binding */ ACCURACY; },
8690
8690
  /* harmony export */ APP_VERSION: function() { return /* binding */ APP_VERSION; },
8691
8691
  /* harmony export */ BASE_PATH: function() { return /* binding */ BASE_PATH; },
8692
+ /* harmony export */ BASE_PATH_IS_MIN: function() { return /* binding */ BASE_PATH_IS_MIN; },
8692
8693
  /* harmony export */ BR: function() { return /* binding */ BR; },
8693
8694
  /* harmony export */ CLIPBOARD_ID: function() { return /* binding */ CLIPBOARD_ID; },
8694
8695
  /* harmony export */ COMMAND_KEYS: function() { return /* binding */ COMMAND_KEYS; },
@@ -8759,7 +8760,7 @@ __webpack_require__.r(__webpack_exports__);
8759
8760
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
8760
8761
  */
8761
8762
 
8762
- var APP_VERSION = "4.6.1";
8763
+ var APP_VERSION = "4.6.2";
8763
8764
  // prettier-ignore
8764
8765
  var ES = "es5";
8765
8766
  var IS_ES_MODERN = false;
@@ -8930,17 +8931,30 @@ var KEY_ALIASES = {
8930
8931
  win: 'meta',
8931
8932
  windows: 'meta'
8932
8933
  };
8933
- var BASE_PATH = (function () {
8934
- if (typeof document === 'undefined') {
8935
- return '';
8934
+ var removeScriptName = function (src) {
8935
+ var parts = src.split('/');
8936
+ var isMin = true
8937
+ ? false
8938
+ : 0;
8939
+ if (/\.js/.test(parts[parts.length - 1])) {
8940
+ return {
8941
+ basePath: parts.slice(0, parts.length - 1).join('/') + '/',
8942
+ isMin: isMin
8943
+ };
8936
8944
  }
8937
- var script = globalDocument.currentScript, removeScriptName = function (s) {
8938
- var parts = s.split('/');
8939
- if (/\.js/.test(parts[parts.length - 1])) {
8940
- return parts.slice(0, parts.length - 1).join('/') + '/';
8941
- }
8942
- return s;
8945
+ return {
8946
+ basePath: src,
8947
+ isMin: isMin
8943
8948
  };
8949
+ };
8950
+ var _a = (function () {
8951
+ if (typeof document === 'undefined') {
8952
+ return {
8953
+ basePath: '',
8954
+ isMin: Boolean(false)
8955
+ };
8956
+ }
8957
+ var script = globalDocument.currentScript;
8944
8958
  if (script) {
8945
8959
  return removeScriptName(script.src);
8946
8960
  }
@@ -8948,8 +8962,16 @@ var BASE_PATH = (function () {
8948
8962
  if (scripts && scripts.length) {
8949
8963
  return removeScriptName(scripts[scripts.length - 1].src);
8950
8964
  }
8951
- return globalWindow.location.href;
8952
- })();
8965
+ return removeScriptName(globalWindow.location.href);
8966
+ })(), basePath = _a.basePath, isMin = _a.isMin;
8967
+ /**
8968
+ * Path to the current script
8969
+ */
8970
+ var BASE_PATH = basePath;
8971
+ /**
8972
+ * Current script is minified
8973
+ */
8974
+ var BASE_PATH_IS_MIN = isMin;
8953
8975
  var TEMP_ATTR = 'data-jodit-temp';
8954
8976
  var lang = {};
8955
8977
  var CLIPBOARD_ID = 'clipboard';
@@ -11701,8 +11723,8 @@ var appendScriptAsync = cacheLoaders(function (jodit, url) {
11701
11723
  async: true,
11702
11724
  src: (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url)
11703
11725
  });
11726
+ jodit.e.one(script, 'error', reject).one(script, 'load', resolve);
11704
11727
  jodit.od.body.appendChild(script);
11705
- jodit.e.on(script, 'error', reject).on(script, 'load', resolve);
11706
11728
  });
11707
11729
  });
11708
11730
  /**
@@ -14310,11 +14332,13 @@ function loadStyle(jodit, pluginName) {
14310
14332
  */
14311
14333
  function getFullUrl(jodit, name, js) {
14312
14334
  name = (0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_3__/* .kebabCase */ .k)(name);
14335
+ var min = jodit.minified ? '.min' : '';
14313
14336
  return (jodit.basePath +
14314
14337
  'plugins/' +
14315
14338
  name +
14316
14339
  '/' +
14317
14340
  name +
14341
+ min +
14318
14342
  '.' +
14319
14343
  (js ? 'js' : 'css'));
14320
14344
  }
@@ -35830,6 +35854,19 @@ var View = /** @class */ (function (_super) {
35830
35854
  enumerable: false,
35831
35855
  configurable: true
35832
35856
  });
35857
+ Object.defineProperty(View.prototype, "minified", {
35858
+ /**
35859
+ * Plugin autoloader should load minified version of the file
35860
+ */
35861
+ get: function () {
35862
+ if (this.o.minified !== undefined) {
35863
+ return this.o.minified;
35864
+ }
35865
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.BASE_PATH_IS_MIN;
35866
+ },
35867
+ enumerable: false,
35868
+ configurable: true
35869
+ });
35833
35870
  Object.defineProperty(View.prototype, "defaultTimeout", {
35834
35871
  /**
35835
35872
  * Return a default timeout period in milliseconds for some debounce or throttle functions.
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
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.6.1
4
+ * Version: v4.6.2
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.6.1
11
+ * Version: v4.6.2
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */