jodit-pro 4.12.26 → 4.12.27

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 +9 -9
  3. package/es2015/jodit.js +190 -50
  4. package/es2015/jodit.min.js +9 -9
  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 +9 -9
  69. package/es2018/jodit.min.js +10 -10
  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 +11 -11
  96. package/es2021/jodit.js +189 -49
  97. package/es2021/jodit.min.js +13 -13
  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 +13 -13
  163. package/es2021.en/jodit.js +189 -49
  164. package/es2021.en/jodit.min.js +11 -11
  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 +234 -85
  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/es5/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.26
4
+ * Version: v4.12.27
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -2130,6 +2130,14 @@ var ViewComponent = /*#__PURE__*/ function(Component) {
2130
2130
  */ key: "setParentView",
2131
2131
  value: function setParentView(jodit) {
2132
2132
  this.jodit = jodit;
2133
+ // Inherit the owner window from the parent view — for an editor
2134
+ // created with a custom `ownerWindow` (e.g. inside an iframe) the
2135
+ // component default (the global `window`) is wrong: outside-click
2136
+ // handlers of dropdowns/popups listened to the wrong window. See
2137
+ // https://github.com/xdan/jodit/issues/965
2138
+ if (jodit.ow) {
2139
+ this.ownerWindow = jodit.ow;
2140
+ }
2133
2141
  jodit.components.add(this);
2134
2142
  return this;
2135
2143
  }
@@ -2258,7 +2266,7 @@ function _unsupported_iterable_to_array(o, minLen) {
2258
2266
  if (n === "Map" || n === "Set") return Array.from(n);
2259
2267
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
2260
2268
  }
2261
- var APP_VERSION = "4.12.26";
2269
+ var APP_VERSION = "4.12.27";
2262
2270
  // prettier-ignore
2263
2271
  var ES = "es5";
2264
2272
  var IS_ES_MODERN = false;
@@ -6777,9 +6785,15 @@ function isFastEqual(a, b) {
6777
6785
  */ /**
6778
6786
  * @module helpers/checker
6779
6787
  */ /**
6780
- * Detect if string is HTML from MS Word or Excel
6788
+ * Detect if string is HTML from MS Word, Excel or LibreOffice/OpenOffice
6781
6789
  */ function isHtmlFromWord(data) {
6782
- return data.search(/<meta.*?Microsoft Excel\s[\d].*?>/) !== -1 || data.search(/<meta.*?Microsoft Word\s[\d].*?>/) !== -1 || data.search(/style="[^"]*mso-/) !== -1 && data.search(/<font/) !== -1;
6790
+ return data.search(/<meta.*?Microsoft Excel\s[\d].*?>/) !== -1 || data.search(/<meta.*?Microsoft Word\s[\d].*?>/) !== -1 || // `<meta name=ProgId content=Word.Document>` attribute values are
6791
+ // unquoted in the raw Word clipboard fragment
6792
+ data.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i) !== -1 || // LibreOffice/OpenOffice Writer & Calc
6793
+ data.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i) !== -1 || // Office namespaces on the root element of the clipboard fragment
6794
+ data.search(/urn:schemas-microsoft-com:office:(word|excel)/) !== -1 || // `class=MsoNormal` and friends (unquoted/quoted)
6795
+ data.search(/<\w[^>]*\sclass=("|')?Mso/) !== -1 || // the raw Word clipboard uses SINGLE quotes: style='mso-…'
6796
+ data.search(/style='[^']*mso-/) !== -1 || data.search(/style="[^"]*mso-/) !== -1 && data.search(/<font/) !== -1;
6783
6797
  }
6784
6798
 
6785
6799
 
@@ -15852,8 +15866,9 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
15852
15866
  /* harmony export */ });
15853
15867
  /* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
15854
15868
  /* harmony import */ var _helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
