jodit-pro 4.12.23 → 4.12.24

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 (299) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +6 -6
  3. package/es2015/jodit.js +195 -44
  4. package/es2015/jodit.min.js +6 -6
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  10. package/es2015/plugins/backup/backup.css +1 -1
  11. package/es2015/plugins/backup/backup.js +1 -1
  12. package/es2015/plugins/backup/backup.min.js +1 -1
  13. package/es2015/plugins/button-generator/button-generator.css +1 -1
  14. package/es2015/plugins/button-generator/button-generator.js +1 -1
  15. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  16. package/es2015/plugins/change-case/change-case.js +1 -1
  17. package/es2015/plugins/change-case/change-case.min.js +1 -1
  18. package/es2015/plugins/color-picker/color-picker.css +1 -1
  19. package/es2015/plugins/color-picker/color-picker.js +1 -1
  20. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  21. package/es2015/plugins/emoji/emoji.css +1 -1
  22. package/es2015/plugins/emoji/emoji.js +1 -1
  23. package/es2015/plugins/emoji/emoji.min.js +1 -1
  24. package/es2015/plugins/export-docs/export-docs.js +1 -1
  25. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  26. package/es2015/plugins/finder/finder.css +1 -1
  27. package/es2015/plugins/finder/finder.js +1 -1
  28. package/es2015/plugins/finder/finder.min.js +1 -1
  29. package/es2015/plugins/google-maps/google-maps.css +1 -1
  30. package/es2015/plugins/google-maps/google-maps.js +1 -1
  31. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  32. package/es2015/plugins/google-search/google-search.js +1 -1
  33. package/es2015/plugins/google-search/google-search.min.js +1 -1
  34. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  35. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  36. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  38. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  39. package/es2015/plugins/keyboard/keyboard.css +1 -1
  40. package/es2015/plugins/keyboard/keyboard.js +1 -1
  41. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  42. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  43. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  44. package/es2015/plugins/page-break/page-break.js +1 -1
  45. package/es2015/plugins/page-break/page-break.min.js +1 -1
  46. package/es2015/plugins/paste-code/paste-code.css +1 -1
  47. package/es2015/plugins/paste-code/paste-code.js +1 -1
  48. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  49. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  50. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  51. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  52. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  53. package/es2015/plugins/style/style.css +1 -1
  54. package/es2015/plugins/style/style.js +1 -1
  55. package/es2015/plugins/style/style.min.js +1 -1
  56. package/es2015/plugins/templates/templates.css +1 -1
  57. package/es2015/plugins/templates/templates.js +1 -1
  58. package/es2015/plugins/templates/templates.min.js +1 -1
  59. package/es2015/plugins/todo-list/todo-list.css +1 -1
  60. package/es2015/plugins/todo-list/todo-list.js +1 -1
  61. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  62. package/es2015/plugins/translate/translate.css +1 -1
  63. package/es2015/plugins/translate/translate.js +1 -1
  64. package/es2015/plugins/translate/translate.min.js +1 -1
  65. package/es2015/plugins/tune-block/tune-block.css +1 -1
  66. package/es2015/plugins/tune-block/tune-block.js +1 -1
  67. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  68. package/es2018/jodit.fat.min.js +6 -6
  69. package/es2018/jodit.min.js +6 -6
  70. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  71. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  72. package/es2018/plugins/backup/backup.min.js +1 -1
  73. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  74. package/es2018/plugins/change-case/change-case.min.js +1 -1
  75. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  76. package/es2018/plugins/emoji/emoji.min.js +1 -1
  77. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  78. package/es2018/plugins/finder/finder.min.js +1 -1
  79. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  80. package/es2018/plugins/google-search/google-search.min.js +1 -1
  81. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  82. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  83. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  84. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  85. package/es2018/plugins/page-break/page-break.min.js +1 -1
  86. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  87. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  88. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  89. package/es2018/plugins/style/style.min.js +1 -1
  90. package/es2018/plugins/templates/templates.min.js +1 -1
  91. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  92. package/es2018/plugins/translate/translate.min.js +1 -1
  93. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  94. package/es2021/jodit.css +1 -1
  95. package/es2021/jodit.fat.min.js +8 -8
  96. package/es2021/jodit.js +195 -44
  97. package/es2021/jodit.min.js +8 -8
  98. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  99. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  100. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  101. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  102. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  103. package/es2021/plugins/backup/backup.css +1 -1
  104. package/es2021/plugins/backup/backup.js +1 -1
  105. package/es2021/plugins/backup/backup.min.js +1 -1
  106. package/es2021/plugins/button-generator/button-generator.css +1 -1
  107. package/es2021/plugins/button-generator/button-generator.js +1 -1
  108. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  109. package/es2021/plugins/change-case/change-case.js +1 -1
  110. package/es2021/plugins/change-case/change-case.min.js +1 -1
  111. package/es2021/plugins/color-picker/color-picker.css +1 -1
  112. package/es2021/plugins/color-picker/color-picker.js +1 -1
  113. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  114. package/es2021/plugins/emoji/emoji.css +1 -1
  115. package/es2021/plugins/emoji/emoji.js +1 -1
  116. package/es2021/plugins/emoji/emoji.min.js +1 -1
  117. package/es2021/plugins/export-docs/export-docs.js +1 -1
  118. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  119. package/es2021/plugins/finder/finder.css +1 -1
  120. package/es2021/plugins/finder/finder.js +1 -1
  121. package/es2021/plugins/finder/finder.min.js +1 -1
  122. package/es2021/plugins/google-maps/google-maps.css +1 -1
  123. package/es2021/plugins/google-maps/google-maps.js +1 -1
  124. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  125. package/es2021/plugins/google-search/google-search.js +1 -1
  126. package/es2021/plugins/google-search/google-search.min.js +1 -1
  127. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  128. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  129. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  130. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  131. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  132. package/es2021/plugins/keyboard/keyboard.css +1 -1
  133. package/es2021/plugins/keyboard/keyboard.js +1 -1
  134. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  135. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  136. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  137. package/es2021/plugins/page-break/page-break.js +1 -1
  138. package/es2021/plugins/page-break/page-break.min.js +1 -1
  139. package/es2021/plugins/paste-code/paste-code.css +1 -1
  140. package/es2021/plugins/paste-code/paste-code.js +1 -1
  141. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  142. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  143. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  144. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  145. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  146. package/es2021/plugins/style/style.css +1 -1
  147. package/es2021/plugins/style/style.js +1 -1
  148. package/es2021/plugins/style/style.min.js +1 -1
  149. package/es2021/plugins/templates/templates.css +1 -1
  150. package/es2021/plugins/templates/templates.js +1 -1
  151. package/es2021/plugins/templates/templates.min.js +1 -1
  152. package/es2021/plugins/todo-list/todo-list.css +1 -1
  153. package/es2021/plugins/todo-list/todo-list.js +1 -1
  154. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  155. package/es2021/plugins/translate/translate.css +1 -1
  156. package/es2021/plugins/translate/translate.js +1 -1
  157. package/es2021/plugins/translate/translate.min.js +1 -1
  158. package/es2021/plugins/tune-block/tune-block.css +1 -1
  159. package/es2021/plugins/tune-block/tune-block.js +1 -1
  160. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  161. package/es2021.en/jodit.css +1 -1
  162. package/es2021.en/jodit.fat.min.js +8 -8
  163. package/es2021.en/jodit.js +195 -44
  164. package/es2021.en/jodit.min.js +8 -8
  165. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  166. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  167. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  168. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  169. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  170. package/es2021.en/plugins/backup/backup.css +1 -1
  171. package/es2021.en/plugins/backup/backup.js +1 -1
  172. package/es2021.en/plugins/backup/backup.min.js +1 -1
  173. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  174. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  175. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  176. package/es2021.en/plugins/change-case/change-case.js +1 -1
  177. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  178. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  179. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  180. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  181. package/es2021.en/plugins/emoji/emoji.css +1 -1
  182. package/es2021.en/plugins/emoji/emoji.js +1 -1
  183. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  184. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  185. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  186. package/es2021.en/plugins/finder/finder.css +1 -1
  187. package/es2021.en/plugins/finder/finder.js +1 -1
  188. package/es2021.en/plugins/finder/finder.min.js +1 -1
  189. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  190. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  191. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  192. package/es2021.en/plugins/google-search/google-search.js +1 -1
  193. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  194. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  195. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  196. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  197. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  198. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  199. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  200. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  201. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  202. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  203. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  204. package/es2021.en/plugins/page-break/page-break.js +1 -1
  205. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  206. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  207. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  208. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  209. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  210. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  211. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  212. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  213. package/es2021.en/plugins/style/style.css +1 -1
  214. package/es2021.en/plugins/style/style.js +1 -1
  215. package/es2021.en/plugins/style/style.min.js +1 -1
  216. package/es2021.en/plugins/templates/templates.css +1 -1
  217. package/es2021.en/plugins/templates/templates.js +1 -1
  218. package/es2021.en/plugins/templates/templates.min.js +1 -1
  219. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  220. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  221. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  222. package/es2021.en/plugins/translate/translate.css +1 -1
  223. package/es2021.en/plugins/translate/translate.js +1 -1
  224. package/es2021.en/plugins/translate/translate.min.js +1 -1
  225. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  226. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  227. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  228. package/es5/jodit.css +2 -2
  229. package/es5/jodit.fat.min.js +2 -2
  230. package/es5/jodit.js +214 -50
  231. package/es5/jodit.min.css +2 -2
  232. package/es5/jodit.min.js +2 -2
  233. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  234. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  235. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  236. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  237. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  238. package/es5/plugins/backup/backup.css +1 -1
  239. package/es5/plugins/backup/backup.js +1 -1
  240. package/es5/plugins/backup/backup.min.js +1 -1
  241. package/es5/plugins/button-generator/button-generator.css +1 -1
  242. package/es5/plugins/button-generator/button-generator.js +1 -1
  243. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  244. package/es5/plugins/change-case/change-case.js +1 -1
  245. package/es5/plugins/change-case/change-case.min.js +1 -1
  246. package/es5/plugins/color-picker/color-picker.css +1 -1
  247. package/es5/plugins/color-picker/color-picker.js +1 -1
  248. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  249. package/es5/plugins/emoji/emoji.css +1 -1
  250. package/es5/plugins/emoji/emoji.js +1 -1
  251. package/es5/plugins/emoji/emoji.min.js +1 -1
  252. package/es5/plugins/export-docs/export-docs.js +1 -1
  253. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  254. package/es5/plugins/finder/finder.css +1 -1
  255. package/es5/plugins/finder/finder.js +1 -1
  256. package/es5/plugins/finder/finder.min.js +1 -1
  257. package/es5/plugins/google-maps/google-maps.css +1 -1
  258. package/es5/plugins/google-maps/google-maps.js +1 -1
  259. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  260. package/es5/plugins/google-search/google-search.js +1 -1
  261. package/es5/plugins/google-search/google-search.min.js +1 -1
  262. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  263. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  264. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  265. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  266. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  267. package/es5/plugins/keyboard/keyboard.css +1 -1
  268. package/es5/plugins/keyboard/keyboard.js +1 -1
  269. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  270. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  271. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  272. package/es5/plugins/page-break/page-break.js +1 -1
  273. package/es5/plugins/page-break/page-break.min.js +1 -1
  274. package/es5/plugins/paste-code/paste-code.css +1 -1
  275. package/es5/plugins/paste-code/paste-code.js +1 -1
  276. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  277. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  278. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  279. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  280. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  281. package/es5/plugins/style/style.css +1 -1
  282. package/es5/plugins/style/style.js +1 -1
  283. package/es5/plugins/style/style.min.js +1 -1
  284. package/es5/plugins/templates/templates.css +1 -1
  285. package/es5/plugins/templates/templates.js +1 -1
  286. package/es5/plugins/templates/templates.min.js +1 -1
  287. package/es5/plugins/todo-list/todo-list.css +1 -1
  288. package/es5/plugins/todo-list/todo-list.js +1 -1
  289. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  290. package/es5/plugins/translate/translate.css +1 -1
  291. package/es5/plugins/translate/translate.js +1 -1
  292. package/es5/plugins/translate/translate.min.js +1 -1
  293. package/es5/plugins/tune-block/tune-block.css +1 -1
  294. package/es5/plugins/tune-block/tune-block.js +1 -1
  295. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  296. package/es5/polyfills.fat.min.js +1 -1
  297. package/es5/polyfills.js +1 -1
  298. package/es5/polyfills.min.js +1 -1
  299. package/package.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.12.23
