jodit-pro 4.12.23 → 4.12.25

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/es2015/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.25
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1797,7 +1797,7 @@ __webpack_require__.r(__webpack_exports__);
1797
1797
  * ```
1798
1798
  * @packageDocumentation
1799
1799
  * @module constants
1800
- */ const APP_VERSION = "4.12.23";
1800
+ */ const APP_VERSION = "4.12.25";
1801
1801
  // prettier-ignore
1802
1802
  const ES = "es2015";
1803
1803
  const IS_ES_MODERN = true;
@@ -5648,6 +5648,16 @@ function normalizeCSS(s) {
5648
5648
  iframeDoc.open();
5649
5649
  iframeDoc.write(html);
5650
5650
  iframeDoc.close();
5651
+ // Word marks its auto-generated list markers (the literal
5652
+ // bullet/number, e.g. `1.` or `·`) with `mso-list:Ignore`.
5653
+ // They are display-only and must not be imported, otherwise
5654
+ // the marker text leaks into the content. Drop them before any
5655
+ // style normalization strips the `mso-list` hint. See #948
5656
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
5657
+ if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test(node.getAttribute('style') || '')) {
5658
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
5659
+ }
5660
+ });
5651
5661
  try {
5652
5662
  for(let i = 0; i < iframeDoc.styleSheets.length; i += 1){
5653
5663
  const rules = iframeDoc.styleSheets[i].cssRules;
@@ -5744,6 +5754,15 @@ function normalizeCSS(s) {
5744
5754
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(node);
5745
5755
  break;
5746
5756
  default:
5757
+ // Word marks its auto-generated list markers
5758
+ // (the literal bullet/number, e.g. `1.` or `·`)
5759
+ // with `mso-list:Ignore`. They are display-only
5760
+ // and must not be imported, otherwise the marker
5761
+ // text leaks into the content. See #948
5762
+ if (/mso-list:\s*ignore/i.test(node.getAttribute('style') || '')) {
5763
+ marks.push(node);
5764
+ break;
5765
+ }
5747
5766
  (0,_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__.toArray)(node.attributes).forEach((attr)=>{
5748
5767
  if ([
5749
5768
  'src',
@@ -5881,20 +5900,20 @@ function normalizeCSS(s) {
5881
5900
  return;
5882
5901
  }
5883
5902
  const removeEvents = (_a = options.removeEventAttributes) !== null && _a !== void 0 ? _a : options.removeOnError;
5884
- if (removeEvents) {
5885
- removeAllEventAttributes(box);
5886
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('*', box).forEach((elm)=>removeAllEventAttributes(elm));
5887
- } else if (options.removeOnError) {
5888
- sanitizeHTMLElement(box, options);
5889
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('[onerror]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5890
- }
5891
- if (options.safeJavaScriptLink) {
5892
- sanitizeHTMLElement(box, options);
5893
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('a[href^="javascript"]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5894
- }
5895
- if (options.safeLinksTarget) {
5896
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.$$)('a[target="_blank"]', box).forEach((elm)=>{
5897
- const rel = elm.getAttribute('rel') || '';
5903
+ // Single synchronous traversal of the subtree. Besides removing event
5904
+ // handlers and `javascript:` links, `sanitizeHTMLElement` neutralises
5905
+ // executable `iframe[srcdoc]`, `data:text/html` / SVG `data:` document
5906
+ // sources and dangerous schemes in every URL-bearing attribute.
5907
+ const process = (node)=>{
5908
+ if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(node)) {
5909
+ return;
5910
+ }
5911
+ if (removeEvents) {
5912
+ removeAllEventAttributes(node);
5913
+ }
5914
+ sanitizeHTMLElement(node, options);
5915
+ if (options.safeLinksTarget && node.nodeName === 'A' && node.getAttribute('target') === '_blank') {
5916
+ const rel = node.getAttribute('rel') || '';
5898
5917
  const parts = rel.split(/\s+/).filter(Boolean);
5899
5918
  if (!parts.includes('noopener')) {
5900
5919
  parts.push('noopener');
@@ -5902,9 +5921,11 @@ function normalizeCSS(s) {
5902
5921
  if (!parts.includes('noreferrer')) {
5903
5922
  parts.push('noreferrer');
5904
5923
  }
5905
- (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
5906
- });
5907
- }
5924
+ (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(node, 'rel', parts.join(' '));
5925
+ }
5926
+ };
5927
+ process(box);
5928
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(box, process);
5908
5929
  }
5909
5930
  /**
5910
5931
  * Remove all on* event handler attributes from an element
@@ -5925,6 +5946,41 @@ function normalizeCSS(s) {
5925
5946
  }
5926
5947
  return effected;
5927
5948
  }
5949
+ /**
5950
+ * URL-bearing attributes (besides `href`) that can load or execute content.
5951
+ */ const URL_ATTRIBUTES = [
5952
+ 'src',
5953
+ 'data',
5954
+ 'action',
5955
+ 'formaction',
5956
+ 'poster',
5957
+ 'background',
5958
+ 'xlink:href'
5959
+ ];
5960
+ /**
5961
+ * Tags that load their URL as a *document* (scripts inside run). An SVG data
5962
+ * URL is only an XSS vector here — as an `<img>` source it renders inertly.
5963
+ */ const DOCUMENT_EMBED_TAGS = new Set([
5964
+ 'iframe',
5965
+ 'frame',
5966
+ 'object',
5967
+ 'embed'
5968
+ ]);
5969
+ /**
5970
+ * Detects executable / script-bearing URL schemes. The attribute value is
5971
+ * already HTML-entity-decoded by `getAttribute`, so only whitespace and
5972
+ * control characters (which browsers ignore inside a scheme) need stripping.
5973
+ */ function isDangerousUrl(value, tagName) {
5974
+ // eslint-disable-next-line no-control-regex
5975
+ const normalized = value.replace(/[\u0000-\u0020]+/g, '').toLowerCase();
5976
+ if (/^(?:javascript|vbscript|livescript|mocha):/.test(normalized)) {
5977
+ return true;
5978
+ }
5979
+ if (/^data:(?:text\/html|application\/xhtml)/.test(normalized)) {
5980
+ return true;
5981
+ }
5982
+ return /^data:image\/svg/.test(normalized) && DOCUMENT_EMBED_TAGS.has(tagName);
5983
+ }
5928
5984
  function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
5929
5985
  safeJavaScriptLink: true,
5930
5986
  removeOnError: true
@@ -5942,6 +5998,22 @@ function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
5942
5998
  (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'href', location.protocol + '//' + href);
5943
5999
  effected = true;
5944
6000
  }
6001
+ if (safeJavaScriptLink) {
6002
+ // `srcdoc` runs its content as a full HTML document — drop it entirely.
6003
+ if (elm.hasAttribute('srcdoc')) {
6004
+ (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'srcdoc', null);
6005
+ effected = true;
6006
+ }
6007
+ // Strip executable schemes from any other URL-bearing attribute.
6008
+ const tagName = elm.nodeName.toLowerCase();
6009
+ for (const name of URL_ATTRIBUTES){
6010
+ const value = elm.getAttribute(name);
6011
+ if (value && isDangerousUrl(value, tagName)) {
6012
+ (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, name, null);
6013
+ effected = true;
6014
+ }
6015
+ }
6016
+ }
5945
6017
  return effected;
5946
6018
  }
5947
6019
 
@@ -5989,7 +6061,7 @@ const ALONE_TAGS = new Set([
5989
6061
  ]);
5990
6062
  /**
5991
6063
  * Extract plain text from HTML text
5992
- */ function stripTags(html, doc = document, exclude = null) {
6064
+ */ function stripTags(html, doc = document, exclude = null, blockBr = false) {
5993
6065
  const tmp = doc.createElement('div');
5994
6066
  if ((0,_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(html)) {
5995
6067
  tmp.innerHTML = html;
@@ -6003,7 +6075,7 @@ const ALONE_TAGS = new Set([
6003
6075
  }
6004
6076
  if (exclude && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(p, exclude)) {
6005
6077
  const tag = p.nodeName.toLowerCase();
6006
- 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}%%%`;
6078
+ 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}%%%`;
6007
6079
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(p, doc.createTextNode(text));
6008
6080
  _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(p);
6009
6081
  return;
@@ -6020,7 +6092,11 @@ const ALONE_TAGS = new Set([
6020
6092
  return;
6021
6093
  }
6022
6094
  if (nx) {
6023
- pr.insertBefore(doc.createTextNode(' '), nx);
6095
+ // By default blocks are joined with a single space (single-line
6096
+ // plain text). When `blockBr` is set, separate them with a line
6097
+ // break instead, so paragraph structure survives — e.g. the
6098
+ // "Insert only Text" paste option. See #1232
6099
+ pr.insertBefore(doc.createTextNode(blockBr ? '%%%jodit-single-br%%%' : ' '), nx);
6024
6100
  }
6025
6101
  });
6026
6102
  return restoreTags((0,_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trim)(tmp.innerText));
@@ -7708,7 +7784,6 @@ function ConfigDeepFlatten(obj) {
7708
7784
  return url;
7709
7785
  }
7710
7786
  const parser = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
7711
- const pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7712
7787
  parser.href = url;
7713
7788
  if (!width) {
7714
7789
  width = 400;
@@ -7720,19 +7795,41 @@ function ConfigDeepFlatten(obj) {
7720
7795
  switch(parser.hostname){
7721
7796
  case 'www.vimeo.com':
7722
7797
  case 'vimeo.com':
7723
- return pattern1.test(url) ? url.replace(pattern1, '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>') : url;
7798
+ {
7799
+ // The numeric video id can be preceded by `channels/<name>/` or
7800
+ // `groups/<name>/videos/` and followed by tracking params (e.g.
7801
+ // `?share=copy`). Unlisted videos keep a hash right after the id
7802
+ // (`vimeo.com/<id>/<hash>`). Extract the id (+ hash) from the path
7803
+ // so all of those forms produce a valid embed. See #1209
7804
+ const segments = parser.pathname.split('/').filter(Boolean);
7805
+ const idIndex = segments.findIndex((s)=>/^\d+$/.test(s));
7806
+ if (idIndex === -1) {
7807
+ return url;
7808
+ }
7809
+ let path = segments[idIndex];
7810
+ const hash = segments[idIndex + 1];
7811
+ if (hash && idIndex === 0) {
7812
+ path += '/' + hash;
7813
+ }
7814
+ return '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//player.vimeo.com/video/' + path + '" frameborder="0" allowfullscreen></iframe>';
7815
+ }
7724
7816
  case 'youtube.com':
7725
7817
  case 'www.youtube.com':
7818
+ case 'm.youtube.com':
7819
+ case 'music.youtube.com':
7726
7820
  case 'youtu.be':
7727
7821
  case 'www.youtu.be':
7728
7822
  {
7729
- const query = parser.search ? (0,_parse_query_js__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(parser.search) : {
7730
- v: parser.pathname.substring(1)
7731
- };
7732
- if (/^embed\/.*/.test(query.v)) {
7733
- query.v = query.v.substring(6);
7734
- }
7735
- return query.v ? '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//www.youtube.com/embed/' + query.v + '" frameborder="0" allowfullscreen></iframe>' : url;
7823
+ const query = parser.search ? (0,_parse_query_js__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(parser.search) : {};
7824
+ // `youtube.com/watch` keeps the video id in the `v` query
7825
+ // parameter, while the short `youtu.be/<id>` links and the
7826
+ // `/embed/`, `/shorts/`, `/live/` paths keep it in the pathname.
7827
+ // Modern share urls add tracking params (e.g. `?si=`, `?t=`), so
7828
+ // the pathname must still be used as a fallback when there is no
7829
+ // `v`. See #1209
7830
+ let v = query.v || parser.pathname.substring(1);
7831
+ v = v.replace(/^(watch|embed|shorts|live|v)\//, '').replace(/\/$/, '');
7832
+ return v ? '<iframe width="' + width + '" height="' + height + '" src="' + protocol + '//www.youtube.com/embed/' + v + '" frameborder="0" allowfullscreen></iframe>' : url;
7736
7833
  }
7737
7834
  }
7738
7835
  return url;
@@ -18144,6 +18241,23 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
18144
18241
  }
18145
18242
  this.synchronizeValues();
18146
18243
  }
18244
+ }).on(this.ow, 'mouseup', (event)=>{
18245
+ if (this.o.readonly || this.__isSilentChange) {
18246
+ return;
18247
+ }
18248
+ // When a selection is started inside the editor and the
18249
+ // mouse button is released outside of it, the editable
18250
+ // area never receives the `mouseup` event, so the toolbar
18251
+ // state (active buttons) is not recalculated. Re-fire the
18252
+ // event manually for that case while the selection still
18253
+ // belongs to the editor. See #1251
18254
+ const target = event.target;
18255
+ const insideEditor = Boolean(target && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isNumber)(target.nodeType) && editor.contains(target));
18256
+ if (insideEditor || !this.s.isInsideArea) {
18257
+ return;
18258
+ }
18259
+ this.e.fire('changeSelection');
18260
+ this.synchronizeValues();
18147
18261
  });
18148
18262
  }
18149
18263
  fetch(url, options) {
@@ -29850,9 +29964,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.uploader = {
29850
29964
  insertImageAsBase64URI: false,
29851
29965
  imagesExtensions: [
29852
29966
  'jpg',
29853
- 'png',
29854
29967
  'jpeg',
29855
- 'gif'
29968
+ 'png',
29969
+ 'gif',
29970
+ 'webp',
29971
+ 'bmp',
29972
+ 'svg',
29973
+ 'tiff',
29974
+ 'avif'
29856
29975
  ],
29857
29976
  headers: null,
29858
29977
  data: null,
@@ -34286,8 +34405,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
34286
34405
  const update = (key, value)=>{
34287
34406
  if (value && value !== (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(editor.editor, key).toString()) {
34288
34407
  button.state.icon.fill = value;
34289
- return;
34408
+ return true;
34290
34409
  }
34410
+ return false;
34291
34411
  };
34292
34412
  if (color) {
34293
34413
  const mode = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color');
@@ -34297,8 +34417,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
34297
34417
  const current = editor.s.current();
34298
34418
  if (current && !button.state.disabled) {
34299
34419
  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;
34300
- update('color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'color').toString());
34301
- update('background-color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'background-color').toString());
34420
+ // The icon's fill mirrors the current text/background color so the
34421
+ // button reflects the formatting under the caret. Both calls run so
34422
+ // that a background color (the second call) wins over the text color
34423
+ // when both are set. Keep the computed fill instead of resetting it
34424
+ // below. See #195, #182
34425
+ const hasColor = update('color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'color').toString());
34426
+ const hasBackground = update('background-color', (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.css)(currentBpx, 'background-color').toString());
34427
+ if (hasColor || hasBackground) {
34428
+ return;
34429
+ }
34302
34430
  }
34303
34431
  button.state.icon.fill = '';
34304
34432
  button.state.activated = false;
@@ -36911,7 +37039,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.commandToHotkeys = {
36911
37039
  'cmd+shift+7'
36912
37040
  ],
36913
37041
  insertUnorderedList: [
36914
- 'ctrl+shift+8, cmd+shift+8'
37042
+ 'ctrl+shift+8',
37043
+ 'cmd+shift+8'
36915
37044
  ],
36916
37045
  selectall: [
36917
37046
  'ctrl+a',
@@ -39309,14 +39438,31 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.indent = {
39309
39438
  };
39310
39439
  _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.outdent = {
39311
39440
  isDisabled: (editor)=>{
39441
+ var _a;
39312
39442
  const current = editor.s.current();
39313
- if (current) {
39314
- 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);
39315
- if (currentBox) {
39316
- const arrow = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getKey)(editor.o.direction, currentBox);
39317
- return !currentBox.style[arrow] || parseInt(currentBox.style[arrow], 10) <= 0;
39443
+ if (!current) {
39444
+ return true;
39445
+ }
39446
+ // A list item whose list is nested inside another list item can be
39447
+ // outdented (un-nested) by the `tab` plugin, even without an inline
39448
+ // indent margin. Keep the button enabled in that case. See #1247
39449
+ if ((_a = editor.o.tab) === null || _a === void 0 ? void 0 : _a.tabInsideLiInsertNewList) {
39450
+ const li = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'li', editor.editor);
39451
+ if (li) {
39452
+ const list = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(li, [
39453
+ 'ul',
39454
+ 'ol'
39455
+ ], editor.editor);
39456
+ if (list && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(list, 'li', editor.editor)) {
39457
+ return false;
39458
+ }
39318
39459
  }
39319
39460
  }
39461
+ 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);
39462
+ if (currentBox) {
39463
+ const arrow = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getKey)(editor.o.direction, currentBox);
39464
+ return !currentBox.style[arrow] || parseInt(currentBox.style[arrow], 10) <= 0;
39465
+ }
39320
39466
  return true;
39321
39467
  },
39322
39468
  tooltip: 'Decrease Indent'
@@ -42171,7 +42317,7 @@ class pasteFromWord extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.P
42171
42317
  }
42172
42318
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_ONLY_TEXT:
42173
42319
  {
42174
- html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.stripTags)((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.cleanFromWord)(html));
42320
+ 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);
42175
42321
  break;
42176
42322
  }
42177
42323
  }
@@ -42750,10 +42896,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
42750
42896
  html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.cleanFromWord)(html);
42751
42897
  break;
42752
42898
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_ONLY_TEXT:
42753
- html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.stripTags)(html, this.j.ed, new Set(this.j.o.pasteExcludeStripTags));
42899
+ 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);
42754
42900
  break;
42755
42901
  case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_TEXT:
42756
42902
  html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(html);
42903
+ // Keep the source line breaks instead of letting the raw
42904
+ // newlines collapse into spaces when rendered. See #1093
42905
+ if (this.j.o.nl2brInPlainText) {
42906
+ html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.nl2br)(html);
42907
+ }
42757
42908
  break;
42758
42909
  default:
42759
42910
  {