15855
- /* harmony import */ var _list_wrap_list_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82515);
15856
- /* harmony import */ var _wrap_unwrapped_text_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6980);
15869
+ /* harmony import */ var _helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
15870
+ /* harmony import */ var _list_wrap_list_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82515);
15871
+ /* harmony import */ var _wrap_unwrapped_text_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6980);
15857
15872
  /*!
15858
15873
  * Jodit Editor (https://xdsoft.net/jodit/)
15859
15874
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -15862,12 +15877,29 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
15862
15877
 
15863
15878
 
15864
15879
 
15880
+
15865
15881
  /**
15866
15882
  * Replaces the parent tag with the applicable one, or wraps the text and also replaces the tag
15867
15883
  * @private
15868
15884
  */ function wrap(commitStyle, font, jodit) {
15869
15885
  var wrapper = findOrCreateWrapper(commitStyle, font, jodit);
15870
- return commitStyle.elementIsList ? (0,_list_wrap_list_js__WEBPACK_IMPORTED_MODULE_2__.wrapList)(commitStyle, wrapper, jodit) : _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(wrapper, commitStyle.element, jodit.createInside, true);
15886
+ if (commitStyle.elementIsList) {
15887
+ return (0,_list_wrap_list_js__WEBPACK_IMPORTED_MODULE_3__.wrapList)(commitStyle, wrapper, jodit);
15888
+ }
15889
+ var newWrapper = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(wrapper, commitStyle.element, jodit.createInside, true);
15890
+ if (commitStyle.elementIsBlock) {
15891
+ // Inline font styles left over from pasted content visually override
15892
+ // the new block format — e.g. an h2 with `font-weight: normal;
15893
+ // font-size: 24px` does not look like a heading at all, so the
15894
+ // command seems to do nothing. See
15895
+ // https://github.com/xdan/jodit/issues/1063
15896
+ (0,_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(newWrapper, 'fontSize', null);
15897
+ (0,_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(newWrapper, 'fontWeight', null);
15898
+ if (!(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(newWrapper, 'style')) {
15899
+ (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(newWrapper, 'style', null);
15900
+ }
15901
+ }
15902
+ return newWrapper;
15871
15903
  }
15872
15904
  var WRAP_NODES = new Set([
15873
15905
  'td',
@@ -15890,7 +15922,7 @@ var WRAP_NODES = new Set([
15890
15922
  if (box) {
15891
15923
  return box;
15892
15924
  }
15893
- return (0,_wrap_unwrapped_text_js__WEBPACK_IMPORTED_MODULE_3__.wrapUnwrappedText)(commitStyle, font, jodit);
15925
+ return (0,_wrap_unwrapped_text_js__WEBPACK_IMPORTED_MODULE_4__.wrapUnwrappedText)(commitStyle, font, jodit);
15894
15926
  }
15895
15927
  (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(font, 'size', null);
15896
15928
  return font;
@@ -23150,8 +23182,11 @@ var Popup = /*#__PURE__*/ function(UIGroup) {
23150
23182
  */ key: "getKeepBound",
23151
23183
  value: function getKeepBound(getBound) {
23152
23184
  var _this = this;
23185
+ var _a;
23153
23186
  var oldBound = getBound();
23154
- var elmUnderCursor = this.od.elementFromPoint(oldBound.left, oldBound.top);
23187
+ // Inside Shadow DOM `document.elementFromPoint` returns the shadow
23188
+ // host, so the lookup must start from the shadow root
23189
+ var elmUnderCursor = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.od).elementFromPoint(oldBound.left, oldBound.top);
23155
23190
  if (!elmUnderCursor) {
23156
23191
  return getBound;
23157
23192
  }
@@ -25813,6 +25848,17 @@ var Jodit = Jodit_1 = /*#__PURE__*/ function(ViewWithToolbar) {
25813
25848
  var init = function init() {
25814
25849
  if (opt.enableDragAndDropFileToEditor && opt.uploader && (opt.uploader.url || opt.uploader.insertImageAsBase64URI)) {
25815
25850
  _this.uploader.bind(_this.editor);
25851
+ } else if (!opt.enableDragAndDropFileToEditor) {
25852
+ // Without a bound uploader nobody cancels a file drop, and
25853
+ // Firefox inserts the dropped image natively — the option
25854
+ // must mean "do nothing". See
25855
+ // https://github.com/xdan/jodit/issues/1077
25856
+ _this.e.on(editor, 'drop', function(e) {
25857
+ var _a, _b;
25858
+ if ((_b = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.length) {
25859
+ e.preventDefault();
25860
+ }
25861
+ });
25816
25862
  }
25817
25863
  // in initEditor - the editor could change
25818
25864
  if (!_this.__elementToPlace.get(_this.editor)) {
@@ -40020,14 +40066,42 @@ var ToolbarContent = /*#__PURE__*/ function(UIButton) {
40020
40066
  {
40021
40067
  /** @override */ key: "update",
40022
40068
  value: function update() {
40023
- var content = this.control.getContent(this.j, this);
40069
+ var _a, _b, _c;
40070
+ var control = this.control;
40071
+ var content = control.getContent(this.j, this);
40024
40072
  if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(content) || content.parentNode !== this.container) {
40025
40073
  _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(this.container);
40026
40074
  this.container.appendChild((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isString)(content) ? this.j.create.fromHTML(content) : content);
40027
40075
  }
40076
+ // Content controls never went through the ToolbarButton status
40077
+ // calculation, so `isDisabled`/`isActive`/`update` declared on the
40078
+ // control were silently ignored (e.g. the FileBrowser Upload button
40079
+ // ignored the backend permissions). See
40080
+ // https://github.com/xdan/jodit/issues/1094
40081
+ this.state.disabled = Boolean((_a = control.isDisabled) === null || _a === void 0 ? void 0 : _a.call(control, this.j, this));
40082
+ this.state.activated = Boolean((_b = control.isActive) === null || _b === void 0 ? void 0 : _b.call(control, this.j, this));
40083
+ (_c = control.update) === null || _c === void 0 ? void 0 : _c.call(control, this.j, this);
40084
+ // The first update() runs before the state watchers are attached, so
40085
+ // apply the calculated state explicitly (the calls are idempotent)
40086
+ this.onChangeDisabled();
40087
+ this.onChangeActivated();
40028
40088
  _get(_get_prototype_of(ToolbarContent.prototype), "update", this).call(this);
40029
40089
  }
40030
40090
  },
40091
+ {
40092
+ /**
40093
+ * The content is arbitrary HTML — propagate the disabled state to the
40094
+ * nested form controls (e.g. the file input of the Upload button),
40095
+ * otherwise they stay interactive.
40096
+ */ key: "onChangeDisabled",
40097
+ value: function onChangeDisabled() {
40098
+ var _this = this;
40099
+ _get(_get_prototype_of(ToolbarContent.prototype), "onChangeDisabled", this).call(this);
40100
+ this.container.querySelectorAll('input,button,select,textarea').forEach(function(elm) {
40101
+ return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'disabled', _this.state.disabled || null);
40102
+ });
40103
+ }
40104
+ },
40031
40105
  {
40032
40106
  /** @override */ key: "createContainer",
40033
40107
  value: function createContainer() {
@@ -42523,8 +42597,11 @@ var ns = 'addnewline';
42523
42597
  {
42524
42598
  key: "__onMouseMove",
42525
42599
  value: function __onMouseMove(e) {
42600
+ var _a;
42526
42601
  var editor = this.j;
42527
- var currentElement = editor.ed.elementFromPoint(e.clientX, e.clientY);
42602
+ // Inside Shadow DOM `document.elementFromPoint` returns the shadow
42603
+ // host, so the lookup must start from the shadow root
42604
+ var currentElement = ((_a = editor.o.shadowRoot) !== null && _a !== void 0 ? _a : editor.ed).elementFromPoint(e.clientX, e.clientY);
42528
42605
  if (!_modules_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.isHTMLElement(currentElement) || !_modules_index_js__WEBPACK_IMPORTED_MODULE_3__.Dom.isOrContains(editor.editor, currentElement)) {
42529
42606
  return;
42530
42607
  }
@@ -42966,7 +43043,13 @@ function _ts_generator(thisArg, body) {
42966
43043
  return new _ui_ui_ai_assistant_js__WEBPACK_IMPORTED_MODULE_6__.UiAiAssistant(jodit, {
42967
43044
  onInsertAfter: function onInsertAfter(html) {
42968
43045
  jodit.s.focus();
42969
- jodit.s.setCursorAfter(jodit.s.current());
43046
+ // `current()` returns a node of the selection START, so with
43047
+ // several selected paragraphs the result landed after the
43048
+ // first one — collapse the range to the END of the selection
43049
+ // instead. See https://github.com/xdan/jodit/issues/1263
43050
+ var range = jodit.s.range;
43051
+ range.collapse(false);
43052
+ jodit.s.selectRange(range);
42970
43053
  jodit.s.insertHTML(html);
42971
43054
  __dialog.close();
42972
43055
  },
@@ -44025,13 +44108,26 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
44025
44108
  jodit.s.setCursorBefore(fakeNode);
44026
44109
  return true;
44027
44110
  }
44028
- if (sibling && (checkMoveListContent(jodit, mainClosestBox, sibling, backspace) || moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace))) {
44111
+ if (sibling && (checkMoveListContent(jodit, mainClosestBox, sibling, backspace) || moveContentAndRemoveEmpty(jodit, mainClosestBox, resolveTableSibling(sibling, backspace), backspace))) {
44029
44112
  jodit.s.setCursorBefore(fakeNode);
44030
44113
  return true;
44031
44114
  }
44032
44115
  }
44033
44116
  return false;
44034
44117
  }
44118
+ /**
44119
+ * Content cannot be merged into the `<table>` element itself — it would land
44120
+ * between the table sections (after `</tbody>`), which is invalid HTML and
44121
+ * gets foster-parented out of the table on the next parse. Merge into the
44122
+ * edge cell instead. See https://github.com/xdan/jodit/issues/1064
44123
+ * @private
44124
+ */ function resolveTableSibling(sibling, backspace) {
44125
+ if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, 'table')) {
44126
+ return sibling;
44127
+ }
44128
+ var cells = sibling.querySelectorAll('td,th');
44129
+ return cells.length ? cells[backspace ? cells.length - 1 : 0] : null;
44130
+ }
44035
44131
  function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
44036
44132
  // Process UL/LI/OL cases
44037
44133
  var siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
@@ -46677,26 +46773,35 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_0__.Icon.set('copy', _icons_copy_svg_j
46677
46773
  group: 'color'
46678
46774
  });
46679
46775
  var callback = function callback(command, second, third) {
46776
+ var _a;
46680
46777
  var colorHEX = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.normalizeColor)(third);
46681
- switch(command){
46682
- case 'background':
46683
- editor.s.commitStyle({
46684
- attributes: {
46685
- style: {
46686
- backgroundColor: !colorHEX ? '' : colorHEX
46687
- }
46688
- }
46689
- });
46690
- break;
46691
- case 'forecolor':
46778
+ var value = !colorHEX ? '' : colorHEX;
46779
+ var style = command === 'background' ? {
46780
+ backgroundColor: value
46781
+ } : {
46782
+ color: value
46783
+ };
46784
+ // Cells selected with the `select-cells` plugin drop or collapse the
46785
+ // native range, so `commitStyle` would paint a pending caret format
46786
+ // outside the table instead of the selection the user sees. Apply the
46787
+ // style to the content of every selected cell instead. See #1250
46788
+ var selectedCells = editor.getInstance('Table', editor.o).getAllSelectedCells();
46789
+ if (selectedCells.length && editor.s.isCollapsed()) {
46790
+ selectedCells.forEach(function(cell) {
46791
+ editor.s.select(cell, true);
46692
46792
  editor.s.commitStyle({
46693
46793
  attributes: {
46694
- style: {
46695
- color: !colorHEX ? '' : colorHEX
46696
- }
46794
+ style: style
46697
46795
  }
46698
46796
  });
46699
- break;
46797
+ });
46798
+ (_a = editor.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
46799
+ } else {
46800
+ editor.s.commitStyle({
46801
+ attributes: {
46802
+ style: style
46803
+ }
46804
+ });
46700
46805
  }
46701
46806
  editor.synchronizeValues();
46702
46807
  return false;
@@ -55510,12 +55615,35 @@ function _is_native_reflect_construct() {
55510
55615
  var sel = _this.j.s.sel;
55511
55616
  if (sel && !sel.isCollapsed) {
55512
55617
  _this.showPopup(function() {
55513
- return _this.j.s.range.getBoundingClientRect();
55618
+ return _this.__selectionBound();
55514
55619
  }, 'selection');
55515
55620
  }
55516
55621
  }, 1);
55517
55622
  }
55518
55623
  },
55624
+ {
55625
+ /**
55626
+ * The selection rect comes from the editor document — in iframe mode its
55627
+ * coordinates are iframe-local, while the popup lives in the host
55628
+ * document, so the iframe offset must be added. See
55629
+ * https://github.com/xdan/jodit/issues/1058
55630
+ */ key: "__selectionBound",
55631
+ value: function __selectionBound() {
55632
+ var rect = this.j.s.range.getBoundingClientRect();
55633
+ var left = rect.left, top = rect.top;
55634
+ if (this.j.iframe) {
55635
+ var offset = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(this.j.iframe, this.j, true);
55636
+ left += offset.left;
55637
+ top += offset.top;
55638
+ }
55639
+ return {
55640
+ left: left,
55641
+ top: top,
55642
+ width: rect.width,
55643
+ height: rect.height
55644
+ };
55645
+ }
55646
+ },
55519
55647
  {
55520
55648
  key: "onSelectionStart",
55521
55649
  value: function onSelectionStart() {
@@ -55539,6 +55667,7 @@ function _is_native_reflect_construct() {
55539
55667
  * Selection change handler
55540
55668
  */ key: "onSelectionChange",
55541
55669
  value: function onSelectionChange() {
55670
+ var _this = this;
55542
55671
  if (!this.j.o.toolbarInlineForSelection) {
55543
55672
  return;
55544
55673
  }
@@ -55556,7 +55685,7 @@ function _is_native_reflect_construct() {
55556
55685
  return;
55557
55686
  }
55558
55687
  this.showPopup(function() {
55559
- return range.getBoundingClientRect();
55688
+ return _this.__selectionBound();
55560
55689
  }, type);
55561
55690
  }
55562
55691
  },
@@ -59043,7 +59172,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
59043
59172
  tooltip: 'Paste from clipboard',
59044
59173
  exec: function exec(_0, _1, _2) {
59045
59174
  return _async_to_generator(function(editor, _, param) {
59046
- var control, text, error, items, textBlob, e, e1, value;
59175
+ var control, _a, text, error, items, item, type, textBlob, e, e1, value;
59047
59176
  return _ts_generator(this, function(_state) {
59048
59177
  switch(_state.label){
59049
59178
  case 0:
@@ -59078,9 +59207,15 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
59078
59207
  3,
59079
59208
  5
59080
59209
  ];
59210
+ item = items[0];
59211
+ // Prefer the HTML flavor so the button behaves like the
59212
+ // Ctrl+V shortcut (which receives text/html from the
59213
+ // native paste event). See
59214
+ // https://github.com/xdan/jodit/issues/1061
59215
+ type = ((_a = item.types) === null || _a === void 0 ? void 0 : _a.includes(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML)) ? _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN;
59081
59216
  return [
59082
59217
  4,
59083
- items[0].getType(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN)
59218
+ item.getType(type)
59084
59219
  ];
59085
59220
  case 3:
59086
59221
  textBlob = _state.sent();
@@ -63605,53 +63740,63 @@ var UISearch = /*#__PURE__*/ function(UIElement) {
63605
63740
  return false;
63606
63741
  }).on(_this.queryInput, 'input', function() {
63607
63742
  _this.setMod('empty-query', !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.trim)(_this.queryInput.value).length);
63608
- }).on(_this.queryInput, 'keydown', _this.j.async.debounce(function(e) {
63609
- return _async_to_generator(function() {
63610
- var _;
63611
- return _ts_generator(this, function(_state) {
63612
- switch(_state.label){
63613
- case 0:
63614
- _ = e.key;
63615
- switch(_){
63616
- case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER:
63617
- return [
63618
- 3,
63619
- 1
63620
- ];
63621
- }
63622
- return [
63623
- 3,
63624
- 3
63625
- ];
63626
- case 1:
63627
- e.preventDefault();
63628
- e.stopImmediatePropagation();
63629
- return [
63630
- 4,
63631
- jodit.e.fire('searchNext')
63632
- ];
63633
- case 2:
63634
- if (_state.sent()) {
63635
- _this1.close();
63636
- }
63637
- return [
63638
- 3,
63639
- 4
63640
- ];
63641
- case 3:
63642
- jodit.e.fire(_this1, 'needUpdateCounters');
63643
- return [
63644
- 3,
63645
- 4
63646
- ];
63647
- case 4:
63648
- return [
63649
- 2
63650
- ];
63651
- }
63652
- });
63653
- })();
63654
- }, _this.j.defaultTimeout));
63743
+ }).on(_this.queryInput, 'keydown', function() {
63744
+ var debounced = _this.j.async.debounce(function(e) {
63745
+ return _async_to_generator(function() {
63746
+ var _;
63747
+ return _ts_generator(this, function(_state) {
63748
+ switch(_state.label){
63749
+ case 0:
63750
+ _ = e.key;
63751
+ switch(_){
63752
+ case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER:
63753
+ return [
63754
+ 3,
63755
+ 1
63756
+ ];
63757
+ }
63758
+ return [
63759
+ 3,
63760
+ 3
63761
+ ];
63762
+ case 1:
63763
+ return [
63764
+ 4,
63765
+ jodit.e.fire('searchNext')
63766
+ ];
63767
+ case 2:
63768
+ if (_state.sent()) {
63769
+ _this1.close();
63770
+ }
63771
+ return [
63772
+ 3,
63773
+ 4
63774
+ ];
63775
+ case 3:
63776
+ jodit.e.fire(_this1, 'needUpdateCounters');
63777
+ return [
63778
+ 3,
63779
+ 4
63780
+ ];
63781
+ case 4:
63782
+ return [
63783
+ 2
63784
+ ];
63785
+ }
63786
+ });
63787
+ })();
63788
+ }, _this.j.defaultTimeout);
63789
+ return function(e) {
63790
+ // Must be canceled synchronously — inside the debounced
63791
+ // handler the browser has already submitted the parent
63792
+ // form. See https://github.com/xdan/jodit/issues/918
63793
+ if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER) {
63794
+ e.preventDefault();
63795
+ e.stopImmediatePropagation();
63796
+ }
63797
+ debounced(e);
63798
+ };
63799
+ }());
63655
63800
  return _this;
63656
63801
  }
63657
63802
  _create_class(UISearch, [
@@ -64128,14 +64273,16 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
64128
64273
  */ key: "__onMove",
64129
64274
  value: function __onMove(table, e) {
64130
64275
  var _this = this;
64131
- var _a;
64276
+ var _a, _b;
64132
64277
  if (this.j.o.readonly && !this.j.isLocked) {
64133
64278
  return;
64134
64279
  }
64135
64280
  if (this.j.isLockedNotBy(key)) {
64136
64281
  return;
64137
64282
  }
64138
- var node = this.j.ed.elementFromPoint(e.clientX, e.clientY);
64283
+ // Inside Shadow DOM `document.elementFromPoint` returns the shadow
64284
+ // host, so the lookup must start from the shadow root
64285
+ var node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
64139
64286
  if (!node) {
64140
64287
  return;
64141
64288
  }
@@ -64161,7 +64308,7 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
64161
64308
  }
64162
64309
  var cellsCount = this.__tableModule.getAllSelectedCells().length;
64163
64310
  if (cellsCount > 1) {
64164
- (_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
64311
+ (_b = this.j.s.sel) === null || _b === void 0 ? void 0 : _b.removeAllRanges();
64165
64312
  }
64166
64313
  this.j.e.fire('hidePopup');
64167
64314
  e.stopPropagation();
@@ -64198,13 +64345,15 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
64198
64345
  */ key: "__onStopSelection",
64199
64346
  value: function __onStopSelection(table, e) {
64200
64347
  var _this = this;
64201
- var _a, _b;
64348
+ var _a, _b, _c;
64202
64349
  if (!this.__selectedCell) {
64203
64350
  return;
64204
64351
  }
64205
64352
  this.__isSelectionMode = false;
64206
64353
  this.j.unlock();
64207
- var node = this.j.ed.elementFromPoint(e.clientX, e.clientY);
64354
+ // Inside Shadow DOM `document.elementFromPoint` returns the shadow
64355
+ // host, so the lookup must start from the shadow root
64356
+ var node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
64208
64357
  if (!node) {
64209
64358
  return;
64210
64359
  }
@@ -64223,7 +64372,7 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
64223
64372
  cell,
64224
64373
  this.__selectedCell
64225
64374
  ]), box = this.__tableModule.formalMatrix(table);
64226
- var max = (_a = box[bound[1][0]]) === null || _a === void 0 ? void 0 : _a[bound[1][1]], min = (_b = box[bound[0][0]]) === null || _b === void 0 ? void 0 : _b[bound[0][1]];
64375
+ var max = (_b = box[bound[1][0]]) === null || _b === void 0 ? void 0 : _b[bound[1][1]], min = (_c = box[bound[0][0]]) === null || _c === void 0 ? void 0 : _c[bound[0][1]];
64227
64376
  // `getSelectedBound` keeps its `Infinity` sentinel when none of the
64228
64377
  // selected cells belong to this table's matrix — e.g. after a
64229
64378
  // drag-and-drop that moved/removed the cells, leaving a stale anchor and
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.12.26
4
+ * Version: v4.12.27
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
8
8
  /*!
9
9
  * jodit-pro - PRO Version of Jodit Editor
10
10
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
11
- * Version: v4.12.26
11
+ * Version: v4.12.27
12
12
  * Url: https://xdsoft.net/jodit/pro/
13
13
  * License(s): SEE LICENSE IN LICENSE.md
14
14
  */