jodit 4.19.12 → 4.20.0

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 (219) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/es2015/jodit.css +76 -1
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +9 -9
  5. package/es2015/jodit.js +1583 -681
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +9 -9
  8. package/es2015/plugins/debug/debug.css +1 -1
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +9 -9
  16. package/es2018/jodit.min.css +1 -1
  17. package/es2018/jodit.min.js +9 -9
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  20. package/es2021/jodit.css +76 -1
  21. package/es2021/jodit.fat.min.css +1 -1
  22. package/es2021/jodit.fat.min.js +14 -14
  23. package/es2021/jodit.js +1564 -678
  24. package/es2021/jodit.min.css +1 -1
  25. package/es2021/jodit.min.js +14 -14
  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 +76 -1
  33. package/es2021.en/jodit.fat.min.css +1 -1
  34. package/es2021.en/jodit.fat.min.js +14 -14
  35. package/es2021.en/jodit.js +1514 -628
  36. package/es2021.en/jodit.min.css +1 -1
  37. package/es2021.en/jodit.min.js +14 -14
  38. package/es2021.en/plugins/debug/debug.css +1 -1
  39. package/es2021.en/plugins/debug/debug.js +1 -1
  40. package/es2021.en/plugins/debug/debug.min.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  44. package/es5/jodit.css +96 -2
  45. package/es5/jodit.fat.min.css +1 -1
  46. package/es5/jodit.fat.min.js +2 -2
  47. package/es5/jodit.js +1844 -791
  48. package/es5/jodit.min.css +3 -3
  49. package/es5/jodit.min.js +2 -2
  50. package/es5/plugins/debug/debug.css +1 -1
  51. package/es5/plugins/debug/debug.js +1 -1
  52. package/es5/plugins/debug/debug.min.js +1 -1
  53. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  56. package/es5/polyfills.fat.min.js +1 -1
  57. package/es5/polyfills.js +1 -1
  58. package/es5/polyfills.min.js +1 -1
  59. package/esm/config.d.ts +10 -3
  60. package/esm/core/constants.js +1 -1
  61. package/esm/core/global.d.ts +6 -0
  62. package/esm/core/global.js +21 -4
  63. package/esm/core/helpers/html/safe-html.js +26 -0
  64. package/esm/core/helpers/utils/anchor.d.ts +22 -0
  65. package/esm/core/helpers/utils/anchor.js +29 -0
  66. package/esm/core/helpers/utils/index.d.ts +1 -0
  67. package/esm/core/helpers/utils/index.js +1 -0
  68. package/esm/core/ui/popup/popup.d.ts +5 -0
  69. package/esm/core/ui/popup/popup.js +5 -0
  70. package/esm/jodit.d.ts +4 -0
  71. package/esm/jodit.js +16 -15
  72. package/esm/langs/ar.d.ts +5 -0
  73. package/esm/langs/ar.js +5 -0
  74. package/esm/langs/az.d.ts +5 -0
  75. package/esm/langs/az.js +5 -0
  76. package/esm/langs/cs_cz.d.ts +5 -0
  77. package/esm/langs/cs_cz.js +6 -1
  78. package/esm/langs/de.d.ts +5 -0
  79. package/esm/langs/de.js +6 -0
  80. package/esm/langs/es.d.ts +5 -0
  81. package/esm/langs/es.js +6 -1
  82. package/esm/langs/fa.d.ts +5 -0
  83. package/esm/langs/fa.js +6 -1
  84. package/esm/langs/fi.d.ts +5 -0
  85. package/esm/langs/fi.js +5 -0
  86. package/esm/langs/fr.d.ts +5 -0
  87. package/esm/langs/fr.js +5 -0
  88. package/esm/langs/he.d.ts +5 -0
  89. package/esm/langs/he.js +6 -1
  90. package/esm/langs/hu.d.ts +5 -0
  91. package/esm/langs/hu.js +5 -0
  92. package/esm/langs/id.d.ts +5 -0
  93. package/esm/langs/id.js +6 -1
  94. package/esm/langs/it.d.ts +5 -0
  95. package/esm/langs/it.js +6 -1
  96. package/esm/langs/ja.d.ts +5 -0
  97. package/esm/langs/ja.js +6 -1
  98. package/esm/langs/ko.d.ts +5 -0
  99. package/esm/langs/ko.js +6 -1
  100. package/esm/langs/mn.d.ts +5 -0
  101. package/esm/langs/mn.js +6 -1
  102. package/esm/langs/nl.d.ts +5 -0
  103. package/esm/langs/nl.js +5 -0
  104. package/esm/langs/no.d.ts +5 -0
  105. package/esm/langs/no.js +5 -0
  106. package/esm/langs/pl.d.ts +5 -0
  107. package/esm/langs/pl.js +5 -0
  108. package/esm/langs/pt_br.d.ts +5 -0
  109. package/esm/langs/pt_br.js +6 -1
  110. package/esm/langs/ru.d.ts +5 -0
  111. package/esm/langs/ru.js +6 -1
  112. package/esm/langs/sk.d.ts +5 -0
  113. package/esm/langs/sk.js +5 -0
  114. package/esm/langs/sv.d.ts +5 -0
  115. package/esm/langs/sv.js +5 -0
  116. package/esm/langs/tr.d.ts +5 -0
  117. package/esm/langs/tr.js +6 -1
  118. package/esm/langs/ua.d.ts +5 -0
  119. package/esm/langs/ua.js +6 -1
  120. package/esm/langs/zh_cn.d.ts +5 -0
  121. package/esm/langs/zh_cn.js +6 -1
  122. package/esm/langs/zh_tw.d.ts +5 -0
  123. package/esm/langs/zh_tw.js +5 -0
  124. package/esm/languages.js +7 -1
  125. package/esm/modules/file-browser/file-browser.d.ts +3 -4
  126. package/esm/modules/file-browser/file-browser.js +12 -12
  127. package/esm/modules/toolbar/button/button.d.ts +7 -0
  128. package/esm/modules/toolbar/button/button.js +30 -4
  129. package/esm/modules/uploader/config.js +18 -18
  130. package/esm/modules/uploader/helpers/index.d.ts +1 -0
  131. package/esm/modules/uploader/helpers/index.js +1 -0
  132. package/esm/modules/uploader/helpers/normalize-uploader-data.d.ts +32 -0
  133. package/esm/modules/uploader/helpers/normalize-uploader-data.js +54 -0
  134. package/esm/modules/uploader/helpers/send-files.js +11 -6
  135. package/esm/modules/uploader/uploader.d.ts +4 -5
  136. package/esm/modules/uploader/uploader.js +12 -8
  137. package/esm/plugins/all.d.ts +1 -0
  138. package/esm/plugins/all.js +1 -0
  139. package/esm/plugins/anchor/anchor.d.ts +67 -0
  140. package/esm/plugins/anchor/anchor.js +302 -0
  141. package/esm/plugins/anchor/config.d.ts +6 -0
  142. package/esm/plugins/anchor/config.js +13 -0
  143. package/esm/plugins/file/file.d.ts +1 -1
  144. package/esm/plugins/file/file.js +6 -6
  145. package/esm/plugins/image/image.js +2 -2
  146. package/esm/plugins/image-caption/image-caption.js +1 -2
  147. package/esm/plugins/image-properties/utils/open-image-popup.js +7 -6
  148. package/esm/plugins/index.d.ts +1 -0
  149. package/esm/plugins/inline-popup/config/config.d.ts +8 -2
  150. package/esm/plugins/inline-popup/config/config.js +1 -0
  151. package/esm/plugins/inline-popup/config/items/cells.js +0 -10
  152. package/esm/plugins/inline-popup/config/items/img.js +1 -1
  153. package/esm/plugins/inline-popup/inline-popup.d.ts +9 -12
  154. package/esm/plugins/inline-popup/inline-popup.js +53 -77
  155. package/esm/plugins/link/link.js +150 -3
  156. package/esm/plugins/select/select.d.ts +31 -0
  157. package/esm/plugins/select/select.js +235 -2
  158. package/esm/plugins/select-cells/select-cells.d.ts +11 -0
  159. package/esm/plugins/select-cells/select-cells.js +48 -17
  160. package/esm/plugins/video/config.d.ts +1 -1
  161. package/esm/plugins/video/config.js +4 -3
  162. package/esm/plugins/video-properties/video-properties.js +7 -6
  163. package/esm/styles/icons/anchor.svg.js +1 -0
  164. package/esm/styles/icons/index.d.ts +1 -1
  165. package/esm/styles/icons/index.js +2 -1
  166. package/esm/types/file-browser.d.ts +8 -1
  167. package/esm/types/popup.d.ts +1 -0
  168. package/esm/types/uploader.d.ts +39 -1
  169. package/package.json +1 -1
  170. package/types/config.d.ts +10 -3
  171. package/types/core/global.d.ts +6 -0
  172. package/types/core/helpers/utils/anchor.d.ts +22 -0
  173. package/types/core/helpers/utils/index.d.ts +1 -0
  174. package/types/core/ui/popup/popup.d.ts +5 -0
  175. package/types/jodit.d.ts +4 -0
  176. package/types/langs/ar.d.ts +5 -0
  177. package/types/langs/az.d.ts +5 -0
  178. package/types/langs/cs_cz.d.ts +5 -0
  179. package/types/langs/de.d.ts +5 -0
  180. package/types/langs/es.d.ts +5 -0
  181. package/types/langs/fa.d.ts +5 -0
  182. package/types/langs/fi.d.ts +5 -0
  183. package/types/langs/fr.d.ts +5 -0
  184. package/types/langs/he.d.ts +5 -0
  185. package/types/langs/hu.d.ts +5 -0
  186. package/types/langs/id.d.ts +5 -0
  187. package/types/langs/it.d.ts +5 -0
  188. package/types/langs/ja.d.ts +5 -0
  189. package/types/langs/ko.d.ts +5 -0
  190. package/types/langs/mn.d.ts +5 -0
  191. package/types/langs/nl.d.ts +5 -0
  192. package/types/langs/no.d.ts +5 -0
  193. package/types/langs/pl.d.ts +5 -0
  194. package/types/langs/pt_br.d.ts +5 -0
  195. package/types/langs/ru.d.ts +5 -0
  196. package/types/langs/sk.d.ts +5 -0
  197. package/types/langs/sv.d.ts +5 -0
  198. package/types/langs/tr.d.ts +5 -0
  199. package/types/langs/ua.d.ts +5 -0
  200. package/types/langs/zh_cn.d.ts +5 -0
  201. package/types/langs/zh_tw.d.ts +5 -0
  202. package/types/modules/file-browser/file-browser.d.ts +3 -4
  203. package/types/modules/toolbar/button/button.d.ts +7 -0
  204. package/types/modules/uploader/helpers/index.d.ts +1 -0
  205. package/types/modules/uploader/helpers/normalize-uploader-data.d.ts +32 -0
  206. package/types/modules/uploader/uploader.d.ts +4 -5
  207. package/types/plugins/anchor/anchor.d.ts +67 -0
  208. package/types/plugins/anchor/config.d.ts +6 -0
  209. package/types/plugins/file/file.d.ts +1 -1
  210. package/types/plugins/index.d.ts +1 -0
  211. package/types/plugins/inline-popup/config/config.d.ts +8 -2
  212. package/types/plugins/inline-popup/inline-popup.d.ts +9 -12
  213. package/types/plugins/select/select.d.ts +31 -0
  214. package/types/plugins/select-cells/select-cells.d.ts +11 -0
  215. package/types/plugins/video/config.d.ts +1 -1
  216. package/types/styles/icons/index.d.ts +1 -1
  217. package/types/types/file-browser.d.ts +8 -1
  218. package/types/types/popup.d.ts +1 -0
  219. package/types/types/uploader.d.ts +39 -1