4
+ * Version: v4.12.24
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1746,7 +1746,7 @@ __webpack_require__.r(__webpack_exports__);
1746
1746
  * ```
1747
1747
  * @packageDocumentation
1748
1748
  * @module constants
1749
- */ const APP_VERSION = "4.12.23";
1749
+ */ const APP_VERSION = "4.12.24";
1750
1750
  // prettier-ignore
1751
1751
  const ES = "es2021";
1752
1752
  const IS_ES_MODERN = true;
@@ -5597,6 +5597,16 @@ function normalizeCSS(s) {
5597
5597
  iframeDoc.open();
5598
5598
  iframeDoc.write(html);
5599
5599
  iframeDoc.close();
5600
+ // Word marks its auto-generated list markers (the literal
5601
+ // bullet/number, e.g. `1.` or `·`) with `mso-list:Ignore`.
5602
+ // They are display-only and must not be imported, otherwise
5603
+ // the marker text leaks into the content. Drop them before any
5604
+ // style normalization strips the `mso-list` hint. See #948
5605
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
5606
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test(node.getAttribute('style') || '')) {
5607
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
5608
+ }
5609
+ });
5600
5610
  try {
5601
5611
  for(let i = 0; i < iframeDoc.styleSheets.length; i += 1){
5602
5612
  const rules = iframeDoc.styleSheets[i].cssRules;
@@ -5693,6 +5703,15 @@ function normalizeCSS(s) {
5693
5703
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(node);
5694
5704
  break;
5695
5705
  default:
5706
+ // Word marks its auto-generated list markers
5707
+ // (the literal bullet/number, e.g. `1.` or `·`)
5708
+ // with `mso-list:Ignore`. They are display-only
5709
+ // and must not be imported, otherwise the marker
5710
+ // text leaks into the content. See #948
5711
+ if (/mso-list:\s*ignore/i.test(node.getAttribute('style') || '')) {
5712
+ marks.push(node);
5713
+ break;
5714
+ }
5696
5715
  (0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(node.attributes).forEach((attr)=>{
5697
5716
  if ([
5698
5717
  'src',
@@ -5830,20 +5849,20 @@ function normalizeCSS(s) {
5830
5849
  return;
5831
5850
  }
5832
5851
  const removeEvents = (_a = options.removeEventAttributes) !== null && _a !== void 0 ? _a : options.removeOnError;
5833
- if (removeEvents) {
5834
- removeAllEventAttributes(box);
5835
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('*', box).forEach((elm)=>removeAllEventAttributes(elm));
5836
- } else if (options.removeOnError) {
5837
- sanitizeHTMLElement(box, options);
5838
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('[onerror]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5839
- }
5840
- if (options.safeJavaScriptLink) {
5841
- sanitizeHTMLElement(box, options);
5842
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('a[href^="javascript"]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5843
- }
5844
- if (options.safeLinksTarget) {
5845
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('a[target="_blank"]', box).forEach((elm)=>{
5846
- const rel = elm.getAttribute('rel') || '';
5852
+ // Single synchronous traversal of the subtree. Besides removing event
5853
+ // handlers and `javascript:` links, `sanitizeHTMLElement` neutralises
5854
+ // executable `iframe[srcdoc]`, `data:text/html` / SVG `data:` document
5855
+ // sources and dangerous schemes in every URL-bearing attribute.
5856
+ const process = (node)=>{
5857
+ if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(node)) {
5858
+ return;
5859
+ }
5860
+ if (removeEvents) {
5861
+ removeAllEventAttributes(node);
5862
+ }
5863
+ sanitizeHTMLElement(node, options);
5864
+ if (options.safeLinksTarget && node.nodeName === 'A' && node.getAttribute('target') === '_blank') {
5865
+ const rel = node.getAttribute('rel') || '';
5847
5866
  const parts = rel.split(/\s+/).filter(Boolean);
5848
5867
  if (!parts.includes('noopener')) {
5849
5868
  parts.push('noopener');
@@ -5851,9 +5870,11 @@ function normalizeCSS(s) {
5851
5870
  if (!parts.includes('noreferrer')) {
5852
5871
  parts.push('noreferrer');
5853
5872
  }
5854
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
5855
- });
5856
- }
5873
+ (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(node, 'rel', parts.join(' '));
5874
+ }
5875
+ };
5876
+ process(box);
5877
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(box, process);
5857
5878
  }
5858
5879
  /**
5859
5880
  * Remove all on* event handler attributes from an element
@@ -5874,6 +5895,41 @@ function normalizeCSS(s) {
5874
5895
  }
5875
5896
  return effected;
5876
5897
  }
5898
+ /**
5899
+ * URL-bearing attributes (besides `href`) that can load or execute content.
5900
+ */ const URL_ATTRIBUTES = [
5901
+ 'src',
5902
+ 'data',
5903
+ 'action',
5904
+ 'formaction',
5905
+ 'poster',
5906
+ 'background',
5907
+ 'xlink:href'
5908
+ ];
5909
+ /**
5910
+ * Tags that load their URL as a *document* (scripts inside run). An SVG data
5911
+ * URL is only an XSS vector here — as an `<img>` source it renders inertly.
5912
+ */ const DOCUMENT_EMBED_TAGS = new Set([
5913
+ 'iframe',
5914
+ 'frame',
5915
+ 'object',
5916
+ 'embed'
5917
+ ]);
5918
+ /**
5919
+ * Detects executable / script-bearing URL schemes. The attribute value is
5920
+ * already HTML-entity-decoded by `getAttribute`, so only whitespace and
5921
+ * control characters (which browsers ignore inside a scheme) need stripping.
5922
+ */ function isDangerousUrl(value, tagName) {
5923
+ // eslint-disable-next-line no-control-regex
5924
+ const normalized = value.replace(/[\u0000-\u0020]+/g, '').toLowerCase();
5925
+ if (/^(?:javascript|vbscript|livescript|mocha):/.test(normalized)) {
5926
+ return true;
5927
+ }
5928
+ if (/^data:(?:text\/html|application\/xhtml)/.test(normalized)) {
5929
+ return true;
5930
+ }
5931
+ return /^data:image\/svg/.test(normalized) && DOCUMENT_EMBED_TAGS.has(tagName);
5932
+ }
5877
5933
  function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
5878
5934
  safeJavaScriptLink: true,
5879
5935
  removeOnError: true
@@ -5891,6 +5947,22 @@ function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
5891
5947
  (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'href', location.protocol + '//' + href);
5892
5948
  effected = true;
5893
5949
  }
5950
+ if (safeJavaScriptLink) {
5951
+ // `srcdoc` runs its content as a full HTML document — drop it entirely.
5952
+ if (elm.hasAttribute('srcdoc')) {
5953
+ (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'srcdoc', null);
5954
+ effected = true;
5955
+ }
5956
+ // Strip executable schemes from any other URL-bearing attribute.
5957
+ const tagName = elm.nodeName.toLowerCase();
5958
+ for (const name of URL_ATTRIBUTES){
5959
+ const value = elm.getAttribute(name);
5960
+ if (value && isDangerousUrl(value, tagName)) {
5961
+ (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, name, null);
5962
+ effected = true;
5963
+ }
5964
+ }
5965
+ }
5894
5966
  return effected;
5895
5967
  }
5896
5968
 
@@ -5938,7 +6010,7 @@ const ALONE_TAGS = new Set([
5938
6010
  ]);
5939
6011
  /**
5940
6012
  * Extract plain text from HTML text
5941
- */ function stripTags(html, doc = document, exclude = null) {
6013
+ */ function stripTags(html, doc = document, exclude = null, blockBr = false) {
5942
6014
  const tmp = doc.createElement('div');
5943
6015
  if ((0,_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(html)) {
5944
6016
  tmp.innerHTML = html;
@@ -5952,7 +6024,7 @@ const ALONE_TAGS = new Set([
5952
6024
  }
5953
6025
  if (exclude && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, exclude)) {
5954
6026
  const tag = p.nodeName.toLowerCase();
5955
- const text = !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, ALONE_TAGS) ? `%%%jodit-${tag}%%%${stripTags(p.innerHTML, doc, exclude)}%%%/jodit-${tag}%%%` : `%%%jodit-single-${tag}%%%`;
6027
+ const text = !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, ALONE_TAGS) ? `%%%jodit-${tag}%%%${stripTags(p.innerHTML, doc, exclude, blockBr)}%%%/jodit-${tag}%%%` : `%%%jodit-single-${tag}%%%`;
5956
6028
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(p, doc.createTextNode(text));
5957
6029
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(p);
5958
6030
  return;
@@ -5969,7 +6041,11 @@ const ALONE_TAGS = new Set([
5969
6041
  return;
5970
6042
  }
5971
6043
  if (nx) {
5972
- pr.insertBefore(doc.createTextNode(' '), nx);
6044
+ // By default blocks are joined with a single space (single-line
6045
+ // plain text). When `blockBr` is set, separate them with a line
6046
+ // break instead, so paragraph structure survives — e.g. the
6047
+ // "Insert only Text" paste option. See #1232
6048
+ pr.insertBefore(doc.createTextNode(blockBr ? '%%%jodit-single-br%%%' : ' '), nx);
5973
6049
  }
5974
6050
  });
5975
6051
  return restoreTags((0,_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trim)(tmp.innerText));
@@ -7657,7 +7733,6 @@ function ConfigDeepFlatten(obj) {
7657
7733
  return url;
7658
7734
  }
7659
7735
  const parser = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
7660
- const pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7661
7736
  parser.href = url;
7662
7737
  if (!width) {
7663
7738
  width = 400;
@@ -7669,19 +7744,41 @@ function ConfigDeepFlatten(obj) {
7669
7744
  switch(parser.hostname){
7670
7745
  case 'www.vimeo.com':
7671
7746
  case 'vimeo.com':
7672
- return pattern1.test(url) ? url.replace(pattern1, '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>') : url;
7747
+ {
7748
+ // The numeric video id can be preceded by `channels/<name>/` or
7749
+ // `groups/<name>/videos/` and followed by tracking params (e.g.
7750
+ // `?share=copy`). Unlisted videos keep a hash right after the id
7751
+ // (`vimeo.com/<id>/<hash>`). Extract the id (+ hash) from the path
7752
+ // so all of those forms produce a valid embed. See #1209
7753
+ const segments = parser.pathname.split('/').filter(Boolean);
7754
+ const idIndex = segments.findIndex((s)=>/^\d+$/.test(s));
7755
+ if (idIndex === -1) {
7756
+ return url;
7757
+ }
7758
+ let path = segments[idIndex];
7759
+ const hash = segments[idIndex + 1];
7760
+ if (hash && idIndex === 0) {
7761
+ path += '/' + hash;
7762
+ }
7763
+ return '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//player.vimeo.com/video/' + path + '" frameborder="0" allowfullscreen></iframe>';
7764
+ }
7673
7765
  case 'youtube.com':
7674
7766
  case 'www.youtube.com':
7767
+ case 'm.youtube.com':
7768
+ case 'music.youtube.com':
7675
7769
  case 'youtu.be':
7676
7770
  case 'www.youtu.be':
7677
7771
  {
7678
- const query = parser.search ? (0,_parse_query_js__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(parser.search) : {
7679
- v: parser.pathname.substring(1)
7680
- };
7681
- if (/^embed\/.*/.test(query.v)) {
7682
- query.v = query.v.substring(6);
7683
- }
7684
- return query.v ? '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//www.youtube.com/embed/' + query.v + '" frameborder="0" allowfullscreen></iframe>' : url;
7772
+ const query = parser.search ? (0,_parse_query_js__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(parser.search) : {};
7773
+ // `youtube.com/watch` keeps the video id in the `v` query
7774
+ // parameter, while the short `youtu.be/<id>` links and the
7775
+ // `/embed/`, `/shorts/`, `/live/` paths keep it in the pathname.
7776
+ // Modern share urls add tracking params (e.g. `?si=`, `?t=`), so
7777
+ // the pathname must still be used as a fallback when there is no
7778
+ // `v`. See #1209
7779
+ let v = query.v || parser.pathname.substring(1);
7780
+ v = v.replace(/^(watch|embed|shorts|live|v)\//, '').replace(/\/$/, '');
7781
+ return v ? '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//www.youtube.com/embed/' + v + '" frameborder="0" allowfullscreen></iframe>' : url;
7685
7782
  }
7686
7783
  }
7687
7784
  return url;
@@ -17413,6 +17510,23 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
17413
17510
  }
17414
17511
  this.synchronizeValues();
17415
17512
  }
17513
+ }).on(this.ow, 'mouseup', (event)=>{
17514
+ if (this.o.readonly || this.__isSilentChange) {
17515
+ return;
17516
+ }
17517
+ // When a selection is started inside the editor and the
17518
+ // mouse button is released outside of it, the editable
17519
+ // area never receives the `mouseup` event, so the toolbar
17520
+ // state (active buttons) is not recalculated. Re-fire the
17521
+ // event manually for that case while the selection still
17522
+ // belongs to the editor. See #1251
17523
+ const target = event.target;
17524
+ const insideEditor = Boolean(target && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isNumber)(target.nodeType) && editor.contains(target));
17525
+ if (insideEditor || !this.s.isInsideArea) {
17526
+ return;
17527
+ }
17528
+ this.e.fire('changeSelection');
17529
+ this.synchronizeValues();
17416
17530
  });
17417
17531
  }
17418
17532
  fetch(url, options) {
@@ -28827,9 +28941,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.uploader = {
28827
28941
  insertImageAsBase64URI: false,
28828
28942
  imagesExtensions: [
28829
28943
  'jpg',
28830
- 'png',
28831
28944
  'jpeg',
28832
- 'gif'
28945
+ 'png',
28946
+ 'gif',
28947
+ 'webp',
28948
+ 'bmp',
28949
+ 'svg',
28950
+ 'tiff',
28951
+ 'avif'
28833
28952
  ],
28834
28953
  headers: null,
28835
28954
  data: null,
@@ -33208,8 +33327,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
33208
33327
  const update = (key, value)=>{
33209
33328
  if (value && value !== (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(editor.editor, key).toString()) {
33210
33329
  button.state.icon.fill = value;
33211
- return;
33330
+ return true;
33212
33331
  }
33332
+ return false;
33213
33333
  };
33214
33334
  if (color) {
33215
33335
  const mode = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color');
@@ -33219,8 +33339,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
33219
33339
  const current = editor.s.current();
33220
33340
  if (current && !button.state.disabled) {
33221
33341
  const currentBpx = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor) || editor.editor;
33222
- update('color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'color').toString());
33223
- update('background-color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'background-color').toString());
33342
+ // The icon's fill mirrors the current text/background color so the
33343
+ // button reflects the formatting under the caret. Both calls run so
33344
+ // that a background color (the second call) wins over the text color
33345
+ // when both are set. Keep the computed fill instead of resetting it
33346
+ // below. See #195, #182
33347
+ const hasColor = update('color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'color').toString());
33348
+ const hasBackground = update('background-color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'background-color').toString());
33349
+ if (hasColor || hasBackground) {
33350
+ return;
33351
+ }
33224
33352
  }
33225
33353
  button.state.icon.fill = '';
33226
33354
  button.state.activated = false;
@@ -35782,7 +35910,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.commandToHotkeys = {
35782
35910
  'cmd+shift+7'
35783
35911
  ],
35784
35912
  insertUnorderedList: [
35785
- 'ctrl+shift+8, cmd+shift+8'
35913
+ 'ctrl+shift+8',
35914
+ 'cmd+shift+8'
35786
35915
  ],
35787
35916
  selectall: [
35788
35917
  'ctrl+a',
@@ -37967,14 +38096,31 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.indent = {
37967
38096
  };
37968
38097
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.outdent = {
37969
38098
  isDisabled: (editor)=>{
38099
+ var _a;
37970
38100
  const current = editor.s.current();
37971
- if (current) {
37972
- const currentBox = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor);
37973
- if (currentBox) {
37974
- const arrow = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getKey)(editor.o.direction, currentBox);
37975
- return !currentBox.style[arrow] || parseInt(currentBox.style[arrow], 10) <= 0;
38101
+ if (!current) {
38102
+ return true;
38103
+ }
38104
+ // A list item whose list is nested inside another list item can be
38105
+ // outdented (un-nested) by the `tab` plugin, even without an inline
38106
+ // indent margin. Keep the button enabled in that case. See #1247
38107
+ if ((_a = editor.o.tab) === null || _a === void 0 ? void 0 : _a.tabInsideLiInsertNewList) {
38108
+ const li = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'li', editor.editor);
38109
+ if (li) {
38110
+ const list = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(li, [
38111
+ 'ul',
38112
+ 'ol'
38113
+ ], editor.editor);
38114
+ if (list && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(list, 'li', editor.editor)) {
38115
+ return false;
38116
+ }
37976
38117
  }
37977
38118
  }
38119
+ const currentBox = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor);
38120
+ if (currentBox) {
38121
+ const arrow = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getKey)(editor.o.direction, currentBox);
38122
+ return !currentBox.style[arrow] || parseInt(currentBox.style[arrow], 10) <= 0;
38123
+ }
37978
38124
  return true;
37979
38125
  },
37980
38126
  tooltip: 'Decrease Indent'
@@ -40829,7 +40975,7 @@ class pasteFromWord extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
40829
40975
  }
40830
40976
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_ONLY_TEXT:
40831
40977
  {
40832
- html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.stripTags)((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.cleanFromWord)(html));
40978
+ html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.stripTags)((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.cleanFromWord)(html), this.j.ed, new Set(this.j.o.pasteExcludeStripTags), this.j.o.nl2brInPlainText);
40833
40979
  break;
40834
40980
  }
40835
40981
  }
@@ -41377,10 +41523,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
41377
41523
  html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)(html);
41378
41524
  break;
41379
41525
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_ONLY_TEXT:
41380
- html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(html, this.j.ed, new Set(this.j.o.pasteExcludeStripTags));
41526
+ html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(html, this.j.ed, new Set(this.j.o.pasteExcludeStripTags), this.j.o.nl2brInPlainText);
41381
41527
  break;
41382
41528
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_TEXT:
41383
41529
  html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(html);
41530
+ // Keep the source line breaks instead of letting the raw
41531
+ // newlines collapse into spaces when rendered. See #1093
41532
+ if (this.j.o.nl2brInPlainText) {
41533
+ html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.nl2br)(html);
41534
+ }
41384
41535
  break;
41385
41536
  default:
41386
41537
  {