suneditor 3.0.0-beta.21 → 3.0.0-beta.23

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 (95) hide show
  1. package/CONTRIBUTING.md +4 -6
  2. package/README.md +29 -12
  3. package/dist/suneditor.min.js +1 -1
  4. package/package.json +11 -11
  5. package/src/core/base/eventHandlers/handler_ww_key_input.js +1 -1
  6. package/src/core/base/eventManager.js +4 -4
  7. package/src/core/class/component.js +112 -32
  8. package/src/core/class/format.js +37 -48
  9. package/src/core/class/html.js +8 -8
  10. package/src/core/class/menu.js +2 -2
  11. package/src/core/class/nodeTransform.js +7 -10
  12. package/src/core/class/offset.js +3 -3
  13. package/src/core/class/selection.js +3 -1
  14. package/src/core/class/ui.js +3 -3
  15. package/src/core/config/options.js +8 -2
  16. package/src/core/editor.js +2 -2
  17. package/src/core/section/actives.js +3 -3
  18. package/src/core/section/constructor.js +4 -4
  19. package/src/helper/clipboard.js +22 -7
  20. package/src/helper/dom/domQuery.js +8 -16
  21. package/src/helper/dom/domUtils.js +3 -10
  22. package/src/modules/ApiManager.js +10 -10
  23. package/src/modules/Browser.js +3 -6
  24. package/src/modules/ColorPicker.js +1 -1
  25. package/src/modules/Controller.js +2 -2
  26. package/src/modules/Figure.js +46 -28
  27. package/src/modules/FileManager.js +4 -6
  28. package/src/modules/HueSlider.js +7 -9
  29. package/src/modules/Modal.js +4 -4
  30. package/src/modules/SelectMenu.js +5 -6
  31. package/src/plugins/browser/audioGallery.js +9 -5
  32. package/src/plugins/browser/fileBrowser.js +10 -6
  33. package/src/plugins/browser/fileGallery.js +9 -5
  34. package/src/plugins/browser/imageGallery.js +8 -4
  35. package/src/plugins/browser/videoGallery.js +9 -5
  36. package/src/plugins/command/exportPDF.js +7 -3
  37. package/src/plugins/command/fileUpload.js +23 -13
  38. package/src/plugins/dropdown/align.js +6 -2
  39. package/src/plugins/dropdown/backgroundColor.js +8 -4
  40. package/src/plugins/dropdown/font.js +6 -4
  41. package/src/plugins/dropdown/fontColor.js +8 -4
  42. package/src/plugins/dropdown/formatBlock.js +6 -2
  43. package/src/plugins/dropdown/hr.js +7 -3
  44. package/src/plugins/dropdown/layout.js +6 -2
  45. package/src/plugins/dropdown/lineHeight.js +6 -2
  46. package/src/plugins/dropdown/paragraphStyle.js +15 -11
  47. package/src/plugins/dropdown/table.js +24 -20
  48. package/src/plugins/dropdown/template.js +6 -2
  49. package/src/plugins/dropdown/textStyle.js +6 -2
  50. package/src/plugins/field/mention.js +14 -10
  51. package/src/plugins/input/fontSize.js +12 -8
  52. package/src/plugins/modal/audio.js +10 -4
  53. package/src/plugins/modal/drawing.js +2 -2
  54. package/src/plugins/modal/embed.js +23 -32
  55. package/src/plugins/modal/image.js +36 -36
  56. package/src/plugins/modal/math.js +2 -2
  57. package/src/plugins/modal/video.js +25 -39
  58. package/src/plugins/popup/anchor.js +6 -5
  59. package/src/typedef.js +11 -0
  60. package/types/core/class/component.d.ts +28 -4
  61. package/types/core/class/format.d.ts +6 -6
  62. package/types/core/class/menu.d.ts +2 -2
  63. package/types/core/class/ui.d.ts +1 -1
  64. package/types/core/config/options.d.ts +15 -3
  65. package/types/modules/Browser.d.ts +1 -1
  66. package/types/modules/Controller.d.ts +2 -2
  67. package/types/modules/Figure.d.ts +3 -4
  68. package/types/modules/Modal.d.ts +3 -3
  69. package/types/modules/SelectMenu.d.ts +2 -2
  70. package/types/plugins/browser/audioGallery.d.ts +29 -18
  71. package/types/plugins/browser/fileBrowser.d.ts +38 -27
  72. package/types/plugins/browser/fileGallery.d.ts +29 -18
  73. package/types/plugins/browser/imageGallery.d.ts +24 -16
  74. package/types/plugins/browser/videoGallery.d.ts +29 -18
  75. package/types/plugins/command/exportPDF.d.ts +17 -10
  76. package/types/plugins/command/fileUpload.d.ts +64 -27
  77. package/types/plugins/dropdown/align.d.ts +12 -8
  78. package/types/plugins/dropdown/backgroundColor.d.ts +28 -18
  79. package/types/plugins/dropdown/font.d.ts +12 -12
  80. package/types/plugins/dropdown/fontColor.d.ts +28 -18
  81. package/types/plugins/dropdown/formatBlock.d.ts +12 -8
  82. package/types/plugins/dropdown/hr.d.ts +15 -11
  83. package/types/plugins/dropdown/layout.d.ts +15 -11
  84. package/types/plugins/dropdown/lineHeight.d.ts +15 -11
  85. package/types/plugins/dropdown/paragraphStyle.d.ts +31 -27
  86. package/types/plugins/dropdown/table.d.ts +28 -15
  87. package/types/plugins/dropdown/template.d.ts +15 -11
  88. package/types/plugins/dropdown/textStyle.d.ts +19 -11
  89. package/types/plugins/field/mention.d.ts +58 -34
  90. package/types/plugins/input/fontSize.d.ts +44 -26
  91. package/types/plugins/modal/audio.d.ts +14 -0
  92. package/types/plugins/modal/embed.d.ts +15 -0
  93. package/types/plugins/modal/image.d.ts +20 -0
  94. package/types/plugins/modal/video.d.ts +15 -0
  95. package/types/typedef.d.ts +1 -0
