jodit 4.6.12 → 4.6.14

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 (60) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +16 -7
  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 +20 -8
  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 +19 -8
  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 +19 -8
  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 +16 -7
  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.js +1 -1
  58. package/esm/core/selection/style/transactions.js +15 -4
  59. package/esm/plugins/copy-format/copy-format.js +3 -2
  60. package/package.json +1 -1
@@ -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.12
4
+ * Version: v4.6.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -7960,7 +7960,7 @@ __webpack_require__.r(__webpack_exports__);
7960
7960
  * Released under MIT see LICENSE.txt in the project root for license information.
7961
7961
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
7962
7962
  */
7963
- const APP_VERSION = "4.6.12";
7963
+ const APP_VERSION = "4.6.14";
7964
7964
  // prettier-ignore
7965
7965
  const ES = "es2021";
7966
7966
  const IS_ES_MODERN = true;
@@ -16385,13 +16385,23 @@ const transactions = {
16385
16385
  const { element, jodit, style } = value;
16386
16386
  const suit = (0,jodit_core_selection_style_api__WEBPACK_IMPORTED_MODULE_4__/* .suitableClosest */ .$s)(style, element, jodit.editor);
16387
16387
  void 0;
16388
- if (!style.elementIsBlock) {
16389
- (0,jodit_core_selection_style_api__WEBPACK_IMPORTED_MODULE_4__/* .extractSelectedPart */ .yP)(suit, element, jodit);
16388
+ // If we're applying inline styles to a block element, don't split the block
16389
+ const isApplyingInlineStyle = !style.elementIsBlock && style.options.attributes?.style;
16390
+ const shouldNotSplitBlock = isApplyingInlineStyle && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(suit);
16391
+ if (!shouldNotSplitBlock) {
16392
+ if (!style.elementIsBlock) {
16393
+ (0,jodit_core_selection_style_api__WEBPACK_IMPORTED_MODULE_4__/* .extractSelectedPart */ .yP)(suit, element, jodit);
16394
+ }
16395
+ return {
16396
+ ...value,
16397
+ element: suit,
16398
+ next: states.ELEMENT
16399
+ };
16390
16400
  }
16401
+ // Create a new wrapper instead of splitting the block
16391
16402
  return {
16392
16403
  ...value,
16393
- element: suit,
16394
- next: states.ELEMENT
16404
+ next: states.WRAP
16395
16405
  };
16396
16406
  }
16397
16407
  },
@@ -16983,9 +16993,11 @@ const pluginKey = 'copy-format';
16983
16993
  * Plug-in copy and paste formatting from one element to another
16984
16994
  */
16985
16995
  const copyStyles = [
16996
+ 'lineHeight',
16986
16997
  'fontWeight',
16987
16998
  'fontStyle',
16988
16999
  'fontSize',
17000
+ 'fontFamily',
16989
17001
  'color',
16990
17002
  'margin',
16991
17003
  'padding',
@@ -16994,8 +17006,7 @@ const copyStyles = [
16994
17006
  'borderColor',
16995
17007
  'borderRadius',
16996
17008
  'backgroundColor',
16997
- 'textDecorationLine',
16998
- 'fontFamily'
17009
+ 'textDecorationLine'
16999
17010
  ];
17000
17011
  const getStyle = (editor, key, box, defaultStyles) => {
17001
17012
  let result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(box, key);