package/CHANGELOG.md CHANGED
@@ -9,6 +9,36 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.20.0
13
+
14
+ #### :rocket: New Feature
15
+
16
+ - [#1715](https://github.com/xdan/jodit/issues/1715) Anchors: the new `anchor` plugin's Insert anchor button puts `<a id="name"></a>` at the caret, refusing a name with spaces or one already used. Each anchor shows as a marker in the editor only, and a click on it opens a form to rename the anchor, which updates the links to it, or to remove it. Older empty `<a name>` anchors count too and keep `name`. The link popup's URL field lists the document's anchors in a dropdown under "On this page", and picking one fills in its `#name`. Thanks [@brendon](https://github.com/brendon).
17
+ - The default toolbar gains the Insert anchor button, in the `insert` group, so every editor with the default `buttons` shows it. `removeButtons: ['anchor']` leaves it out.
18
+ - Empty `<a id>` and `<a name>` anchors already in a document now show a marker in the editor, and a click on one opens the anchor form. `disablePlugins: ['anchor']` leaves them as they were.
19
+ - [#1752](https://github.com/xdan/jodit/issues/1752) Upload and file browser handlers get `items`, one `{ file, isImage, name }` object per file. `uploader.process` and servers can answer with `items` instead of `files` and `isImages`. Thanks @brendon.
20
+ - [#1741](https://github.com/xdan/jodit/issues/1741) A button in an element's popup (cells, image, media, link, the selection toolbar) leaves that popup open beside its element and closes only the list it opened; the popup still closes on a click outside, on a key that moves the caret off the element and when a button removes the element. The new option `toolbarInlineKeepOpen` (default `true`) turns it off.
21
+
22
+ #### :boom: Breaking Change
23
+
24
+ - Inline popups no longer close after one of their buttons runs. Set `toolbarInlineKeepOpen: false` to get the old behaviour, where every button fired `closeAllPopups`.
25
+
26
+ #### :house: Internal
27
+
28
+ - [#1752](https://github.com/xdan/jodit/issues/1752) Deprecated: `files`, `isImages` and `fileNames` in the data upload and file browser handlers get. Use `items`. They will be removed in 5.0. Until then they win over `items` while `files` is set, so a handler that edits `items` and passes the data on to a default handler deletes `files` first. Thanks @brendon.
29
+
30
+ #### :bug: Bug Fix
31
+
32
+ - [#1768](https://github.com/xdan/jodit/issues/1768) A double click past the end of a line, or a drag from there to the start of the next, no longer selects only the line break (the caret goes to the end of the line and the selection toolbar does not open), and a drag that does not pass a video or iframe on its own line leaves it out; a selected video gets the selection tint over its own box.
33
+
34
+ ## 4.19.14
35
+
36
+ #### :bug: Bug Fix
37
+
38
+ - Security: an SVG animation could write a `javascript:` URL into a link after the sanitizer had run. `<svg><a><animate attributeName="href" values="javascript:…">` passed `safeHTML`, which checked only the static URL attributes, and a click on the link ran the script in Chromium and Safari (CWE-79, stored XSS in the default configuration). The `values`, `from`, `to` and `by` of `<animate>`, `<set>`, `<animateMotion>` and `<animateTransform>` now go through the same scheme check and are dropped when one of them holds a dangerous URL. Reported by David Vieira Kurz (HiSolutions AG), GHSA-6wrw-v5gj-6xg7.
39
+ - Security: `extendLang()` merged a language pack with `Object.assign` and no key filter, so a pack parsed from untrusted JSON with a `__proto__` key wrote into `Object.prototype` (CWE-1321). The keys `__proto__`, `constructor` and `prototype` are skipped on both levels, as `set()` and `Jodit.configure()` already did; the helper is also reachable as `Jodit.extendLang`. Reported by zx, GHSA-6gxg-6pj3-m22j.
40
+ - ESM build: a language file whose dictionary holds a `default` entry (`no.js`, "Standard") was taken for a module, so the Norwegian pack was replaced by that string, and the `default` of a CommonJS pack a plugin imports overwrote the translation. Both now unwrap a module only when `default` is a dictionary.
41
+
12
42
  ## 4.19.12
13
43
 
14
44
  #### :bug: Bug Fix
package/es2015/jodit.css 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.19.12
4
+ * Version: v4.20.0
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -4280,6 +4280,81 @@ html.jodit_fullsize-box_true {
4280
4280
  min-width: 700px;
4281
4281
  }
4282
4282
 
4283
+ .jodit-link-anchors {
4284
+ max-width: 360px;
4285
+ max-height: min(260px, 40vh);
4286
+ box-sizing: border-box;
4287
+ padding-bottom: calc(var(--jd-padding-default) / 2);
4288
+ overflow-y: auto;
4289
+ }
4290
+ .jodit-link-anchors__toggle {
4291
+ display: flex;
4292
+ flex-shrink: 0;
4293
+ align-items: center;
4294
+ align-self: stretch;
4295
+ padding: 0 var(--jd-padding-default);
4296
+ border: 0;
4297
+ background: none;
4298
+ color: var(--jd-color-icon);
4299
+ cursor: pointer;
4300
+ }
4301
+ .jodit-link-anchors__toggle:hover,
4302
+ .jodit-link-anchors__toggle[aria-expanded='true'] {
4303
+ background-color: var(--jd-color-background-button-hover);
4304
+ }
4305
+ .jodit-link-anchors__toggle svg {
4306
+ width: 10px;
4307
+ height: 10px;
4308
+ }
4309
+ .jodit-link-anchors__heading {
4310
+ padding: var(--jd-padding-default) var(--jd-padding-default) calc(var(--jd-padding-default) / 4);
4311
+ color: var(--jd-color-label);
4312
+ font-size: var(--jd-font-size-small);
4313
+ line-height: 1;
4314
+ text-transform: uppercase;
4315
+ }
4316
+ .jodit-link-anchors__item {
4317
+ display: flex;
4318
+ width: 100%;
4319
+ align-items: center;
4320
+ padding: calc(var(--jd-padding-default) / 2) var(--jd-padding-default);
4321
+ border: 0;
4322
+ background: none;
4323
+ color: var(--jd-color-default);
4324
+ cursor: pointer;
4325
+ font: inherit;
4326
+ gap: var(--jd-padding-default);
4327
+ text-align: left;
4328
+ }
4329
+ .jodit-link-anchors__item:hover,
4330
+ .jodit-link-anchors__item:focus-visible {
4331
+ background-color: var(--jd-color-background-button-hover);
4332
+ }
4333
+ .jodit-link-anchors__item[aria-current='true'] {
4334
+ font-weight: bold;
4335
+ }
4336
+ .jodit-link-anchors__item svg {
4337
+ width: 14px;
4338
+ height: 14px;
4339
+ flex-shrink: 0;
4340
+ color: var(--jd-color-icon);
4341
+ }
4342
+ .jodit-link-anchors__text,
4343
+ .jodit-link-anchors__name {
4344
+ overflow: hidden;
4345
+ text-overflow: ellipsis;
4346
+ white-space: nowrap;
4347
+ }
4348
+ .jodit-link-anchors__text {
4349
+ flex: 1;
4350
+ }
4351
+ .jodit-link-anchors__name {
4352
+ max-width: 35%;
4353
+ flex-shrink: 0;
4354
+ color: var(--jd-color-placeholder);
4355
+ font-size: var(--jd-font-size-small);
4356
+ }
4357
+
4283
4358
  /*!
4284
4359
  * Jodit Editor (https://xdsoft.net/jodit/)
4285
4360
  * Released under MIT see LICENSE.txt in the project root for license information.