package/CONTRIBUTING.md CHANGED
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## 📘 Introduction
6
6
 
7
- The codebase is written in **JavaScript (ES2020)**, using **JSDoc** for type definitions.
7
+ The codebase is written in **JavaScript**, using **JSDoc** for type definitions.
8
8
  Node.js **v14 or higher** is required to build and test.
9
9
 
10
10
  ### 📝 Notes
11
11
 
12
- - Uses modern syntax including:
13
- - Optional chaining (`?.`)
14
- - Nullish coalescing (`??`)
15
- - Private class fields (`#myField`)
16
- - Polyfills are **not included** – make sure your target environment supports these features.
12
+ - **Polyfills are not included**. Make sure your target environment (browser or runtime) natively supports these features.
13
+ - Target ECMAScript version: **ES2022**
14
+ - Supported browsers: [See Browser Support](./README.md#-browser-support)
17
15
 
18
16
  ---
19
17
 
package/README.md CHANGED
@@ -43,26 +43,37 @@ It's easy to integrate, highly customizable, and built for modern web applicatio
43
43
 
44
44
  ## 🌍 Browser Support
45
45
 
46
- | Browser | Since | Version |
47
- | ----------------------------------------------------------------------------------------------------------------------------------- | -------- | --------- |
48
- | ![Chrome](https://img.shields.io/badge/-Chrome-4285F4?logo=GoogleChrome&logoColor=white&style=flat-square) | Feb 2020 | 80 |
49
- | ![Firefox](https://img.shields.io/badge/-Firefox-FF7139?logo=FirefoxBrowser&logoColor=white&style=flat-square) | Jul 2021 | 90 |
50
- | ![Safari](https://img.shields.io/badge/-Safari-0D96F6?logo=Safari&logoColor=white&style=flat-square) | Apr 2021 | 14.1 |
51
- | ![Edge](https://img.shields.io/badge/-Edge-0078D7?logo=MicrosoftEdge&logoColor=white&style=flat-square) | Jan 2020 | 80 |
52
- | ![Opera](https://img.shields.io/badge/-Opera-FF1B2D?logo=Opera&logoColor=white&style=flat-square) | Feb 2020 | 67 |
53
- | ![iOS Safari](https://img.shields.io/badge/-iOS%20Safari-000000?logo=apple&logoColor=white&style=flat-square) | Apr 2021 | 14.5 |
54
- | ![Android WebView](https://img.shields.io/badge/-Android%20WebView-3DDC84?logo=android&logoColor=white&style=flat-square) | Feb 2020 | 80 |
55
- | ![Samsung Internet](https://img.shields.io/badge/-Samsung%20Internet-1428A0?logo=samsunginternet&logoColor=white&style=flat-square) | Apr 2020 | 13.0 |
46
+ SunEditor is built to take advantage of modern browser capabilities.
47
+ It does not ship with polyfills by default, but you can add them if your project requires broader compatibility.
48
+
49
+ > Works correctly on the following versions or newer.
50
+
51
+ | Browser | Version |
52
+ | ----------------------------------------------------------------------------------------------------------------------------------- | --------------- |
53
+ | ![Chrome](https://img.shields.io/badge/-Chrome-4285F4?logo=GoogleChrome&logoColor=white&style=flat-square) | 119 (Oct 2023) |
54
+ | ![Edge](https://img.shields.io/badge/-Edge-0078D7?logo=MicrosoftEdge&logoColor=white&style=flat-square) | 119 (Nov 2023) |
55
+ | ![Firefox](https://img.shields.io/badge/-Firefox-FF7139?logo=FirefoxBrowser&logoColor=white&style=flat-square) | 121 (Dec 2023) |
56
+ | ![Safari (macOS, iOS)](https://img.shields.io/badge/-Safari-0D96F6?logo=Safari&logoColor=white&style=flat-square) | 17.0 (Sep 2023) |
57
+ | ![Opera](https://img.shields.io/badge/-Opera-FF1B2D?logo=Opera&logoColor=white&style=flat-square) | 105 (Nov 2023) |
58
+ | ![Android WebView](https://img.shields.io/badge/-Android%20WebView-3DDC84?logo=android&logoColor=white&style=flat-square) | 119 (Oct 2023) |
59
+ | ![Samsung Internet](https://img.shields.io/badge/-Samsung%20Internet-1428A0?logo=samsunginternet&logoColor=white&style=flat-square) | 23.0 (Oct 2023) |
60
+ | ![Firefox ESR](https://img.shields.io/badge/-FirefoxESR-FF7139?logo=FirefoxBrowser&logoColor=white&style=flat-square) | 128 (Jul 2024) |
56
61
 
57
62
  ❌ Not Supported : IE, Legacy Edge
58
63
 
59
- > SunEditor is designed for modern browsers released since 2020.\
60
- > This includes support for ES2020+ features like optional chaining (?.), nullish coalescing (??), and private class fields (#field).
64
+ ### 📌 Why This Baseline? (Late 2023)
65
+
66
+ - This is based on features commonly supported by modern browsers.
67
+ - Most modern web APIs and CSS features are supported reliably in versions after this point.
68
+ - Unless specific compatibility issues arise, you can use it out of the box without additional polyfills.
69
+ - If you need support for older browsers, you can extend it by adding your own polyfills.
61
70
 
62
71
  ---
63
72
 
64
73
  ## 📦 Legacy Version (v2-legacy)
65
74
 
75
+ \* Supported IE11
76
+
66
77
  > **SunEditor v3 is the latest version.**
67
78
  > This section refers to the **previous stable version, SunEditor v2**.
68
79
 
@@ -152,6 +163,12 @@ See [Contribution Guide](./CONTRIBUTING.md#ai-plugin-helper) for tips and exampl
152
163
 
153
164
  ---
154
165
 
166
+ ## 💎 Sponsors
167
+
168
+ [![Financial Contributors on Open Collective](https://opencollective.com/suneditor/contributors.svg?width=890&avatarHeight=64&button=false)](https://opencollective.com/suneditor)
169
+
170
+ ---
171
+
155
172
  ## 📄 License
156
173
 
157
174
  SunEditor is an open-source project available under the [MIT License](./LICENSE).