jodit 3.19.4 → 3.20.2

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 (217) hide show
  1. package/build/jodit.css +45 -42
  2. package/build/jodit.es2018.css +38 -36
  3. package/build/jodit.es2018.en.css +38 -36
  4. package/build/jodit.es2018.en.js +22562 -25637
  5. package/build/jodit.es2018.en.min.css +1 -1
  6. package/build/jodit.es2018.en.min.js +1 -1
  7. package/build/jodit.es2018.js +23105 -26181
  8. package/build/jodit.es2018.min.css +1 -1
  9. package/build/jodit.es2018.min.js +1 -1
  10. package/build/jodit.js +797 -386
  11. package/build/jodit.min.css +2 -2
  12. package/build/jodit.min.js +1 -1
  13. package/build/plugins/debug/debug.es2018.en.js +97 -0
  14. package/build/plugins/debug/debug.es2018.en.min.js +1 -0
  15. package/build/plugins/debug/debug.es2018.js +97 -0
  16. package/build/plugins/debug/debug.es2018.min.js +1 -0
  17. package/build/plugins/debug/debug.js +96 -0
  18. package/build/plugins/debug/debug.min.js +1 -0
  19. package/build/plugins/speech-recognize/speech-recognize.css +1 -1
  20. package/build/plugins/speech-recognize/speech-recognize.es2018.css +1 -1
  21. package/build/plugins/speech-recognize/speech-recognize.es2018.en.css +1 -1
  22. package/build/plugins/speech-recognize/speech-recognize.es2018.en.js +331 -398
  23. package/build/plugins/speech-recognize/speech-recognize.es2018.en.min.js +1 -1
  24. package/build/plugins/speech-recognize/speech-recognize.es2018.js +331 -398
  25. package/build/plugins/speech-recognize/speech-recognize.es2018.min.js +1 -1
  26. package/build/plugins/speech-recognize/speech-recognize.js +1 -1
  27. package/build/vdom.css +1 -1
  28. package/build/vdom.js +1 -1
  29. package/index.html +2 -2
  30. package/package.json +9 -4
  31. package/src/config.ts +4 -2
  32. package/src/core/constants.ts +7 -7
  33. package/src/core/decorators/derive/README.md +71 -0
  34. package/src/core/decorators/derive/derive.ts +48 -0
  35. package/src/core/decorators/index.ts +1 -0
  36. package/src/core/decorators/spy/spy.ts +5 -0
  37. package/src/core/dom/dom.test.js +0 -1
  38. package/src/core/dom/dom.ts +28 -13
  39. package/src/core/event-emitter/observable.ts +3 -3
  40. package/src/core/helpers/helpers.test.js +0 -170
  41. package/src/core/plugin/plugin-system.ts +20 -0
  42. package/src/core/selection/select.ts +27 -9
  43. package/src/core/selection/style/api/toggle/toggle-ordered-list.ts +5 -1
  44. package/src/core/selection/style/api/wrap-ordered-list.ts +5 -1
  45. package/src/core/selection/style/api/wrap-unwrapped-text.ts +1 -1
  46. package/src/core/selection/style/style.test.js +1 -1
  47. package/src/core/{view/panel.ts → traits/dlgs.ts} +17 -9
  48. package/src/core/traits/elms.ts +4 -8
  49. package/src/core/traits/index.ts +1 -0
  50. package/src/core/traits/mods.ts +17 -10
  51. package/src/core/ui/button/index.ts +1 -0
  52. package/src/{plugins → core/ui/button}/tooltip/README.md +0 -0
  53. package/src/{plugins → core/ui/button}/tooltip/tooltip.less +4 -4
  54. package/src/{plugins → core/ui/button}/tooltip/tooltip.test.js +3 -2
  55. package/src/core/ui/button/tooltip/tooltip.ts +132 -0
  56. package/src/core/ui/element.ts +5 -27
  57. package/src/core/ui/group/group.test.js +44 -0
  58. package/src/core/ui/group/group.ts +4 -4
  59. package/src/core/view/view-with-toolbar.ts +2 -2
  60. package/src/core/view/view.ts +11 -33
  61. package/src/jodit.ts +20 -8
  62. package/src/langs/ar.js +1 -1
  63. package/src/langs/cs_cz.js +1 -1
  64. package/src/langs/de.js +1 -1
  65. package/src/langs/es.js +1 -1
  66. package/src/langs/fa.js +1 -1
  67. package/src/langs/fr.js +1 -1
  68. package/src/langs/he.js +1 -1
  69. package/src/langs/hu.js +1 -1
  70. package/src/langs/i18n.test.js +170 -0
  71. package/src/langs/id.js +1 -1
  72. package/src/langs/it.js +1 -1
  73. package/src/langs/ja.js +1 -1
  74. package/src/langs/ko.js +1 -1
  75. package/src/langs/nl.js +1 -1
  76. package/src/langs/pl.js +1 -1
  77. package/src/langs/pt_br.js +1 -1
  78. package/src/langs/ru.js +1 -1
  79. package/src/langs/tr.js +1 -1
  80. package/src/langs/zh_cn.js +1 -1
  81. package/src/langs/zh_tw.js +1 -1
  82. package/src/modules/dialog/dialog.less +2 -0
  83. package/src/modules/dialog/dialog.ts +27 -50
  84. package/src/modules/file-browser/README.md +10 -10
  85. package/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-open-filebrowser-works-1-snap.png +0 -0
  86. package/src/modules/file-browser/builders/context-menu.ts +1 -1
  87. package/src/modules/file-browser/file-browser.test.js +26 -13
  88. package/src/modules/file-browser/file-browser.test.screenshot.js +23 -0
  89. package/src/modules/file-browser/file-browser.ts +9 -5
  90. package/src/modules/history/snapshot.ts +12 -3
  91. package/src/modules/image-editor/__image_snapshots__/image-editor-test-screenshot-js-image-editor-screenshot-testing-open-image-editor-works-1-snap.png +0 -0
  92. package/src/modules/image-editor/image-editor.test.screenshot.js +25 -0
  93. package/src/modules/image-editor/image-editor.ts +7 -6
  94. package/src/modules/status-bar/status-bar.ts +5 -16
  95. package/src/modules/table/table.test.js +2 -1
  96. package/src/modules/toolbar/collection/collection.ts +6 -1
  97. package/src/modules/uploader/README.md +1 -1
  98. package/src/modules/uploader/config.ts +1 -1
  99. package/src/modules/uploader/uploader.test.js +96 -46
  100. package/src/plugins/about/about.ts +1 -1
  101. package/src/plugins/add-new-line/add-new-line.ts +5 -4
  102. package/src/plugins/backspace/backspace.test.js +33 -39
  103. package/src/plugins/backspace/backspace.ts +10 -4
  104. package/src/plugins/backspace/cases/check-remove-char.ts +36 -14
  105. package/src/plugins/backspace/cases/check-remove-unbreakable-element.ts +8 -0
  106. package/src/plugins/backspace/config.ts +1 -1
  107. package/src/plugins/backspace/interface.d.ts +1 -1
  108. package/src/plugins/clean-html/clean-html.test.js +240 -164
  109. package/src/plugins/clean-html/config.ts +10 -2
  110. package/src/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.ts +3 -2
  111. package/src/plugins/clean-html/helpers/remove-format/remove-format-for-selection.ts +2 -2
  112. package/src/plugins/clean-html/helpers/visitor/filters/index.ts +1 -0
  113. package/src/plugins/clean-html/helpers/visitor/filters/remove-empty-text-node.ts +35 -0
  114. package/src/plugins/clean-html/helpers/visitor/filters/remove-inv-text-nodes.ts +2 -6
  115. package/src/plugins/clean-html/helpers/visitor/visit-node-walker.ts +5 -0
  116. package/src/plugins/debug/debug.ts +68 -0
  117. package/src/plugins/drag-and-drop/drag-and-drop.ts +0 -1
  118. package/src/plugins/drag-and-drop-element/drag-and-drop-element.test.js +37 -34
  119. package/src/plugins/dtd/README.md +52 -0
  120. package/{types/plugins/tooltip/tooltip.d.ts → src/plugins/dtd/after-insert/index.ts} +5 -4
  121. package/src/plugins/dtd/after-insert/remove-extra-br.ts +39 -0
  122. package/src/plugins/dtd/before-insert/check-block-nesting.ts +40 -0
  123. package/src/plugins/dtd/before-insert/index.ts +12 -0
  124. package/src/plugins/dtd/config.ts +67 -0
  125. package/src/plugins/dtd/dtd.test.js +128 -0
  126. package/src/plugins/dtd/dtd.ts +48 -0
  127. package/src/plugins/enter/enter.test.js +89 -193
  128. package/src/plugins/enter/enter.ts +14 -11
  129. package/src/plugins/enter/helpers/check-br.ts +11 -1
  130. package/src/plugins/enter/helpers/index.ts +1 -0
  131. package/src/plugins/enter/helpers/move-cursor-out-from-specal-tags.ts +32 -0
  132. package/src/plugins/enter/helpers/split-fragment.ts +1 -0
  133. package/src/plugins/fullsize/config.ts +1 -1
  134. package/src/plugins/fullsize/fullsize.test.js +77 -12
  135. package/src/plugins/fullsize/fullsize.ts +12 -1
  136. package/src/plugins/iframe/config.ts +1 -1
  137. package/src/plugins/image-properties/README.md +7 -0
  138. package/src/plugins/image-properties/image-properties.ts +1 -1
  139. package/src/plugins/index.ts +1 -1
  140. package/src/plugins/limit/limit.test.js +27 -0
  141. package/src/plugins/limit/limit.ts +4 -2
  142. package/src/plugins/line-height/line-height.svg +1 -1
  143. package/src/plugins/link/README.md +5 -0
  144. package/src/plugins/link/link.test.js +11 -12
  145. package/src/plugins/link/link.ts +1 -1
  146. package/src/plugins/mobile/mobile.ts +1 -1
  147. package/src/plugins/ordered-list/ordered-list.test.js +3 -14
  148. package/src/plugins/paste/config.ts +0 -7
  149. package/src/plugins/paste/paste.test.js +3 -3
  150. package/src/plugins/paste-storage/paste-storage.ts +1 -1
  151. package/src/plugins/preview/preview.ts +1 -1
  152. package/src/plugins/search/search.ts +1 -1
  153. package/src/plugins/select/config.ts +1 -1
  154. package/src/plugins/spellcheck/config.ts +1 -1
  155. package/src/plugins/symbols/symbols.test.js +5 -4
  156. package/src/plugins/table/config.ts +4 -17
  157. package/src/plugins/table/table.test.js +2 -2
  158. package/src/plugins/wrap-nodes/wrap-nodes.test.js +34 -5
  159. package/src/plugins/wrap-nodes/wrap-nodes.ts +59 -16
  160. package/src/styles/variables.less +1 -1
  161. package/src/types/ajax.d.ts +2 -2
  162. package/src/types/file-browser.d.ts +4 -2
  163. package/src/types/jodit.d.ts +3 -2
  164. package/src/types/plugin.d.ts +1 -0
  165. package/src/types/toolbar.d.ts +12 -6
  166. package/src/types/traits.d.ts +30 -1
  167. package/src/types/types.d.ts +1 -0
  168. package/src/types/view.d.ts +9 -34
  169. package/src/typings.d.ts +1 -0
  170. package/types/config.d.ts +3 -2
  171. package/types/core/constants.d.ts +7 -7
  172. package/types/core/decorators/derive/derive.d.ts +6 -0
  173. package/types/core/decorators/index.d.ts +1 -0
  174. package/types/core/dom/dom.d.ts +5 -4
  175. package/types/core/plugin/plugin-system.d.ts +4 -0
  176. package/types/core/traits/dlgs.d.ts +15 -0
  177. package/types/core/traits/elms.d.ts +2 -4
  178. package/types/core/traits/index.d.ts +1 -0
  179. package/types/core/traits/mods.d.ts +5 -8
  180. package/types/core/ui/button/index.d.ts +1 -0
  181. package/types/core/ui/button/tooltip/tooltip.d.ts +29 -0
  182. package/types/core/ui/element.d.ts +3 -9
  183. package/types/core/ui/group/group.d.ts +2 -2
  184. package/types/core/view/view-with-toolbar.d.ts +2 -2
  185. package/types/core/view/view.d.ts +5 -10
  186. package/types/jodit.d.ts +7 -4
  187. package/types/modules/dialog/dialog.d.ts +8 -10
  188. package/types/modules/file-browser/file-browser.d.ts +5 -2
  189. package/types/modules/history/snapshot.d.ts +3 -2
  190. package/types/modules/image-editor/image-editor.d.ts +4 -4
  191. package/types/modules/status-bar/status-bar.d.ts +3 -4
  192. package/types/modules/toolbar/collection/collection.d.ts +1 -0
  193. package/types/plugins/clean-html/config.d.ts +7 -1
  194. package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +1 -0
  195. package/types/plugins/clean-html/helpers/visitor/filters/remove-empty-text-node.d.ts +13 -0
  196. package/types/plugins/dtd/after-insert/index.d.ts +10 -0
  197. package/types/plugins/dtd/after-insert/remove-extra-br.d.ts +16 -0
  198. package/types/plugins/dtd/before-insert/check-block-nesting.d.ts +16 -0
  199. package/types/plugins/dtd/before-insert/index.d.ts +10 -0
  200. package/types/plugins/dtd/config.d.ts +27 -0
  201. package/types/plugins/dtd/dtd.d.ts +6 -0
  202. package/types/plugins/enter/helpers/index.d.ts +1 -0
  203. package/types/plugins/enter/helpers/move-cursor-out-from-specal-tags.d.ts +13 -0
  204. package/types/plugins/iframe/config.d.ts +1 -1
  205. package/types/plugins/index.d.ts +1 -1
  206. package/types/plugins/paste/config.d.ts +0 -4
  207. package/types/plugins/spellcheck/config.d.ts +1 -1
  208. package/types/types/ajax.d.ts +2 -2
  209. package/types/types/file-browser.d.ts +4 -2
  210. package/types/types/jodit.d.ts +3 -2
  211. package/types/types/plugin.d.ts +1 -0
  212. package/types/types/toolbar.d.ts +12 -6
  213. package/types/types/traits.d.ts +30 -1
  214. package/types/types/types.d.ts +1 -0
  215. package/types/types/view.d.ts +9 -34
  216. package/src/plugins/tooltip/tooltip.ts +0 -114
  217. package/types/core/view/panel.d.ts +0 -13
package/build/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
4
- * Version: v3.19.4
4
+ * Version: v3.20.2
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -43,7 +43,7 @@ module.exports["default"] = ["Bitte geben Sie einen Text ein","Über Jodit","Jod
43
43
  /***/ 51048:
44
44
  /***/ (function(module) {
45
45
 
46
- module.exports["default"] = ["Type something","About Jodit","Jodit Editor","Free Non-commercial Version","Jodit User's Guide","contains detailed help for using","For information about the license, please go to our website:","Buy full version","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Anchor","Open in new tab","Open editor in fullsize","Clear Formatting","Fill color or set the text color","Redo","Undo","Bold","Italic","Insert Unordered List","Insert Ordered List","Align Center","Align Justify","Align Left","Align Right","Insert Horizontal Line","Insert Image","Insert file","Insert youtube/vimeo video","Insert link","Font size","Font family","Insert format block","Normal","Heading 1","Heading 2","Heading 3","Heading 4","Quote","Code","Insert","Insert table","Decrease Indent","Increase Indent","Select Special Character","Insert Special Character","Paint format","Change mode","Margins","top","right","bottom","left","Styles","Classes","Align","Right","Center","Left","--Not Set--","Src","Title","Alternative","Link","Open link in new tab","Image","file","Advanced","Image properties","Cancel","Ok","Your code is similar to HTML. Keep as HTML?","Paste as HTML","Keep","Clean","Insert as Text","Insert only Text","Word Paste Detected","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","File Browser","Error on load list","Error on load folders","Are you sure?","Enter Directory name","Create directory","type name","Drop image","Drop file","or click","Alternative text","Browse","Upload","Background","Text","Top","Middle","Bottom","Insert column before","Insert column after","Insert row above","Insert row below","Delete table","Delete row","Delete column","Empty cell","source","bold","italic","brush","link","undo","redo","table","image","eraser","paragraph","fontsize","video","font","about","print","underline","strikethrough","indent","outdent","fullsize","shrink","hr","ul","ol","cut","selectall","Embed code","Open link","Edit link","No follow","Unlink","Eye","pencil","Update"," URL","Edit","Horizontal align","Filter","Sort by changed","Sort by name","Sort by size","Add folder","Reset","Save","Save as ...","Resize","Crop","Width","Height","Keep Aspect Ratio","Yes","No","Remove","Select","Chars: %d","Words: %d","All","Select %s","Select all","Vertical align","Split","Split vertical","Split horizontal","Merge","Add column","Add row","Delete","Border","License: %s","Strike through","Underline","superscript","subscript","Cut selection","Break","Search for","Replace with","Replace","Paste","Choose Content to Paste","You can only edit your own images. Download this image on the host?","The image has been successfully uploaded to the host!","palette","There are no files","Rename","Enter new name","preview","download","Paste from clipboard","Your browser doesn't support direct access to the clipboard.","Copy selection","copy","Border radius","Show all","Apply","Please fill out this field","Please enter a web address","Default","Circle","Dot","Quadrate","Find","Find Previous","Find Next","Insert className","Press Alt for custom resizing"]
46
+ module.exports["default"] = ["Type something","About Jodit","Jodit Editor","Free Non-commercial Version","Jodit User's Guide","contains detailed help for using","For information about the license, please go to our website:","Buy full version","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.","Anchor","Open in new tab","Open in fullsize","Clear Formatting","Fill color or set the text color","Redo","Undo","Bold","Italic","Insert Unordered List","Insert Ordered List","Align Center","Align Justify","Align Left","Align Right","Insert Horizontal Line","Insert Image","Insert file","Insert youtube/vimeo video","Insert link","Font size","Font family","Insert format block","Normal","Heading 1","Heading 2","Heading 3","Heading 4","Quote","Code","Insert","Insert table","Decrease Indent","Increase Indent","Select Special Character","Insert Special Character","Paint format","Change mode","Margins","top","right","bottom","left","Styles","Classes","Align","Right","Center","Left","--Not Set--","Src","Title","Alternative","Link","Open link in new tab","Image","file","Advanced","Image properties","Cancel","Ok","Your code is similar to HTML. Keep as HTML?","Paste as HTML","Keep","Clean","Insert as Text","Insert only Text","Word Paste Detected","The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","File Browser","Error on load list","Error on load folders","Are you sure?","Enter Directory name","Create directory","type name","Drop image","Drop file","or click","Alternative text","Browse","Upload","Background","Text","Top","Middle","Bottom","Insert column before","Insert column after","Insert row above","Insert row below","Delete table","Delete row","Delete column","Empty cell","source","bold","italic","brush","link","undo","redo","table","image","eraser","paragraph","fontsize","video","font","about","print","underline","strikethrough","indent","outdent","fullsize","shrink","hr","ul","ol","cut","selectall","Embed code","Open link","Edit link","No follow","Unlink","Eye","pencil","Update"," URL","Edit","Horizontal align","Filter","Sort by changed","Sort by name","Sort by size","Add folder","Reset","Save","Save as ...","Resize","Crop","Width","Height","Keep Aspect Ratio","Yes","No","Remove","Select","Chars: %d","Words: %d","All","Select %s","Select all","Vertical align","Split","Split vertical","Split horizontal","Merge","Add column","Add row","Delete","Border","License: %s","Strike through","Underline","superscript","subscript","Cut selection","Break","Search for","Replace with","Replace","Paste","Choose Content to Paste","You can only edit your own images. Download this image on the host?","The image has been successfully uploaded to the host!","palette","There are no files","Rename","Enter new name","preview","download","Paste from clipboard","Your browser doesn't support direct access to the clipboard.","Copy selection","copy","Border radius","Show all","Apply","Please fill out this field","Please enter a web address","Default","Circle","Dot","Quadrate","Find","Find Previous","Find Next","Insert className","Press Alt for custom resizing"]
47
47
 
48
48
  /***/ }),
49
49
 
@@ -407,7 +407,7 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 179
407
407
  /***/ 7986:
408
408
  /***/ (function(module) {
409
409
 
410
- module.exports = "<svg fill=\"none\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M5.09668 6.99707H7.17358L4.17358 3.99707L1.17358 6.99707H3.09668V17.0031H1.15881L4.15881 20.0031L7.15881 17.0031H5.09668V6.99707Z\"/> <path d=\"M22.8412 7H8.84119V5H22.8412V7Z\"/> <path d=\"M22.8412 11H8.84119V9H22.8412V11Z\"/> <path d=\"M8.84119 15H22.8412V13H8.84119V15Z\"/> <path d=\"M22.8412 19H8.84119V17H22.8412V19Z\"/> </svg>"
410
+ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M5.09668 6.99707H7.17358L4.17358 3.99707L1.17358 6.99707H3.09668V17.0031H1.15881L4.15881 20.0031L7.15881 17.0031H5.09668V6.99707Z\"/> <path d=\"M22.8412 7H8.84119V5H22.8412V7Z\"/> <path d=\"M22.8412 11H8.84119V9H22.8412V11Z\"/> <path d=\"M8.84119 15H22.8412V13H8.84119V15Z\"/> <path d=\"M22.8412 19H8.84119V17H22.8412V19Z\"/> </svg>"
411
411
 
412
412
  /***/ }),
413
413
 
@@ -709,6 +709,16 @@ __webpack_require__.r(__webpack_exports__);
709
709
  // extracted by mini-css-extract-plugin
710
710
 
711
711
 
712
+ /***/ }),
713
+
714
+ /***/ 99895:
715
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
716
+
717
+ "use strict";
718
+ __webpack_require__.r(__webpack_exports__);
719
+ // extracted by mini-css-extract-plugin
720
+
721
+
712
722
  /***/ }),
713
723
 
714
724
  /***/ 87682:
@@ -1119,16 +1129,6 @@ __webpack_require__.r(__webpack_exports__);
1119
1129
  // extracted by mini-css-extract-plugin
1120
1130
 
1121
1131
 
1122
- /***/ }),
1123
-
1124
- /***/ 14351:
1125
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1126
-
1127
- "use strict";
1128
- __webpack_require__.r(__webpack_exports__);
1129
- // extracted by mini-css-extract-plugin
1130
-
1131
-
1132
1132
  /***/ }),
1133
1133
 
1134
1134
  /***/ 89310:
@@ -5710,6 +5710,7 @@ var Config = (function () {
5710
5710
  'dots',
5711
5711
  'selectall'
5712
5712
  ];
5713
+ this.allowCommandsInReadOnly = ['selectall', 'preview', 'print'];
5713
5714
  this.toolbarButtonSize = 'middle';
5714
5715
  this.allowTabNavigation = false;
5715
5716
  this.inline = false;
@@ -6946,6 +6947,62 @@ function throttle(timeout, firstCallImmediately) {
6946
6947
  exports.throttle = throttle;
6947
6948
 
6948
6949
 
6950
+ /***/ }),
6951
+
6952
+ /***/ 73941:
6953
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6954
+
6955
+ "use strict";
6956
+
6957
+ /*!
6958
+ * Jodit Editor (https://xdsoft.net/jodit/)
6959
+ * Released under MIT see LICENSE.txt in the project root for license information.
6960
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
6961
+ */
6962
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6963
+ exports.derive = void 0;
6964
+ var tslib_1 = __webpack_require__(20255);
6965
+ var checker_1 = __webpack_require__(37379);
6966
+ function derive() {
6967
+ var traits = [];
6968
+ for (var _i = 0; _i < arguments.length; _i++) {
6969
+ traits[_i] = arguments[_i];
6970
+ }
6971
+ return function (target) {
6972
+ var origin = target.prototype;
6973
+ for (var i = 0; i < traits.length; i++) {
6974
+ var trait = traits[i];
6975
+ var keys = Object.getOwnPropertyNames(trait.prototype);
6976
+ var _loop_1 = function (j) {
6977
+ var key = keys[j], method = Object.getOwnPropertyDescriptor(trait.prototype, key);
6978
+ var canDerive = method != null &&
6979
+ (0, checker_1.isFunction)(method.value) &&
6980
+ !(0, checker_1.isFunction)(origin[key]);
6981
+ if (canDerive) {
6982
+ Object.defineProperty(origin, key, {
6983
+ enumerable: true,
6984
+ configurable: true,
6985
+ writable: true,
6986
+ value: function () {
6987
+ var _a;
6988
+ var args = [];
6989
+ for (var _i = 0; _i < arguments.length; _i++) {
6990
+ args[_i] = arguments[_i];
6991
+ }
6992
+ return (_a = method.value).call.apply(_a, tslib_1.__spreadArray([this], tslib_1.__read(args), false));
6993
+ }
6994
+ });
6995
+ }
6996
+ };
6997
+ for (var j = 0; j < keys.length; j++) {
6998
+ _loop_1(j);
6999
+ }
7000
+ }
7001
+ };
7002
+ }
7003
+ exports.derive = derive;
7004
+
7005
+
6949
7006
  /***/ }),
6950
7007
 
6951
7008
  /***/ 46169:
@@ -7037,6 +7094,7 @@ tslib_1.__exportStar(__webpack_require__(86358), exports);
7037
7094
  tslib_1.__exportStar(__webpack_require__(44801), exports);
7038
7095
  tslib_1.__exportStar(__webpack_require__(69770), exports);
7039
7096
  tslib_1.__exportStar(__webpack_require__(44101), exports);
7097
+ tslib_1.__exportStar(__webpack_require__(73941), exports);
7040
7098
  var autobind_decorator_1 = __webpack_require__(70631);
7041
7099
  Object.defineProperty(exports, "autobind", ({ enumerable: true, get: function () { return autobind_decorator_1.default; } }));
7042
7100
 
@@ -7391,7 +7449,7 @@ var Dom = (function () {
7391
7449
  tag.appendChild(elm.firstChild);
7392
7450
  }
7393
7451
  }
7394
- if (withAttributes) {
7452
+ if (withAttributes && Dom.isElement(elm) && Dom.isElement(tag)) {
7395
7453
  (0, helpers_1.toArray)(elm.attributes).forEach(function (attr) {
7396
7454
  tag.setAttribute(attr.name, attr.value);
7397
7455
  });
@@ -7659,8 +7717,8 @@ var Dom = (function () {
7659
7717
  }
7660
7718
  return sibling && cond(sibling) ? sibling : null;
7661
7719
  };
7662
- Dom.findNotEmptySibling = function (node, backspace) {
7663
- return Dom.findSibling(node, backspace, function (n) {
7720
+ Dom.findNotEmptySibling = function (node, left) {
7721
+ return Dom.findSibling(node, left, function (n) {
7664
7722
  var _a;
7665
7723
  return (!Dom.isEmptyTextNode(n) &&
7666
7724
  Boolean(!Dom.isText(n) || (((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.length) && (0, helpers_1.trim)(n.nodeValue))));
@@ -7714,8 +7772,10 @@ var Dom = (function () {
7714
7772
  };
7715
7773
  Dom.furthest = function (node, condition, root) {
7716
7774
  var matchedParent = null, current = node === null || node === void 0 ? void 0 : node.parentElement;
7717
- while (current && current !== root && condition(current)) {
7718
- matchedParent = current;
7775
+ while (current && current !== root) {
7776
+ if (condition(current)) {
7777
+ matchedParent = current;
7778
+ }
7719
7779
  current = current === null || current === void 0 ? void 0 : current.parentElement;
7720
7780
  }
7721
7781
  return matchedParent;
@@ -7795,6 +7855,11 @@ var Dom = (function () {
7795
7855
  node.parentNode.removeChild(node);
7796
7856
  });
7797
7857
  };
7858
+ Dom.safeInsertNode = function (range, node) {
7859
+ range.collapsed || range.deleteContents();
7860
+ range.insertNode(node);
7861
+ [node.nextSibling, node.previousSibling].forEach(function (n) { return Dom.isText(n) && !n.nodeValue && Dom.safeRemove(n); });
7862
+ };
7798
7863
  Dom.hide = function (node) {
7799
7864
  if (!node) {
7800
7865
  return;
@@ -10461,8 +10526,8 @@ var offset = function (elm, jodit, doc, recurse) {
10461
10526
  var topValue, leftValue;
10462
10527
  var iframe = jodit.iframe;
10463
10528
  if (!recurse && jodit && jodit.options && jodit.o.iframe && iframe) {
10464
- var _a = (0, exports.offset)(iframe, jodit, jodit.od, true), top = _a.top, left = _a.left;
10465
- topValue = rect.top + top;
10529
+ var _a = (0, exports.offset)(iframe, jodit, jodit.od, true), top_1 = _a.top, left = _a.left;
10530
+ topValue = rect.top + top_1;
10466
10531
  leftValue = rect.left + left;
10467
10532
  }
10468
10533
  else {
@@ -10499,9 +10564,9 @@ function position(elm, jodit, recurse) {
10499
10564
  var rect = elm.getBoundingClientRect();
10500
10565
  var xPos = rect.left, yPos = rect.top;
10501
10566
  if ((0, is_jodit_object_1.isJoditObject)(jodit) && jodit.iframe && !recurse) {
10502
- var _a = position(jodit.iframe, jodit, true), left = _a.left, top = _a.top;
10567
+ var _a = position(jodit.iframe, jodit, true), left = _a.left, top_1 = _a.top;
10503
10568
  xPos += left;
10504
- yPos += top;
10569
+ yPos += top_1;
10505
10570
  }
10506
10571
  return {
10507
10572
  left: Math.round(xPos),
@@ -10919,7 +10984,7 @@ var is_function_1 = __webpack_require__(84121);
10919
10984
  var is_string_1 = __webpack_require__(40607);
10920
10985
  var alreadyLoadedList = new Map();
10921
10986
  var cacheLoaders = function (loader) {
10922
- return function (jodit, url) { return tslib_1.__awaiter(void 0, void 0, Promise, function () {
10987
+ return function (jodit, url) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
10923
10988
  var promise;
10924
10989
  return tslib_1.__generator(this, function (_a) {
10925
10990
  if (alreadyLoadedList.has(url)) {
@@ -12502,6 +12567,7 @@ var append_script_1 = __webpack_require__(63116);
12502
12567
  var array_1 = __webpack_require__(3005);
12503
12568
  var string_1 = __webpack_require__(15664);
12504
12569
  var utils_1 = __webpack_require__(51976);
12570
+ var global_1 = __webpack_require__(58299);
12505
12571
  var PluginSystem = (function () {
12506
12572
  function PluginSystem() {
12507
12573
  this._items = new Map();
@@ -12521,6 +12587,7 @@ var PluginSystem = (function () {
12521
12587
  };
12522
12588
  PluginSystem.prototype.add = function (name, plugin) {
12523
12589
  this._items.set(this.normalizeName(name), plugin);
12590
+ global_1.eventEmitter.fire("plugin:".concat(name, ":ready"));
12524
12591
  };
12525
12592
  PluginSystem.prototype.get = function (name) {
12526
12593
  return this._items.get(this.normalizeName(name));
@@ -12568,6 +12635,19 @@ var PluginSystem = (function () {
12568
12635
  jodit.__plugins = pluginsMap;
12569
12636
  });
12570
12637
  };
12638
+ PluginSystem.prototype.wait = function (name) {
12639
+ var _this = this;
12640
+ return new Promise(function (resolve) {
12641
+ if (_this.get(name)) {
12642
+ return resolve();
12643
+ }
12644
+ var onReady = function () {
12645
+ resolve();
12646
+ global_1.eventEmitter.off("plugin:".concat(name, ":ready"), onReady);
12647
+ };
12648
+ global_1.eventEmitter.on("plugin:".concat(name, ":ready"), onReady);
12649
+ });
12650
+ };
12571
12651
  PluginSystem.prototype.hasDisabledRequires = function (disableList, requires) {
12572
12652
  return Boolean((requires === null || requires === void 0 ? void 0 : requires.length) &&
12573
12653
  disableList.some(function (disabled) { return requires.includes(disabled); }));
@@ -12652,7 +12732,7 @@ var PluginSystem = (function () {
12652
12732
  }));
12653
12733
  };
12654
12734
  PluginSystem.loadStyle = function (jodit, pluginName) {
12655
- return tslib_1.__awaiter(this, void 0, Promise, function () {
12735
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
12656
12736
  var url;
12657
12737
  return tslib_1.__generator(this, function (_a) {
12658
12738
  url = PluginSystem.getFullUrl(jodit, pluginName, false);
@@ -13026,7 +13106,7 @@ var Response = (function () {
13026
13106
  configurable: true
13027
13107
  });
13028
13108
  Response.prototype.json = function () {
13029
- return tslib_1.__awaiter(this, void 0, Promise, function () {
13109
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
13030
13110
  return tslib_1.__generator(this, function (_a) {
13031
13111
  return [2, JSON.parse(this.body)];
13032
13112
  });
@@ -13036,7 +13116,7 @@ var Response = (function () {
13036
13116
  return Promise.resolve(this.body);
13037
13117
  };
13038
13118
  Response.prototype.blob = function () {
13039
- return tslib_1.__awaiter(this, void 0, Promise, function () {
13119
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
13040
13120
  return tslib_1.__generator(this, function (_a) {
13041
13121
  return [2, this.body];
13042
13122
  });
@@ -13548,6 +13628,7 @@ var Select = (function () {
13548
13628
  if (!this.isCollapsed()) {
13549
13629
  this.j.execCommand('Delete');
13550
13630
  }
13631
+ this.j.e.fire('beforeInsertNode', node);
13551
13632
  if (sel && sel.rangeCount) {
13552
13633
  var range = sel.getRangeAt(0);
13553
13634
  if (dom_1.Dom.isOrContains(this.area, range.commonAncestorContainer)) {
@@ -13556,8 +13637,7 @@ var Select = (function () {
13556
13637
  (_a = range.startContainer.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(node, range.startContainer);
13557
13638
  }
13558
13639
  else {
13559
- range.deleteContents();
13560
- range.insertNode(node);
13640
+ dom_1.Dom.safeInsertNode(range, node);
13561
13641
  }
13562
13642
  }
13563
13643
  else {
@@ -13611,7 +13691,9 @@ var Select = (function () {
13611
13691
  lastChild = node.firstChild;
13612
13692
  fragment.appendChild(node.firstChild);
13613
13693
  }
13614
- this.insertNode(fragment, false, false);
13694
+ this.insertNode(fragment.firstChild && fragment.firstChild === fragment.lastChild
13695
+ ? fragment.lastChild
13696
+ : fragment, false, false);
13615
13697
  if (insertCursorAfter) {
13616
13698
  if (lastChild) {
13617
13699
  this.setCursorAfter(lastChild);
@@ -13667,7 +13749,7 @@ var Select = (function () {
13667
13749
  if (!dom_1.Dom.isHTMLElement(root_1)) {
13668
13750
  root_1 = root_1.parentElement;
13669
13751
  }
13670
- var nodes_1 = [], startOffset = range.startOffset, length = root_1.childNodes.length, elementOffset = startOffset < length ? startOffset : length - 1;
13752
+ var nodes_1 = [], startOffset = range.startOffset, length_1 = root_1.childNodes.length, elementOffset = startOffset < length_1 ? startOffset : length_1 - 1;
13671
13753
  var start = range.startContainer === this.area
13672
13754
  ? root_1.childNodes[elementOffset]
13673
13755
  : range.startContainer, end_1 = range.endContainer === this.area
@@ -13795,7 +13877,7 @@ var Select = (function () {
13795
13877
  fakeNode = this.j.createInside.text(consts.INVISIBLE_SPACE);
13796
13878
  inStart ? range.setStartBefore(node) : range.setEndAfter(node);
13797
13879
  range.collapse(inStart);
13798
- range.insertNode(fakeNode);
13880
+ dom_1.Dom.safeInsertNode(range, fakeNode);
13799
13881
  range.selectNode(fakeNode);
13800
13882
  }
13801
13883
  else {
@@ -14031,7 +14113,7 @@ var Select = (function () {
14031
14113
  var br = this.j.createInside.element('br'), prevFake = this.j.createInside.text(constants_1.INVISIBLE_SPACE), nextFake = prevFake.cloneNode();
14032
14114
  try {
14033
14115
  if (cursorOnTheRight || cursorOnTheLeft) {
14034
- range.insertNode(br);
14116
+ dom_1.Dom.safeInsertNode(range, br);
14035
14117
  var clearBR = function (start, getNext) {
14036
14118
  var next = getNext(start);
14037
14119
  while (next) {
@@ -14063,8 +14145,13 @@ var Select = (function () {
14063
14145
  leftRange.setEnd(range.startContainer, range.startOffset);
14064
14146
  }
14065
14147
  var fragment = leftRange.extractContents();
14148
+ var clearEmpties = function (node) {
14149
+ return dom_1.Dom.each(node, function (node) { return dom_1.Dom.isEmptyTextNode(node) && dom_1.Dom.safeRemove(node); });
14150
+ };
14066
14151
  if (currentBox.parentNode) {
14067
14152
  try {
14153
+ clearEmpties(fragment);
14154
+ clearEmpties(currentBox);
14068
14155
  currentBox.parentNode.insertBefore(fragment, currentBox);
14069
14156
  if (cursorOnTheRight && (br === null || br === void 0 ? void 0 : br.parentNode)) {
14070
14157
  var range_2 = this.createRange();
@@ -14104,7 +14191,7 @@ var Select = (function () {
14104
14191
  var fake = _this.j.createInside.fake();
14105
14192
  var r = range.cloneRange();
14106
14193
  r.collapse(start);
14107
- r.insertNode(fake);
14194
+ dom_1.Dom.safeInsertNode(r, fake);
14108
14195
  (0, helpers_2.moveTheNodeAlongTheEdgeOutward)(fake, start, _this.j.editor);
14109
14196
  return fake;
14110
14197
  };
@@ -14872,7 +14959,7 @@ function wrapUnwrappedText(style, elm, jodit, getRange) {
14872
14959
  var fragment = range.extractContents();
14873
14960
  var wrapper = ci.element(style.element);
14874
14961
  wrapper.appendChild(fragment);
14875
- range.insertNode(wrapper);
14962
+ dom_1.Dom.safeInsertNode(range, wrapper);
14876
14963
  if (style.elementIsBlock) {
14877
14964
  if (dom_1.Dom.isEmpty(wrapper) &&
14878
14965
  !dom_1.Dom.isTag(wrapper.firstElementChild, 'br')) {
@@ -15314,6 +15401,61 @@ var Storage = (function () {
15314
15401
  exports.Storage = Storage;
15315
15402
 
15316
15403
 
15404
+ /***/ }),
15405
+
15406
+ /***/ 95104:
15407
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
15408
+
15409
+ "use strict";
15410
+
15411
+ /*!
15412
+ * Jodit Editor (https://xdsoft.net/jodit/)
15413
+ * Released under MIT see LICENSE.txt in the project root for license information.
15414
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
15415
+ */
15416
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
15417
+ exports.Dlgs = void 0;
15418
+ var tslib_1 = __webpack_require__(20255);
15419
+ var modules_1 = __webpack_require__(46701);
15420
+ var helpers_1 = __webpack_require__(92654);
15421
+ var Dlgs = (function () {
15422
+ function Dlgs() {
15423
+ }
15424
+ Dlgs.prototype.dlg = function (options) {
15425
+ var dialog = new modules_1.Dialog(tslib_1.__assign({ language: this.o.language, shadowRoot: this.o.shadowRoot, ownerWindow: this.o.ownerWindow, defaultTimeout: this.o.defaultTimeout, theme: this.o.theme, globalFullSize: this.o.globalFullSize }, options));
15426
+ (0, helpers_1.markOwner)(this, dialog.container);
15427
+ dialog.parent = this;
15428
+ return dialog.bindDestruct(this);
15429
+ };
15430
+ Dlgs.prototype.confirm = function (msg, title, callback) {
15431
+ if ((0, helpers_1.isString)(title)) {
15432
+ title = this.i18n(title);
15433
+ }
15434
+ return modules_1.Confirm.call(this.dlg(), this.i18n(msg), title, callback);
15435
+ };
15436
+ Dlgs.prototype.prompt = function (msg, title, callback, placeholder, defaultValue) {
15437
+ if ((0, helpers_1.isString)(title)) {
15438
+ title = this.i18n(title);
15439
+ }
15440
+ if ((0, helpers_1.isString)(placeholder)) {
15441
+ placeholder = this.i18n(placeholder);
15442
+ }
15443
+ return modules_1.Prompt.call(this.dlg(), this.i18n(msg), title, callback, placeholder, defaultValue);
15444
+ };
15445
+ Dlgs.prototype.alert = function (msg, title, callback, className) {
15446
+ if ((0, helpers_1.isString)(msg)) {
15447
+ msg = this.i18n(msg);
15448
+ }
15449
+ if ((0, helpers_1.isString)(title)) {
15450
+ title = this.i18n(title);
15451
+ }
15452
+ return modules_1.Alert.call(this.dlg(), msg, title, callback, className);
15453
+ };
15454
+ return Dlgs;
15455
+ }());
15456
+ exports.Dlgs = Dlgs;
15457
+
15458
+
15317
15459
  /***/ }),
15318
15460
 
15319
15461
  /***/ 48438:
@@ -15332,10 +15474,10 @@ var to_array_1 = __webpack_require__(42464);
15332
15474
  var Elms = (function () {
15333
15475
  function Elms() {
15334
15476
  }
15335
- Elms.getElm = function (elementName) {
15477
+ Elms.prototype.getElm = function (elementName) {
15336
15478
  return this.container.querySelector(".".concat(this.getFullElName(elementName)));
15337
15479
  };
15338
- Elms.getElms = function (elementName) {
15480
+ Elms.prototype.getElms = function (elementName) {
15339
15481
  return (0, to_array_1.toArray)(this.container.querySelectorAll(".".concat(this.getFullElName(elementName))));
15340
15482
  };
15341
15483
  return Elms;
@@ -15359,6 +15501,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
15359
15501
  var tslib_1 = __webpack_require__(20255);
15360
15502
  tslib_1.__exportStar(__webpack_require__(48438), exports);
15361
15503
  tslib_1.__exportStar(__webpack_require__(62957), exports);
15504
+ tslib_1.__exportStar(__webpack_require__(95104), exports);
15362
15505
 
15363
15506
 
15364
15507
  /***/ }),
@@ -15380,10 +15523,11 @@ var is_void_1 = __webpack_require__(13859);
15380
15523
  var Mods = (function () {
15381
15524
  function Mods() {
15382
15525
  }
15383
- Mods.setMod = function (name, value, container) {
15526
+ Mods.prototype.afterSetMod = function (name, value) { };
15527
+ Mods.prototype.setMod = function (name, value, container) {
15384
15528
  name = name.toLowerCase();
15385
15529
  if (this.mods[name] === value) {
15386
- return;
15530
+ return this;
15387
15531
  }
15388
15532
  var mod = "".concat(this.componentName, "_").concat(name), cl = (container || this.container).classList;
15389
15533
  (0, to_array_1.toArray)(cl).forEach(function (className) {
@@ -15395,8 +15539,10 @@ var Mods = (function () {
15395
15539
  value !== '' &&
15396
15540
  cl.add("".concat(mod, "_").concat(value.toString().toLowerCase()));
15397
15541
  this.mods[name] = value;
15542
+ this.afterSetMod(name, value);
15543
+ return this;
15398
15544
  };
15399
- Mods.getMod = function (name) {
15545
+ Mods.prototype.getMod = function (name) {
15400
15546
  var _a;
15401
15547
  return (_a = this.mods[name]) !== null && _a !== void 0 ? _a : null;
15402
15548
  };
@@ -15726,6 +15872,115 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
15726
15872
  var tslib_1 = __webpack_require__(20255);
15727
15873
  tslib_1.__exportStar(__webpack_require__(15327), exports);
15728
15874
  tslib_1.__exportStar(__webpack_require__(81433), exports);
15875
+ tslib_1.__exportStar(__webpack_require__(85598), exports);
15876
+
15877
+
15878
+ /***/ }),
15879
+
15880
+ /***/ 85598:
15881
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
15882
+
15883
+ "use strict";
15884
+
15885
+ /*!
15886
+ * Jodit Editor (https://xdsoft.net/jodit/)
15887
+ * Released under MIT see LICENSE.txt in the project root for license information.
15888
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
15889
+ */
15890
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
15891
+ exports.UITooltip = void 0;
15892
+ var tslib_1 = __webpack_require__(20255);
15893
+ __webpack_require__(99895);
15894
+ var helpers_1 = __webpack_require__(92654);
15895
+ var global_1 = __webpack_require__(58299);
15896
+ var decorators_1 = __webpack_require__(9901);
15897
+ var element_1 = __webpack_require__(71525);
15898
+ var UITooltip = (function (_super) {
15899
+ tslib_1.__extends(UITooltip, _super);
15900
+ function UITooltip(view) {
15901
+ var _this = _super.call(this, view) || this;
15902
+ _this.__isOpened = false;
15903
+ _this.__useCount = 1;
15904
+ _this.__delayShowTimeout = 0;
15905
+ (0, global_1.getContainer)(view, UITooltip).appendChild(_this.container);
15906
+ var timeout = 0;
15907
+ view.e
15908
+ .off('.tooltip')
15909
+ .on('showTooltip.tooltip', function (getPoint, content) {
15910
+ view.async.clearTimeout(timeout);
15911
+ _this.__open(getPoint, content);
15912
+ })
15913
+ .on('delayShowTooltip.tooltip', _this.__delayOpen)
15914
+ .on('escape.tooltip', _this.__close)
15915
+ .on('hideTooltip.tooltip change.tooltip scroll.tooltip changePlace.tooltip hidePopup.tooltip closeAllPopups.tooltip', function () {
15916
+ _this.j.async.clearTimeout(_this.__delayShowTimeout);
15917
+ timeout = view.async.setTimeout(_this.__close, _this.j.defaultTimeout);
15918
+ });
15919
+ return _this;
15920
+ }
15921
+ UITooltip.prototype.className = function () {
15922
+ return 'UITooltip';
15923
+ };
15924
+ UITooltip.make = function (view) {
15925
+ var instance = (0, helpers_1.dataBind)(view, 'ui-tooltip');
15926
+ if (instance) {
15927
+ instance.__useCount += 1;
15928
+ return instance;
15929
+ }
15930
+ instance = new UITooltip(view);
15931
+ (0, helpers_1.dataBind)(view, 'ui-tooltip', instance);
15932
+ return instance;
15933
+ };
15934
+ UITooltip.prototype.__delayOpen = function (getPoint, content) {
15935
+ var _this = this;
15936
+ var to = this.j.o.showTooltipDelay || this.j.defaultTimeout;
15937
+ this.j.async.clearTimeout(this.__delayShowTimeout);
15938
+ this.__delayShowTimeout = this.j.async.setTimeout(function () { return _this.__open(getPoint, content); }, {
15939
+ timeout: to,
15940
+ label: 'tooltip'
15941
+ });
15942
+ };
15943
+ UITooltip.prototype.__open = function (getPoint, content) {
15944
+ this.setMod('visible', true);
15945
+ this.container.innerHTML = content;
15946
+ this.__isOpened = true;
15947
+ this.__setPosition(getPoint);
15948
+ };
15949
+ UITooltip.prototype.__setPosition = function (getPoint) {
15950
+ var point = getPoint();
15951
+ (0, helpers_1.css)(this.container, {
15952
+ left: point.x,
15953
+ top: point.y
15954
+ });
15955
+ };
15956
+ UITooltip.prototype.__close = function () {
15957
+ this.j.async.clearTimeout(this.__delayShowTimeout);
15958
+ if (this.__isOpened) {
15959
+ this.__isOpened = false;
15960
+ this.setMod('visible', false);
15961
+ (0, helpers_1.css)(this.container, {
15962
+ left: -5000
15963
+ });
15964
+ }
15965
+ };
15966
+ UITooltip.prototype.destruct = function () {
15967
+ var _a;
15968
+ this.__useCount--;
15969
+ if (!this.__useCount) {
15970
+ (_a = this.j) === null || _a === void 0 ? void 0 : _a.e.off('.tooltip');
15971
+ this.__close();
15972
+ _super.prototype.destruct.call(this);
15973
+ }
15974
+ };
15975
+ tslib_1.__decorate([
15976
+ decorators_1.autobind
15977
+ ], UITooltip.prototype, "__delayOpen", null);
15978
+ tslib_1.__decorate([
15979
+ decorators_1.autobind
15980
+ ], UITooltip.prototype, "__close", null);
15981
+ return UITooltip;
15982
+ }(element_1.UIElement));
15983
+ exports.UITooltip = UITooltip;
15729
15984
 
15730
15985
 
15731
15986
  /***/ }),
@@ -15748,6 +16003,7 @@ var dom_1 = __webpack_require__(43887);
15748
16003
  var traits_1 = __webpack_require__(27671);
15749
16004
  var is_string_1 = __webpack_require__(40607);
15750
16005
  var icon_1 = __webpack_require__(76381);
16006
+ var decorators_1 = __webpack_require__(9901);
15751
16007
  var UIElement = (function (_super) {
15752
16008
  tslib_1.__extends(UIElement, _super);
15753
16009
  function UIElement(jodit, options) {
@@ -15762,6 +16018,7 @@ var UIElement = (function (_super) {
15762
16018
  });
15763
16019
  return _this;
15764
16020
  }
16021
+ UIElement_1 = UIElement;
15765
16022
  Object.defineProperty(UIElement.prototype, "parentElement", {
15766
16023
  get: function () {
15767
16024
  return this.__parentElement;
@@ -15803,7 +16060,7 @@ var UIElement = (function (_super) {
15803
16060
  return pe;
15804
16061
  }
15805
16062
  if (!pe.parentElement && pe.container.parentElement) {
15806
- pe = UIElement.closestElement(pe.container.parentElement, UIElement);
16063
+ pe = UIElement_1.closestElement(pe.container.parentElement, UIElement_1);
15807
16064
  }
15808
16065
  else {
15809
16066
  pe = pe.parentElement;
@@ -15821,20 +16078,6 @@ var UIElement = (function (_super) {
15821
16078
  });
15822
16079
  return elm ? elm === null || elm === void 0 ? void 0 : elm.component : null;
15823
16080
  };
15824
- UIElement.prototype.setMod = function (name, value, container) {
15825
- if (container === void 0) { container = this.container; }
15826
- traits_1.Mods.setMod.call(this, name, value, container);
15827
- return this;
15828
- };
15829
- UIElement.prototype.getMod = function (name) {
15830
- return traits_1.Mods.getMod.call(this, name);
15831
- };
15832
- UIElement.prototype.getElm = function (elementName) {
15833
- return traits_1.Elms.getElm.call(this, elementName);
15834
- };
15835
- UIElement.prototype.getElms = function (elementName) {
15836
- return traits_1.Elms.getElms.call(this, elementName);
15837
- };
15838
16081
  UIElement.prototype.update = function () {
15839
16082
  };
15840
16083
  UIElement.prototype.appendTo = function (element) {
@@ -15865,6 +16108,10 @@ var UIElement = (function (_super) {
15865
16108
  this.parentElement = null;
15866
16109
  return _super.prototype.destruct.call(this);
15867
16110
  };
16111
+ var UIElement_1;
16112
+ UIElement = UIElement_1 = tslib_1.__decorate([
16113
+ (0, decorators_1.derive)(traits_1.Mods, traits_1.Elms)
16114
+ ], UIElement);
15868
16115
  return UIElement;
15869
16116
  }(component_1.ViewComponent));
15870
16117
  exports.UIElement = UIElement;
@@ -16723,11 +16970,10 @@ var UIGroup = (function (_super) {
16723
16970
  elm.update();
16724
16971
  return this;
16725
16972
  };
16726
- UIGroup.prototype.setMod = function (name, value) {
16973
+ UIGroup.prototype.afterSetMod = function (name, value) {
16727
16974
  if (this.syncMod) {
16728
16975
  this.elements.forEach(function (elm) { return elm.setMod(name, value); });
16729
16976
  }
16730
- return _super.prototype.setMod.call(this, name, value);
16731
16977
  };
16732
16978
  UIGroup.prototype.appendChildToContainer = function (childContainer) {
16733
16979
  this.container.appendChild(childContainer);
@@ -17601,63 +17847,6 @@ var ProgressBar = (function (_super) {
17601
17847
  exports.ProgressBar = ProgressBar;
17602
17848
 
17603
17849
 
17604
- /***/ }),
17605
-
17606
- /***/ 94962:
17607
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
17608
-
17609
- "use strict";
17610
-
17611
- /*!
17612
- * Jodit Editor (https://xdsoft.net/jodit/)
17613
- * Released under MIT see LICENSE.txt in the project root for license information.
17614
- * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
17615
- */
17616
- Object.defineProperty(exports, "__esModule", ({ value: true }));
17617
- exports.Panel = void 0;
17618
- var tslib_1 = __webpack_require__(20255);
17619
- var view_with_toolbar_1 = __webpack_require__(62322);
17620
- var dialog_1 = __webpack_require__(68713);
17621
- var helpers_1 = __webpack_require__(92654);
17622
- var Panel = (function (_super) {
17623
- tslib_1.__extends(Panel, _super);
17624
- function Panel() {
17625
- return _super !== null && _super.apply(this, arguments) || this;
17626
- }
17627
- Panel.prototype.dialog = function (options) {
17628
- var dialog = new dialog_1.Dialog(tslib_1.__assign({ language: this.o.language, shadowRoot: this.o.shadowRoot, ownerWindow: this.o.ownerWindow, defaultTimeout: this.o.defaultTimeout, theme: this.o.theme }, options));
17629
- (0, helpers_1.markOwner)(this, dialog.container);
17630
- return dialog.bindDestruct(this);
17631
- };
17632
- Panel.prototype.confirm = function (msg, title, callback) {
17633
- if ((0, helpers_1.isString)(title)) {
17634
- title = this.i18n(title);
17635
- }
17636
- return dialog_1.Confirm.call(this.dialog(), this.i18n(msg), title, callback);
17637
- };
17638
- Panel.prototype.prompt = function (msg, title, callback, placeholder, defaultValue) {
17639
- if ((0, helpers_1.isString)(title)) {
17640
- title = this.i18n(title);
17641
- }
17642
- if ((0, helpers_1.isString)(placeholder)) {
17643
- placeholder = this.i18n(placeholder);
17644
- }
17645
- return dialog_1.Prompt.call(this.dialog(), this.i18n(msg), title, callback, placeholder, defaultValue);
17646
- };
17647
- Panel.prototype.alert = function (msg, title, callback, className) {
17648
- if ((0, helpers_1.isString)(msg)) {
17649
- msg = this.i18n(msg);
17650
- }
17651
- if ((0, helpers_1.isString)(title)) {
17652
- title = this.i18n(title);
17653
- }
17654
- return dialog_1.Alert.call(this.dialog(), msg, title, callback, className);
17655
- };
17656
- return Panel;
17657
- }(view_with_toolbar_1.ViewWithToolbar));
17658
- exports.Panel = Panel;
17659
-
17660
-
17661
17850
  /***/ }),
17662
17851
 
17663
17852
  /***/ 62322:
@@ -17820,12 +18009,13 @@ var View = (function (_super) {
17820
18009
  var _this = _super.call(this) || this;
17821
18010
  _this.isJodit = isJodit;
17822
18011
  _this.isView = true;
18012
+ _this.parent = null;
17823
18013
  _this.mods = {};
17824
18014
  _this.components = new Set();
17825
- _this.version = "3.19.4";
18015
+ _this.version = "3.20.2";
17826
18016
  _this.buffer = storage_1.Storage.makeStorage();
17827
18017
  _this.storage = storage_1.Storage.makeStorage(true, _this.componentName);
17828
- _this.OPTIONS = View.defaultOptions;
18018
+ _this.OPTIONS = View_1.defaultOptions;
17829
18019
  _this.__isFullSize = false;
17830
18020
  _this.__whoLocked = '';
17831
18021
  _this.isLockedNotBy = function (name) {
@@ -17838,29 +18028,11 @@ var View = (function (_super) {
17838
18028
  _this.initOwners();
17839
18029
  _this.events = new event_emitter_1.EventEmitter(_this.od);
17840
18030
  _this.create = new modules_1.Create(_this.od);
17841
- _this.container = _this.c.div();
17842
- _this.container.classList.add('jodit');
18031
+ _this.container = _this.c.div("jodit ".concat(_this.componentName));
17843
18032
  _this.progressbar = new modules_1.ProgressBar(_this);
17844
18033
  return _this;
17845
18034
  }
17846
- View.prototype.setMod = function () {
17847
- var _a = [];
17848
- for (var _i = 0; _i < arguments.length; _i++) {
17849
- _a[_i] = arguments[_i];
17850
- }
17851
- var _b = tslib_1.__read(_a, 2), name = _b[0], value = _b[1];
17852
- traits_1.Mods.setMod.call(this, name, value);
17853
- return this;
17854
- };
17855
- View.prototype.getMod = function (name) {
17856
- return traits_1.Mods.getMod.call(this, name);
17857
- };
17858
- View.prototype.getElm = function (elementName) {
17859
- return traits_1.Elms.getElm.call(this, elementName);
17860
- };
17861
- View.prototype.getElms = function (elementName) {
17862
- return traits_1.Elms.getElms.call(this, elementName);
17863
- };
18035
+ View_1 = View;
17864
18036
  Object.defineProperty(View.prototype, "basePath", {
17865
18037
  get: function () {
17866
18038
  if (this.o.basePath) {
@@ -17934,9 +18106,7 @@ var View = (function (_super) {
17934
18106
  return;
17935
18107
  }
17936
18108
  this.__isFullSize = isFullSize;
17937
- if (this.events) {
17938
- this.e.fire('toggleFullSize', isFullSize);
17939
- }
18109
+ this.e.fire('toggleFullSize', isFullSize);
17940
18110
  };
17941
18111
  Object.defineProperty(View.prototype, "isLocked", {
17942
18112
  get: function () {
@@ -17968,13 +18138,13 @@ var View = (function (_super) {
17968
18138
  configurable: true
17969
18139
  });
17970
18140
  View.prototype.getVersion = function () {
17971
- return "3.19.4";
18141
+ return "3.20.2";
17972
18142
  };
17973
18143
  View.getVersion = function () {
17974
- return "3.19.4";
18144
+ return "3.20.2";
17975
18145
  };
17976
18146
  View.prototype.initOptions = function (options) {
17977
- this.options = (0, helpers_1.ConfigProto)(options || {}, (0, helpers_1.ConfigProto)(this.options || {}, View.defaultOptions));
18147
+ this.options = (0, helpers_1.ConfigProto)(options || {}, (0, helpers_1.ConfigProto)(this.options || {}, View_1.defaultOptions));
17978
18148
  };
17979
18149
  View.prototype.initOwners = function () {
17980
18150
  var _a;
@@ -18034,10 +18204,14 @@ var View = (function (_super) {
18034
18204
  modules_1.Dom.safeRemove(this.container);
18035
18205
  _super.prototype.destruct.call(this);
18036
18206
  };
18207
+ var View_1;
18037
18208
  View.esNext = false;
18038
18209
  tslib_1.__decorate([
18039
18210
  (0, decorators_1.hook)(modules_1.STATUSES.beforeDestruct)
18040
18211
  ], View.prototype, "beforeDestruct", null);
18212
+ View = View_1 = tslib_1.__decorate([
18213
+ (0, decorators_1.derive)(traits_1.Mods, traits_1.Elms)
18214
+ ], View);
18041
18215
  return View;
18042
18216
  }(modules_1.Component));
18043
18217
  exports.View = View;
@@ -18077,10 +18251,10 @@ var constants = __webpack_require__(10063);
18077
18251
  var modules_1 = __webpack_require__(46701);
18078
18252
  var helpers_1 = __webpack_require__(92654);
18079
18253
  var storage_1 = __webpack_require__(42413);
18080
- var panel_1 = __webpack_require__(94962);
18081
18254
  var constants_1 = __webpack_require__(10063);
18082
18255
  var global_1 = __webpack_require__(58299);
18083
18256
  var decorators_1 = __webpack_require__(9901);
18257
+ var traits_1 = __webpack_require__(27671);
18084
18258
  var __defaultStyleDisplayKey = 'data-jodit-default-style-display';
18085
18259
  var __defaultClassesKey = 'data-jodit-default-classes';
18086
18260
  var Jodit = (function (_super) {
@@ -18099,7 +18273,7 @@ var Jodit = (function (_super) {
18099
18273
  _this.elementToPlace = new Map();
18100
18274
  try {
18101
18275
  var elementSource = (0, helpers_1.resolveElement)(element, _this.o.shadowRoot || _this.od);
18102
- if (Jodit.isJoditAssigned(elementSource)) {
18276
+ if (Jodit_1.isJoditAssigned(elementSource)) {
18103
18277
  return elementSource.component;
18104
18278
  }
18105
18279
  }
@@ -18147,6 +18321,7 @@ var Jodit = (function (_super) {
18147
18321
  });
18148
18322
  return _this;
18149
18323
  }
18324
+ Jodit_1 = Jodit;
18150
18325
  Jodit.prototype.className = function () {
18151
18326
  return 'Jodit';
18152
18327
  };
@@ -18159,6 +18334,15 @@ var Jodit = (function (_super) {
18159
18334
  _this.hookStatus('ready', function () { return resolve(_this); });
18160
18335
  });
18161
18336
  };
18337
+ Object.defineProperty(Jodit, "ready", {
18338
+ get: function () {
18339
+ return new Promise(function (resolve) {
18340
+ global_1.eventEmitter.on('oditready', resolve);
18341
+ });
18342
+ },
18343
+ enumerable: false,
18344
+ configurable: true
18345
+ });
18162
18346
  Object.defineProperty(Jodit.prototype, "text", {
18163
18347
  get: function () {
18164
18348
  if (this.editor) {
@@ -18184,7 +18368,7 @@ var Jodit = (function (_super) {
18184
18368
  return (0, helpers_1.markAsAtomic)(object);
18185
18369
  };
18186
18370
  Jodit.make = function (element, options) {
18187
- return new Jodit(element, options);
18371
+ return new Jodit_1(element, options);
18188
18372
  };
18189
18373
  Jodit.isJoditAssigned = function (element) {
18190
18374
  return (element &&
@@ -18539,7 +18723,8 @@ var Jodit = (function (_super) {
18539
18723
  if (!this.s.isFocused()) {
18540
18724
  this.s.focus();
18541
18725
  }
18542
- if (this.o.readonly && command !== 'selectall') {
18726
+ if (this.o.readonly &&
18727
+ !this.o.allowCommandsInReadOnly.includes(command)) {
18543
18728
  return;
18544
18729
  }
18545
18730
  var result;
@@ -19028,6 +19213,7 @@ var Jodit = (function (_super) {
19028
19213
  delete global_1.instances[this.id];
19029
19214
  _super.prototype.destruct.call(this);
19030
19215
  };
19216
+ var Jodit_1;
19031
19217
  Jodit.fatMode = false;
19032
19218
  Jodit.plugins = global_1.pluginSystem;
19033
19219
  Jodit.modules = global_1.modules;
@@ -19054,8 +19240,11 @@ var Jodit = (function (_super) {
19054
19240
  tslib_1.__decorate([
19055
19241
  decorators_1.autobind
19056
19242
  ], Jodit.prototype, "prepareWYSIWYGEditor", null);
19243
+ Jodit = Jodit_1 = tslib_1.__decorate([
19244
+ (0, decorators_1.derive)(traits_1.Dlgs)
19245
+ ], Jodit);
19057
19246
  return Jodit;
19058
- }(panel_1.Panel));
19247
+ }(modules_1.ViewWithToolbar));
19059
19248
  exports.Jodit = Jodit;
19060
19249
 
19061
19250
 
@@ -19321,7 +19510,6 @@ config_1.Config.prototype.controls.dialog = {
19321
19510
  icon: 'cancel',
19322
19511
  exec: function (dialog) {
19323
19512
  dialog.close();
19324
- dialog.toggleFullSizeBox(false);
19325
19513
  }
19326
19514
  }
19327
19515
  };
@@ -19331,7 +19519,6 @@ var Dialog = (function (_super) {
19331
19519
  var _this = _super.call(this, options) || this;
19332
19520
  _this.destroyAfterClose = false;
19333
19521
  _this.moved = false;
19334
- _this.iSetMaximization = false;
19335
19522
  _this.resizable = false;
19336
19523
  _this.draggable = false;
19337
19524
  _this.startX = 0;
@@ -19379,12 +19566,12 @@ var Dialog = (function (_super) {
19379
19566
  (0, helpers_1.assert)(dialogbox_footer != null, 'Footer element does not exist');
19380
19567
  var dialogbox_toolbar = self.getElm('header-toolbar');
19381
19568
  (0, helpers_1.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
19382
- self.dialog = dialog;
19383
- self.resizer = resizer;
19384
- self.dialogbox_header = dialogbox_header;
19385
- self.dialogbox_content = dialogbox_content;
19386
- self.dialogbox_footer = dialogbox_footer;
19387
- self.dialogbox_toolbar = dialogbox_toolbar;
19569
+ _this.dialog = dialog;
19570
+ _this.resizer = resizer;
19571
+ _this.dialogbox_header = dialogbox_header;
19572
+ _this.dialogbox_content = dialogbox_content;
19573
+ _this.dialogbox_footer = dialogbox_footer;
19574
+ _this.dialogbox_toolbar = dialogbox_toolbar;
19388
19575
  (0, helpers_1.css)(self.dialog, {
19389
19576
  maxWidth: self.options.maxWidth,
19390
19577
  minHeight: self.options.minHeight,
@@ -19599,21 +19786,12 @@ var Dialog = (function (_super) {
19599
19786
  });
19600
19787
  this.container.style.zIndex = (maxZIndex + 1).toString();
19601
19788
  };
19602
- Dialog.prototype.maximization = function (condition) {
19603
- if ((0, helpers_1.isVoid)(condition)) {
19604
- condition = !this.getMod('fullsize');
19789
+ Dialog.prototype.toggleFullSize = function (isFullSize) {
19790
+ if ((0, helpers_1.isVoid)(isFullSize)) {
19791
+ isFullSize = !this.getMod('fullsize');
19605
19792
  }
19606
- this.setMod('fullsize', condition);
19607
- this.toggleFullSizeBox(condition);
19608
- this.iSetMaximization = condition;
19609
- return condition;
19610
- };
19611
- Dialog.prototype.toggleFullSizeBox = function (condition) {
19612
- [this.destination, this.destination.parentNode].forEach(function (box) {
19613
- box &&
19614
- box.classList &&
19615
- box.classList.toggle('jodit_fullsize-box_true', condition);
19616
- });
19793
+ this.setMod('fullsize', isFullSize);
19794
+ _super.prototype.toggleFullSize.call(this, isFullSize);
19617
19795
  };
19618
19796
  Dialog.prototype.open = function (contentOrClose, titleOrModal, destroyAfterClose, modal) {
19619
19797
  global_1.eventEmitter.fire('closeAllPopups hideHelpers');
@@ -19642,7 +19820,7 @@ var Dialog = (function (_super) {
19642
19820
  this.setPosition(this.offsetX, this.offsetY);
19643
19821
  this.setMaxZIndex();
19644
19822
  if (this.o.fullsize) {
19645
- this.maximization(true);
19823
+ this.toggleFullSize(true);
19646
19824
  }
19647
19825
  this.e.fire('afterOpen', this);
19648
19826
  return this;
@@ -19652,33 +19830,27 @@ var Dialog = (function (_super) {
19652
19830
  this.setMod('modal', this.isModal);
19653
19831
  return this;
19654
19832
  };
19655
- Dialog.prototype.close = function (e) {
19656
- var _a, _b;
19833
+ Dialog.prototype.close = function () {
19657
19834
  if (this.isDestructed ||
19658
19835
  !this.isOpened ||
19659
19836
  this.getMod('static') === true) {
19660
19837
  return this;
19661
19838
  }
19662
- if (e) {
19663
- e.stopImmediatePropagation();
19664
- e.preventDefault();
19665
- }
19666
- if (this.e && this.e.fire('beforeClose', this) === false) {
19839
+ if (this.e.fire('beforeClose', this) === false) {
19667
19840
  return this;
19668
19841
  }
19669
19842
  this.setMod('active', false);
19670
19843
  this.isOpened = false;
19671
- this.e.fire('toggleFullSize', false);
19672
- if (this.iSetMaximization) {
19673
- this.maximization(false);
19844
+ if (this.isFullSize) {
19845
+ this.toggleFullSize(false);
19674
19846
  }
19675
19847
  dom_1.Dom.safeRemove(this.container);
19676
19848
  this.removeGlobalResizeListeners();
19677
19849
  if (this.destroyAfterClose) {
19678
19850
  this.destruct();
19679
19851
  }
19680
- (_a = this.e) === null || _a === void 0 ? void 0 : _a.fire(this, 'afterClose');
19681
- (_b = this.e) === null || _b === void 0 ? void 0 : _b.fire(this.ow, 'joditCloseDialog');
19852
+ this.e.fire(this, 'afterClose');
19853
+ this.e.fire(this.ow, 'joditCloseDialog');
19682
19854
  return this;
19683
19855
  };
19684
19856
  Dialog.prototype.buildToolbar = function () {
@@ -19892,7 +20064,7 @@ exports["default"] = (function (self) {
19892
20064
  ? {
19893
20065
  icon: 'bin',
19894
20066
  title: 'Delete',
19895
- exec: function () { return tslib_1.__awaiter(void 0, void 0, Promise, function () {
20067
+ exec: function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
19896
20068
  var e_1;
19897
20069
  return tslib_1.__generator(this, function (_a) {
19898
20070
  switch (_a.label) {
@@ -19918,7 +20090,7 @@ exports["default"] = (function (self) {
19918
20090
  icon: 'eye',
19919
20091
  title: 'Preview',
19920
20092
  exec: function () {
19921
- var preview = self.dialog({
20093
+ var preview = self.dlg({
19922
20094
  buttons: ['fullsize', 'dialog.close']
19923
20095
  }), temp_content = self.c.div(CLASS_PREVIEW, '<div class="jodit-icon_loader"></div>'), preview_box = self.c.div(CLASS_PREVIEW + '__box'), next = self.c.fromHTML(preview_tpl_next()), prev = self.c.fromHTML(preview_tpl_next('prev', 'left')), addLoadHandler = function (src) {
19924
20096
  var image = self.c.element('img');
@@ -20508,7 +20680,7 @@ var DataProvider = (function () {
20508
20680
  this.progressHandler = callback;
20509
20681
  };
20510
20682
  DataProvider.prototype.permissions = function (path, source) {
20511
- return tslib_1.__awaiter(this, void 0, Promise, function () {
20683
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
20512
20684
  var _this = this;
20513
20685
  return tslib_1.__generator(this, function (_a) {
20514
20686
  if (!this.o.permissions) {
@@ -20591,7 +20763,7 @@ var DataProvider = (function () {
20591
20763
  return elements;
20592
20764
  };
20593
20765
  DataProvider.prototype.tree = function (path, source) {
20594
- return tslib_1.__awaiter(this, void 0, Promise, function () {
20766
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
20595
20767
  var _this = this;
20596
20768
  return tslib_1.__generator(this, function (_a) {
20597
20769
  switch (_a.label) {
@@ -20860,7 +21032,7 @@ var tslib_1 = __webpack_require__(20255);
20860
21032
  var dom_1 = __webpack_require__(94522);
20861
21033
  var load_items_1 = __webpack_require__(92595);
20862
21034
  function loadTree(fb) {
20863
- return tslib_1.__awaiter(this, void 0, Promise, function () {
21035
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
20864
21036
  var items, tree;
20865
21037
  return tslib_1.__generator(this, function (_a) {
20866
21038
  fb.tree.setMod('active', true);
@@ -20905,7 +21077,6 @@ var config_1 = __webpack_require__(27537);
20905
21077
  var consts = __webpack_require__(10063);
20906
21078
  var storage_1 = __webpack_require__(42413);
20907
21079
  var helpers_1 = __webpack_require__(92654);
20908
- var panel_1 = __webpack_require__(94962);
20909
21080
  var dom_1 = __webpack_require__(94522);
20910
21081
  var factories_1 = __webpack_require__(43708);
20911
21082
  var state_listeners_1 = __webpack_require__(47588);
@@ -20918,6 +21089,8 @@ var event_emitter_1 = __webpack_require__(42293);
20918
21089
  var load_tree_1 = __webpack_require__(35978);
20919
21090
  var load_items_1 = __webpack_require__(92595);
20920
21091
  var component_1 = __webpack_require__(34543);
21092
+ var traits_1 = __webpack_require__(27671);
21093
+ var view_with_toolbar_1 = __webpack_require__(62322);
20921
21094
  __webpack_require__(88450);
20922
21095
  var FileBrowser = (function (_super) {
20923
21096
  tslib_1.__extends(FileBrowser, _super);
@@ -20961,7 +21134,7 @@ var FileBrowser = (function (_super) {
20961
21134
  self.options = (0, helpers_1.ConfigProto)(options || {}, config_1.Config.defaultOptions.filebrowser);
20962
21135
  self.storage = storage_1.Storage.makeStorage(Boolean(_this.o.saveStateInStorage), _this.componentName);
20963
21136
  self.dataProvider = (0, factories_1.makeDataProvider)(self, self.options);
20964
- self._dialog = _this.dialog({
21137
+ self._dialog = _this.dlg({
20965
21138
  minWidth: Math.min(700, screen.width),
20966
21139
  minHeight: 300,
20967
21140
  buttons: (_a = _this.o.headerButtons) !== null && _a !== void 0 ? _a : ['fullsize', 'dialog.close']
@@ -21149,7 +21322,7 @@ var FileBrowser = (function (_super) {
21149
21322
  FileBrowser.prototype.proxyDialogEvents = function (self) {
21150
21323
  var _this = this;
21151
21324
  ['afterClose', 'beforeOpen'].forEach(function (proxyEvent) {
21152
- self._dialog.events.on(self.dialog, proxyEvent, function () {
21325
+ self._dialog.events.on(self.dlg, proxyEvent, function () {
21153
21326
  _this.e.fire(proxyEvent);
21154
21327
  });
21155
21328
  });
@@ -21169,8 +21342,11 @@ var FileBrowser = (function (_super) {
21169
21342
  tslib_1.__decorate([
21170
21343
  decorators_1.autobind
21171
21344
  ], FileBrowser.prototype, "open", null);
21345
+ FileBrowser = tslib_1.__decorate([
21346
+ (0, decorators_1.derive)(traits_1.Dlgs)
21347
+ ], FileBrowser);
21172
21348
  return FileBrowser;
21173
- }(panel_1.Panel));
21349
+ }(view_with_toolbar_1.ViewWithToolbar));
21174
21350
  exports.FileBrowser = FileBrowser;
21175
21351
  function isFileBrowserFilesItem(target) {
21176
21352
  return (dom_1.Dom.isElement(target) &&
@@ -21960,7 +22136,7 @@ var Snapshot = (function (_super) {
21960
22136
  endOffset: 0
21961
22137
  }
21962
22138
  };
21963
- snapshot.html = this.j.getNativeEditorValue();
22139
+ snapshot.html = this.removeJoditSelection(this.j.getNativeEditorValue());
21964
22140
  var sel = this.j.s.sel;
21965
22141
  if (sel && sel.rangeCount) {
21966
22142
  var range = sel.getRangeAt(0), startContainer = this.calcHierarchyLadder(range.startContainer), endContainer = this.calcHierarchyLadder(range.endContainer);
@@ -22019,6 +22195,9 @@ var Snapshot = (function (_super) {
22019
22195
  this.isBlocked = false;
22020
22196
  _super.prototype.destruct.call(this);
22021
22197
  };
22198
+ Snapshot.prototype.removeJoditSelection = function (nativeEditorValue) {
22199
+ return nativeEditorValue.replace(/<span[^>]*jodit-selection_marker[^>]*><\/span>/g, '');
22200
+ };
22022
22201
  return Snapshot;
22023
22202
  }(component_1.ViewComponent));
22024
22203
  exports.Snapshot = Snapshot;
@@ -22397,7 +22576,7 @@ var ImageEditor = (function (_super) {
22397
22576
  _this.sizes = _this.editor.querySelector(".".concat(jie, "__area.").concat(jie, "__area_crop .jodit-image-editor__sizes"));
22398
22577
  _this.resizeHandler = _this.editor.querySelector(".".concat(jie, "__resizer"));
22399
22578
  _this.cropHandler = _this.editor.querySelector(".".concat(jie, "__croper"));
22400
- _this._dialog = _this.j.dialog({
22579
+ _this._dialog = _this.j.dlg({
22401
22580
  buttons: ['fullsize', 'dialog.close']
22402
22581
  });
22403
22582
  _this._dialog.setContent(_this.editor);
@@ -22861,20 +23040,13 @@ var StatusBar = (function (_super) {
22861
23040
  enumerable: false,
22862
23041
  configurable: true
22863
23042
  });
22864
- StatusBar.prototype.setMod = function (name, value) {
22865
- traits_1.Mods.setMod.call(this, name, value);
22866
- return this;
22867
- };
22868
- StatusBar.prototype.getMod = function (name) {
22869
- return traits_1.Mods.getMod.call(this, name);
22870
- };
22871
23043
  StatusBar.prototype.getHeight = function () {
22872
23044
  var _a, _b;
22873
23045
  return (_b = (_a = this.container) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
22874
23046
  };
22875
23047
  StatusBar.prototype.findEmpty = function (inTheRight) {
22876
23048
  if (inTheRight === void 0) { inTheRight = false; }
22877
- var items = traits_1.Elms.getElms.call(this, inTheRight ? 'item-right' : 'item');
23049
+ var items = this.getElms(inTheRight ? 'item-right' : 'item');
22878
23050
  for (var i = 0; i < items.length; i += 1) {
22879
23051
  if (!items[i].innerHTML.trim().length) {
22880
23052
  return items[i];
@@ -22906,7 +23078,8 @@ var StatusBar = (function (_super) {
22906
23078
  _super.prototype.destruct.call(this);
22907
23079
  };
22908
23080
  StatusBar = tslib_1.__decorate([
22909
- decorators_1.component
23081
+ decorators_1.component,
23082
+ (0, decorators_1.derive)(traits_1.Mods, traits_1.Elms)
22910
23083
  ], StatusBar);
22911
23084
  return StatusBar;
22912
23085
  }(component_1.ViewComponent));
@@ -23701,10 +23874,10 @@ var ToolbarButton = (function (_super) {
23701
23874
  state.icon.iconURL = ctr.iconURL;
23702
23875
  }
23703
23876
  else {
23704
- var name = ctr.icon || ctr.name;
23877
+ var name_1 = ctr.icon || ctr.name;
23705
23878
  state.icon.name =
23706
- icon_1.Icon.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name])
23707
- ? name
23879
+ icon_1.Icon.exists(name_1) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name_1])
23880
+ ? name_1
23708
23881
  : '';
23709
23882
  }
23710
23883
  if (!ctr.iconURL && !state.icon.name) {
@@ -23979,7 +24152,9 @@ var ToolbarCollection = (function (_super) {
23979
24152
  _this.listenEvents = 'updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize ' +
23980
24153
  'selectionchange changeSelection focus afterSetMode touchstart focus blur';
23981
24154
  _this.update = _this.j.async.debounce(_this.immediateUpdate, function () { return _this.j.defaultTimeout; });
24155
+ _this.__tooltip = null;
23982
24156
  _this.initEvents();
24157
+ _this.__tooltip = ui_1.UITooltip.make(jodit);
23983
24158
  return _this;
23984
24159
  }
23985
24160
  ToolbarCollection.prototype.className = function () {
@@ -24041,9 +24216,11 @@ var ToolbarCollection = (function (_super) {
24041
24216
  return this;
24042
24217
  };
24043
24218
  ToolbarCollection.prototype.destruct = function () {
24219
+ var _a;
24044
24220
  if (this.isDestructed) {
24045
24221
  return;
24046
24222
  }
24223
+ (_a = this.__tooltip) === null || _a === void 0 ? void 0 : _a.destruct();
24047
24224
  this.j.e
24048
24225
  .off(this.listenEvents, this.update)
24049
24226
  .off('afterSetMode focus', this.immediateUpdate);
@@ -24493,8 +24670,8 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
24493
24670
  var _loop_1 = function () {
24494
24671
  file_1 = fileList[i];
24495
24672
  if (file_1 && file_1.type) {
24496
- var mime = file_1.type.match(/\/([a-z0-9]+)/i);
24497
- var extension = mime[1] ? mime[1].toLowerCase() : '';
24673
+ var mime_1 = file_1.type.match(/\/([a-z0-9]+)/i);
24674
+ var extension = mime_1[1] ? mime_1[1].toLowerCase() : '';
24498
24675
  if (o.imagesExtensions.includes(extension)) {
24499
24676
  var reader_1 = new FileReader();
24500
24677
  promises.push(uploader.j.async.promise(function (resolve, reject) {
@@ -24531,8 +24708,8 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
24531
24708
  file = fileList[i];
24532
24709
  if (file) {
24533
24710
  var hasRealExtension = /\.[\d\w]+$/.test(file.name);
24534
- var mime = file.type.match(/\/([a-z0-9]+)/i);
24535
- var extension = mime && mime[1] ? mime[1].toLowerCase() : '';
24711
+ var mime_2 = file.type.match(/\/([a-z0-9]+)/i);
24712
+ var extension = mime_2 && mime_2[1] ? mime_2[1].toLowerCase() : '';
24536
24713
  var newName = fileList[i].name ||
24537
24714
  Math.random().toString().replace('.', '');
24538
24715
  if (!hasRealExtension && extension) {
@@ -24545,8 +24722,8 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process) {
24545
24722
  newName += '.' + extension;
24546
24723
  }
24547
24724
  }
24548
- var _a = tslib_1.__read(o.processFileName.call(uploader, o.filesVariableName(i), fileList[i], newName), 3), key = _a[0], iFile = _a[1], name = _a[2];
24549
- form_1.append(key, iFile, name);
24725
+ var _a = tslib_1.__read(o.processFileName.call(uploader, o.filesVariableName(i), fileList[i], newName), 3), key = _a[0], iFile = _a[1], name_1 = _a[2];
24726
+ form_1.append(key, iFile, name_1);
24550
24727
  }
24551
24728
  }
24552
24729
  if (process) {
@@ -25187,7 +25364,7 @@ var global_1 = __webpack_require__(58299);
25187
25364
  var icon_1 = __webpack_require__(76381);
25188
25365
  config_1.Config.prototype.controls.about = {
25189
25366
  exec: function (editor) {
25190
- var dialog = editor.dialog(), i = editor.i18n.bind(editor);
25367
+ var dialog = editor.dlg(), i = editor.i18n.bind(editor);
25191
25368
  dialog
25192
25369
  .setMod('theme', editor.o.theme)
25193
25370
  .setHeader(i('About Jodit'))
@@ -25292,7 +25469,7 @@ var addNewLine = (function (_super) {
25292
25469
  this.j.async.clearTimeout(this.timeout);
25293
25470
  this.line.classList.toggle('jodit-add-new-line_after', !this.preview);
25294
25471
  this.j.container.appendChild(this.line);
25295
- this.line.style.width = this.j.editor.clientWidth + 'px';
25472
+ this.line.style.width = this.j.container.clientWidth + 'px';
25296
25473
  };
25297
25474
  addNewLine.prototype.onLock = function (isLocked) {
25298
25475
  if (isLocked && this.isShown) {
@@ -25346,10 +25523,10 @@ var addNewLine = (function (_super) {
25346
25523
  e.target === editor.editor &&
25347
25524
  editor.s.isCollapsed()) {
25348
25525
  var editorBound = (0, helpers_1.offset)(editor.editor, editor, editor.ed);
25349
- var top = e.pageY - editor.ew.pageYOffset;
25526
+ var top_1 = e.pageY - editor.ew.pageYOffset;
25350
25527
  var p = editor.createInside.element(editor.o.enter);
25351
- if (Math.abs(top - editorBound.top) <
25352
- Math.abs(top - (editorBound.height + editorBound.top)) &&
25528
+ if (Math.abs(top_1 - editorBound.top) <
25529
+ Math.abs(top_1 - (editorBound.height + editorBound.top)) &&
25353
25530
  editor.editor.firstChild) {
25354
25531
  editor.editor.insertBefore(p, editor.editor.firstChild);
25355
25532
  }
@@ -25388,10 +25565,11 @@ var addNewLine = (function (_super) {
25388
25565
  }
25389
25566
  var pos = (0, helpers_1.position)(currentElement, this.j);
25390
25567
  var top = false;
25391
- var clientY = e.clientY;
25568
+ var clientY = e.clientY, clientX = e.clientX;
25392
25569
  if (this.j.iframe) {
25393
- var top_1 = (0, helpers_1.position)(this.j.iframe, this.j, true).top;
25394
- clientY += top_1;
25570
+ var _a = (0, helpers_1.position)(this.j.iframe, this.j, true), top_2 = _a.top, left = _a.left;
25571
+ clientY += top_2;
25572
+ clientX += left;
25395
25573
  }
25396
25574
  var delta = this.j.o.addNewLineDeltaShow;
25397
25575
  if (Math.abs(clientY - pos.top) <= delta) {
@@ -25408,7 +25586,7 @@ var addNewLine = (function (_super) {
25408
25586
  this.line.style.top = top + 'px';
25409
25587
  this.current = currentElement;
25410
25588
  this.show();
25411
- this.line.style.setProperty('--jd-offset-handle', e.clientX - pos.left - 10 + 'px');
25589
+ this.line.style.setProperty('--jd-offset-handle', clientX - pos.left - 10 + 'px');
25412
25590
  }
25413
25591
  else {
25414
25592
  this.current = false;
@@ -25568,14 +25746,17 @@ var backspace = (function (_super) {
25568
25746
  var range = sel.range;
25569
25747
  var fakeNode = jodit.createInside.text(constants_1.INVISIBLE_SPACE);
25570
25748
  try {
25571
- range.insertNode(fakeNode);
25749
+ dom_1.Dom.safeInsertNode(range, fakeNode);
25572
25750
  if (!dom_1.Dom.isOrContains(jodit.editor, fakeNode)) {
25573
25751
  return;
25574
25752
  }
25575
25753
  (0, helpers_2.moveNodeInsideStart)(jodit, fakeNode, backspace);
25576
25754
  if (cases_1.cases.some(function (func) {
25577
- return (0, helpers_1.isFunction)(func) &&
25578
- func(jodit, fakeNode, backspace, mode);
25755
+ if ((0, helpers_1.isFunction)(func) &&
25756
+ func(jodit, fakeNode, backspace, mode)) {
25757
+ if (false) {}
25758
+ return true;
25759
+ }
25579
25760
  })) {
25580
25761
  return false;
25581
25762
  }
@@ -25677,9 +25858,9 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
25677
25858
  dom_1.Dom.moveContent(mainClosestBox, sibling, !backspace);
25678
25859
  var remove = mainClosestBox;
25679
25860
  while (remove && remove !== jodit.editor && dom_1.Dom.isEmpty(remove)) {
25680
- var parent = remove.parentElement;
25861
+ var parent_1 = remove.parentElement;
25681
25862
  dom_1.Dom.safeRemove(remove);
25682
- remove = parent;
25863
+ remove = parent_1;
25683
25864
  }
25684
25865
  return true;
25685
25866
  }
@@ -25772,6 +25953,18 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
25772
25953
  var anotherSibling = dom_1.Dom.sibling(fakeNode, !backspace);
25773
25954
  var sibling = dom_1.Dom.sibling(fakeNode, backspace), removeNeighbor = null;
25774
25955
  var charRemoved = false, removed;
25956
+ var getNextInlineSibling = function (sibling) {
25957
+ var nextSibling = dom_1.Dom.sibling(sibling, backspace);
25958
+ if (!nextSibling &&
25959
+ sibling.parentNode &&
25960
+ sibling.parentNode !== jodit.editor) {
25961
+ nextSibling = (0, helpers_2.findMostNestedNeighbor)(sibling, !backspace, jodit.editor, true);
25962
+ }
25963
+ return nextSibling;
25964
+ };
25965
+ if (!sibling) {
25966
+ sibling = getNextInlineSibling(fakeNode);
25967
+ }
25775
25968
  while (sibling && (dom_1.Dom.isText(sibling) || dom_1.Dom.isInlineBlock(sibling))) {
25776
25969
  while (dom_1.Dom.isInlineBlock(sibling)) {
25777
25970
  sibling = (backspace ? sibling === null || sibling === void 0 ? void 0 : sibling.lastChild : sibling === null || sibling === void 0 ? void 0 : sibling.firstChild);
@@ -25781,8 +25974,8 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
25781
25974
  }
25782
25975
  if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
25783
25976
  var value = (0, helpers_1.toArray)(sibling.nodeValue);
25784
- var length = value.length;
25785
- var index = backspace ? length - 1 : 0;
25977
+ var length_1 = value.length;
25978
+ var index = backspace ? length_1 - 1 : 0;
25786
25979
  if (value[index] === constants_1.INVISIBLE_SPACE) {
25787
25980
  while (value[index] === constants_1.INVISIBLE_SPACE) {
25788
25981
  index += step;
@@ -25800,7 +25993,7 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
25800
25993
  value = [];
25801
25994
  }
25802
25995
  else {
25803
- value = value.slice(backspace ? 0 : index + 1, backspace ? index : length);
25996
+ value = value.slice(backspace ? 0 : index + 1, backspace ? index : length_1);
25804
25997
  }
25805
25998
  if (!anotherSibling ||
25806
25999
  !dom_1.Dom.isText(anotherSibling) ||
@@ -25829,22 +26022,25 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
25829
26022
  }
25830
26023
  break;
25831
26024
  }
25832
- var nextSibling = dom_1.Dom.sibling(sibling, backspace);
25833
- if (!nextSibling &&
25834
- sibling.parentNode &&
25835
- sibling.parentNode !== jodit.editor) {
25836
- nextSibling = (0, helpers_2.findMostNestedNeighbor)(sibling, !backspace, jodit.editor, true);
25837
- }
26025
+ var nextSibling = getNextInlineSibling(sibling);
25838
26026
  if (removeNeighbor) {
25839
26027
  dom_1.Dom.safeRemove(removeNeighbor);
25840
26028
  removeNeighbor = null;
25841
26029
  }
25842
26030
  sibling = nextSibling;
25843
26031
  }
26032
+ if (removeNeighbor) {
26033
+ dom_1.Dom.safeRemove(removeNeighbor);
26034
+ removeNeighbor = null;
26035
+ }
25844
26036
  if (charRemoved) {
25845
26037
  removeEmptyInlineParent(fakeNode);
25846
26038
  addBRInsideEmptyBlock(jodit, fakeNode);
25847
26039
  jodit.s.setCursorBefore(fakeNode);
26040
+ if (dom_1.Dom.isTag(fakeNode.previousSibling, 'br') &&
26041
+ !dom_1.Dom.findNotEmptySibling(fakeNode, false)) {
26042
+ dom_1.Dom.after(fakeNode, jodit.createInside.element('br'));
26043
+ }
25848
26044
  }
25849
26045
  return charRemoved;
25850
26046
  }
@@ -26012,6 +26208,10 @@ function checkRemoveUnbreakableElement(jodit, fakeNode, backspace) {
26012
26208
  if (dom_1.Dom.isElement(neighbor) &&
26013
26209
  (dom_1.Dom.isTag(neighbor, constants_1.INSEPARABLE_TAGS) || dom_1.Dom.isEmpty(neighbor))) {
26014
26210
  dom_1.Dom.safeRemove(neighbor);
26211
+ if (dom_1.Dom.isTag(neighbor, 'br') &&
26212
+ !dom_1.Dom.findNotEmptySibling(fakeNode, false)) {
26213
+ dom_1.Dom.after(fakeNode, jodit.createInside.element('br'));
26214
+ }
26015
26215
  jodit.s.setCursorBefore(fakeNode);
26016
26216
  if (dom_1.Dom.isTag(neighbor, 'br')) {
26017
26217
  (0, check_remove_empty_parent_1.checkRemoveEmptyParent)(jodit, fakeNode, backspace);
@@ -26543,7 +26743,8 @@ config_1.Config.prototype.cleanHTML = {
26543
26743
  denyTags: false,
26544
26744
  useIframeSandbox: false,
26545
26745
  removeOnError: true,
26546
- safeJavaScriptLink: true
26746
+ safeJavaScriptLink: true,
26747
+ disableCleanFilter: null
26547
26748
  };
26548
26749
  config_1.Config.prototype.controls.eraser = {
26549
26750
  command: 'removeFormat',
@@ -26650,8 +26851,9 @@ function removeFormatForCollapsedSelection(jodit, fake) {
26650
26851
  var fakeNode = fake;
26651
26852
  if (!fakeNode) {
26652
26853
  fakeNode = jodit.createInside.fake();
26653
- s.range.insertNode(fakeNode);
26654
- s.range.collapse();
26854
+ var range = s.range;
26855
+ dom_1.Dom.safeInsertNode(range, fakeNode);
26856
+ range.collapse();
26655
26857
  }
26656
26858
  var mainInline = dom_1.Dom.furthest(fakeNode, isInlineBlock, jodit.editor);
26657
26859
  if (mainInline) {
@@ -26699,8 +26901,8 @@ function removeFormatForSelection(jodit) {
26699
26901
  var s = jodit.s, editor = jodit.editor, createInside = jodit.createInside, range = s.range, left = range.cloneRange(), right = range.cloneRange(), fakeLeft = createInside.fake(), fakeRight = createInside.fake();
26700
26902
  left.collapse(true);
26701
26903
  right.collapse(false);
26702
- left.insertNode(fakeLeft);
26703
- right.insertNode(fakeRight);
26904
+ dom_1.Dom.safeInsertNode(left, fakeLeft);
26905
+ dom_1.Dom.safeInsertNode(right, fakeRight);
26704
26906
  range.setStartBefore(fakeLeft);
26705
26907
  range.collapse(true);
26706
26908
  s.selectRange(range);
@@ -26824,10 +27026,39 @@ tslib_1.__exportStar(__webpack_require__(20544), exports);
26824
27026
  tslib_1.__exportStar(__webpack_require__(47913), exports);
26825
27027
  tslib_1.__exportStar(__webpack_require__(42954), exports);
26826
27028
  tslib_1.__exportStar(__webpack_require__(19070), exports);
27029
+ tslib_1.__exportStar(__webpack_require__(4609), exports);
26827
27030
  tslib_1.__exportStar(__webpack_require__(58909), exports);
26828
27031
  tslib_1.__exportStar(__webpack_require__(39196), exports);
26829
27032
 
26830
27033
 
27034
+ /***/ }),
27035
+
27036
+ /***/ 4609:
27037
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
27038
+
27039
+ "use strict";
27040
+
27041
+ /*!
27042
+ * Jodit Editor (https://xdsoft.net/jodit/)
27043
+ * Released under MIT see LICENSE.txt in the project root for license information.
27044
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
27045
+ */
27046
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
27047
+ exports.removeEmptyTextNode = void 0;
27048
+ var dom_1 = __webpack_require__(43887);
27049
+ function removeEmptyTextNode(jodit, node, hadEffect, arg, argi, currentNode) {
27050
+ if (dom_1.Dom.isText(node) && !node.nodeValue) {
27051
+ if (node === currentNode && jodit.s.isCollapsed()) {
27052
+ jodit.s.setCursorAfter(node);
27053
+ }
27054
+ dom_1.Dom.safeRemove(node);
27055
+ return true;
27056
+ }
27057
+ return hadEffect;
27058
+ }
27059
+ exports.removeEmptyTextNode = removeEmptyTextNode;
27060
+
27061
+
26831
27062
  /***/ }),
26832
27063
 
26833
27064
  /***/ 58909:
@@ -26845,14 +27076,10 @@ exports.removeInvTextNodes = void 0;
26845
27076
  var constants_1 = __webpack_require__(10063);
26846
27077
  var dom_1 = __webpack_require__(43887);
26847
27078
  function removeInvTextNodes(jodit, node, hadEffect, arg, argi, currentNode) {
26848
- if (!currentNode) {
26849
- return hadEffect;
26850
- }
26851
27079
  if (!dom_1.Dom.isText(node) || node.nodeValue == null) {
26852
27080
  return hadEffect;
26853
27081
  }
26854
- if ((0, constants_1.INVISIBLE_SPACE_REG_EXP)().test(node.nodeValue) &&
26855
- node.nodeValue.replace((0, constants_1.INVISIBLE_SPACE_REG_EXP)(), '').length !== 0) {
27082
+ if ((0, constants_1.INVISIBLE_SPACE_REG_EXP)().test(node.nodeValue)) {
26856
27083
  node.nodeValue = node.nodeValue.replace((0, constants_1.INVISIBLE_SPACE_REG_EXP)(), '');
26857
27084
  if (node === currentNode && jodit.s.isCollapsed()) {
26858
27085
  jodit.s.setCursorAfter(node);
@@ -26991,9 +27218,13 @@ var keys = Object.keys(filters);
26991
27218
  function visitNodeWalker(jodit, nodeElm, allowTags, denyTags, currentSelectionNode) {
26992
27219
  var e_1, _a;
26993
27220
  var hadEffect = false;
27221
+ var dcf = jodit.o.cleanHTML.disableCleanFilter;
26994
27222
  try {
26995
27223
  for (var keys_1 = tslib_1.__values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
26996
27224
  var key = keys_1_1.value;
27225
+ if (dcf && dcf.has(key)) {
27226
+ continue;
27227
+ }
26997
27228
  var filter = filters[key];
26998
27229
  var tmp = hadEffect;
26999
27230
  hadEffect = filter(jodit, nodeElm, hadEffect, allowTags, denyTags, currentSelectionNode);
@@ -27859,6 +28090,207 @@ exports.dragAndDrop = dragAndDrop;
27859
28090
  global_1.pluginSystem.add('dragAndDrop', dragAndDrop);
27860
28091
 
27861
28092
 
28093
+ /***/ }),
28094
+
28095
+ /***/ 6914:
28096
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
28097
+
28098
+ "use strict";
28099
+
28100
+ /*!
28101
+ * Jodit Editor (https://xdsoft.net/jodit/)
28102
+ * Released under MIT see LICENSE.txt in the project root for license information.
28103
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
28104
+ */
28105
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
28106
+ var tslib_1 = __webpack_require__(20255);
28107
+ tslib_1.__exportStar(__webpack_require__(47983), exports);
28108
+
28109
+
28110
+ /***/ }),
28111
+
28112
+ /***/ 47983:
28113
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
28114
+
28115
+ "use strict";
28116
+
28117
+ /*!
28118
+ * Jodit Editor (https://xdsoft.net/jodit/)
28119
+ * Released under MIT see LICENSE.txt in the project root for license information.
28120
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
28121
+ */
28122
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
28123
+ exports.removeExtraBr = void 0;
28124
+ var dom_1 = __webpack_require__(43887);
28125
+ function removeExtraBr(jodit, node) {
28126
+ if (!jodit.o.dtd.removeExtraBr || dom_1.Dom.isTag(node, 'br')) {
28127
+ return;
28128
+ }
28129
+ var parent = dom_1.Dom.furthest(node, dom_1.Dom.isBlock, jodit.editor);
28130
+ if (parent && !dom_1.Dom.isTag(parent, ['table', 'pre', 'blockquote', 'code'])) {
28131
+ var br = dom_1.Dom.isTag(node, 'br')
28132
+ ? node
28133
+ : dom_1.Dom.findNotEmptySibling(node, false);
28134
+ if (!dom_1.Dom.isTag(br, 'br')) {
28135
+ return;
28136
+ }
28137
+ jodit.s.setCursorBefore(br);
28138
+ dom_1.Dom.safeRemove(br);
28139
+ }
28140
+ }
28141
+ exports.removeExtraBr = removeExtraBr;
28142
+
28143
+
28144
+ /***/ }),
28145
+
28146
+ /***/ 71184:
28147
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
28148
+
28149
+ "use strict";
28150
+
28151
+ /*!
28152
+ * Jodit Editor (https://xdsoft.net/jodit/)
28153
+ * Released under MIT see LICENSE.txt in the project root for license information.
28154
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
28155
+ */
28156
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
28157
+ exports.checkBlockNesting = void 0;
28158
+ var dom_1 = __webpack_require__(43887);
28159
+ function checkBlockNesting(jodit, node) {
28160
+ if (dom_1.Dom.isFragment(node)) {
28161
+ node = node.firstChild;
28162
+ }
28163
+ if (jodit.o.dtd.checkBlockNesting && dom_1.Dom.isBlock(node)) {
28164
+ var parent_1 = dom_1.Dom.furthest(jodit.s.current(), dom_1.Dom.isBlock, jodit.editor);
28165
+ if (parent_1 && !jodit.o.dtd.blockLimits[parent_1.tagName.toLowerCase()]) {
28166
+ jodit.s.setCursorAfter(parent_1);
28167
+ if (dom_1.Dom.isEmpty(parent_1)) {
28168
+ dom_1.Dom.safeRemove(parent_1);
28169
+ }
28170
+ }
28171
+ }
28172
+ }
28173
+ exports.checkBlockNesting = checkBlockNesting;
28174
+
28175
+
28176
+ /***/ }),
28177
+
28178
+ /***/ 42187:
28179
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
28180
+
28181
+ "use strict";
28182
+
28183
+ /*!
28184
+ * Jodit Editor (https://xdsoft.net/jodit/)
28185
+ * Released under MIT see LICENSE.txt in the project root for license information.
28186
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
28187
+ */
28188
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
28189
+ var tslib_1 = __webpack_require__(20255);
28190
+ tslib_1.__exportStar(__webpack_require__(71184), exports);
28191
+
28192
+
28193
+ /***/ }),
28194
+
28195
+ /***/ 19305:
28196
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
28197
+
28198
+ "use strict";
28199
+
28200
+ /*!
28201
+ * Jodit Editor (https://xdsoft.net/jodit/)
28202
+ * Released under MIT see LICENSE.txt in the project root for license information.
28203
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
28204
+ */
28205
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
28206
+ var config_1 = __webpack_require__(27537);
28207
+ config_1.Config.prototype.dtd = {
28208
+ removeExtraBr: true,
28209
+ checkBlockNesting: true,
28210
+ blockLimits: {
28211
+ article: 1,
28212
+ aside: 1,
28213
+ audio: 1,
28214
+ body: 1,
28215
+ caption: 1,
28216
+ details: 1,
28217
+ dir: 1,
28218
+ div: 1,
28219
+ dl: 1,
28220
+ fieldset: 1,
28221
+ figcaption: 1,
28222
+ figure: 1,
28223
+ footer: 1,
28224
+ form: 1,
28225
+ header: 1,
28226
+ hgroup: 1,
28227
+ main: 1,
28228
+ menu: 1,
28229
+ nav: 1,
28230
+ ol: 1,
28231
+ section: 1,
28232
+ table: 1,
28233
+ td: 1,
28234
+ th: 1,
28235
+ tr: 1,
28236
+ ul: 1,
28237
+ video: 1
28238
+ }
28239
+ };
28240
+
28241
+
28242
+ /***/ }),
28243
+
28244
+ /***/ 10583:
28245
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
28246
+
28247
+ "use strict";
28248
+
28249
+ /*!
28250
+ * Jodit Editor (https://xdsoft.net/jodit/)
28251
+ * Released under MIT see LICENSE.txt in the project root for license information.
28252
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
28253
+ */
28254
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
28255
+ var tslib_1 = __webpack_require__(20255);
28256
+ var plugin_1 = __webpack_require__(35570);
28257
+ var global_1 = __webpack_require__(58299);
28258
+ var watch_1 = __webpack_require__(44101);
28259
+ __webpack_require__(19305);
28260
+ var beforeInsertCases = __webpack_require__(42187);
28261
+ var afterInsertCases = __webpack_require__(6914);
28262
+ var dtd = (function (_super) {
28263
+ tslib_1.__extends(dtd, _super);
28264
+ function dtd() {
28265
+ return _super !== null && _super.apply(this, arguments) || this;
28266
+ }
28267
+ dtd.prototype.afterInit = function (jodit) { };
28268
+ dtd.prototype.beforeDestruct = function (jodit) { };
28269
+ dtd.prototype.__onBeforeInsertNode = function (node) {
28270
+ var _this = this;
28271
+ var casesKeys = Object.keys(beforeInsertCases);
28272
+ casesKeys.forEach(function (key) {
28273
+ beforeInsertCases[key](_this.j, node);
28274
+ });
28275
+ };
28276
+ dtd.prototype.__onAfterInsertNode = function (node) {
28277
+ var _this = this;
28278
+ var casesKeys = Object.keys(afterInsertCases);
28279
+ casesKeys.forEach(function (key) {
28280
+ afterInsertCases[key](_this.j, node);
28281
+ });
28282
+ };
28283
+ tslib_1.__decorate([
28284
+ (0, watch_1.watch)(':beforeInsertNode')
28285
+ ], dtd.prototype, "__onBeforeInsertNode", null);
28286
+ tslib_1.__decorate([
28287
+ (0, watch_1.watch)(':afterInsertNode')
28288
+ ], dtd.prototype, "__onAfterInsertNode", null);
28289
+ return dtd;
28290
+ }(plugin_1.Plugin));
28291
+ global_1.pluginSystem.add('dtd', dtd);
28292
+
28293
+
27862
28294
  /***/ }),
27863
28295
 
27864
28296
  /***/ 665:
@@ -27916,29 +28348,30 @@ var enter = (function (_super) {
27916
28348
  }
27917
28349
  };
27918
28350
  enter.prototype.onEnter = function (event) {
27919
- var editor = this.j;
27920
- var current = this.getCurrentOrFillEmpty(editor);
27921
- var currentBox = (0, helpers_1.getBlockWrapper)(editor, current);
28351
+ var jodit = this.j;
28352
+ var current = this.getCurrentOrFillEmpty(jodit);
28353
+ (0, helpers_1.moveCursorOutFromSpecialTags)(jodit, current, ['a']);
28354
+ var currentBox = (0, helpers_1.getBlockWrapper)(jodit, current);
27922
28355
  var isLi = dom_1.Dom.isTag(currentBox, 'li');
27923
28356
  if ((!isLi || (event === null || event === void 0 ? void 0 : event.shiftKey)) &&
27924
- !(0, helpers_1.checkBR)(editor, current, event === null || event === void 0 ? void 0 : event.shiftKey)) {
28357
+ !(0, helpers_1.checkBR)(jodit, current, event === null || event === void 0 ? void 0 : event.shiftKey)) {
27925
28358
  return false;
27926
28359
  }
27927
- if (!currentBox && !(0, helpers_1.hasPreviousBlock)(editor, current)) {
27928
- currentBox = (0, helpers_1.wrapText)(editor, current);
28360
+ if (!currentBox && !(0, helpers_1.hasPreviousBlock)(jodit, current)) {
28361
+ currentBox = (0, helpers_1.wrapText)(jodit, current);
27929
28362
  }
27930
28363
  if (!currentBox || currentBox === current) {
27931
- (0, helpers_1.insertParagraph)(editor, null, isLi ? 'li' : editor.o.enter);
28364
+ (0, helpers_1.insertParagraph)(jodit, null, isLi ? 'li' : jodit.o.enter);
27932
28365
  return false;
27933
28366
  }
27934
- if (!(0, helpers_1.checkUnsplittableBox)(editor, currentBox)) {
28367
+ if (!(0, helpers_1.checkUnsplittableBox)(jodit, currentBox)) {
27935
28368
  return false;
27936
28369
  }
27937
28370
  if (isLi && dom_1.Dom.isEmpty(currentBox)) {
27938
- (0, helpers_1.processEmptyLILeaf)(editor, currentBox);
28371
+ (0, helpers_1.processEmptyLILeaf)(jodit, currentBox);
27939
28372
  return false;
27940
28373
  }
27941
- (0, helpers_1.splitFragment)(editor, currentBox);
28374
+ (0, helpers_1.splitFragment)(jodit, currentBox);
27942
28375
  };
27943
28376
  enter.prototype.getCurrentOrFillEmpty = function (editor) {
27944
28377
  var s = editor.s;
@@ -27986,7 +28419,14 @@ function checkBR(jodit, current, shiftKeyPressed) {
27986
28419
  (shiftKeyPressed && !isMultiLineBlock) ||
27987
28420
  (!shiftKeyPressed && isMultiLineBlock)) {
27988
28421
  var br = jodit.createInside.element('br');
27989
- jodit.s.insertNode(br, true, false);
28422
+ jodit.s.insertNode(br, false, false);
28423
+ if (!dom_1.Dom.findNotEmptySibling(br, false)) {
28424
+ dom_1.Dom.after(br, br.cloneNode());
28425
+ }
28426
+ var range = jodit.s.range;
28427
+ range.setStartAfter(br);
28428
+ range.collapse(true);
28429
+ jodit.s.selectRange(range);
27990
28430
  (0, scroll_into_view_1.scrollIntoViewIfNeeded)(br, jodit.editor, jodit.ed);
27991
28431
  return false;
27992
28432
  }
@@ -28104,6 +28544,7 @@ tslib_1.__exportStar(__webpack_require__(95645), exports);
28104
28544
  tslib_1.__exportStar(__webpack_require__(20565), exports);
28105
28545
  tslib_1.__exportStar(__webpack_require__(66000), exports);
28106
28546
  tslib_1.__exportStar(__webpack_require__(20548), exports);
28547
+ tslib_1.__exportStar(__webpack_require__(32448), exports);
28107
28548
 
28108
28549
 
28109
28550
  /***/ }),
@@ -28147,6 +28588,36 @@ function insertParagraph(editor, fake, wrapperTag, style) {
28147
28588
  exports.insertParagraph = insertParagraph;
28148
28589
 
28149
28590
 
28591
+ /***/ }),
28592
+
28593
+ /***/ 32448:
28594
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
28595
+
28596
+ "use strict";
28597
+
28598
+ /*!
28599
+ * Jodit Editor (https://xdsoft.net/jodit/)
28600
+ * Released under MIT see LICENSE.txt in the project root for license information.
28601
+ * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
28602
+ */
28603
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
28604
+ exports.moveCursorOutFromSpecialTags = void 0;
28605
+ var dom_1 = __webpack_require__(43887);
28606
+ function moveCursorOutFromSpecialTags(jodit, current, tags) {
28607
+ var s = jodit.s;
28608
+ var link = dom_1.Dom.closest(current, tags, jodit.editor);
28609
+ if (link) {
28610
+ if (s.cursorOnTheRight(link)) {
28611
+ s.setCursorAfter(link);
28612
+ }
28613
+ else if (s.cursorOnTheLeft(link)) {
28614
+ s.setCursorBefore(link);
28615
+ }
28616
+ }
28617
+ }
28618
+ exports.moveCursorOutFromSpecialTags = moveCursorOutFromSpecialTags;
28619
+
28620
+
28150
28621
  /***/ }),
28151
28622
 
28152
28623
  /***/ 65700:
@@ -28761,7 +29232,7 @@ config_1.Config.prototype.controls.fullsize = {
28761
29232
  button.state.icon.name = mode;
28762
29233
  }
28763
29234
  },
28764
- tooltip: 'Open editor in fullsize',
29235
+ tooltip: 'Open in fullsize',
28765
29236
  mode: consts.MODE_SOURCE + consts.MODE_WYSIWYG
28766
29237
  };
28767
29238
 
@@ -28785,6 +29256,7 @@ var css_1 = __webpack_require__(56672);
28785
29256
  var is_jodit_object_1 = __webpack_require__(47442);
28786
29257
  var global_1 = __webpack_require__(58299);
28787
29258
  __webpack_require__(53022);
29259
+ var fullsizeStack = new Set();
28788
29260
  function fullsize(editor) {
28789
29261
  editor.registerButton({
28790
29262
  name: 'fullsize'
@@ -28826,7 +29298,13 @@ function fullsize(editor) {
28826
29298
  editor.toolbarContainer.appendChild(editor.toolbar.container);
28827
29299
  (0, css_1.css)(editor.toolbar.container, 'width', 'auto');
28828
29300
  }
28829
- if (editor.o.globalFullSize) {
29301
+ enable
29302
+ ? fullsizeStack.add(container)
29303
+ : fullsizeStack.delete(container);
29304
+ var shouldToggleGlobalFullsize = editor.o.globalFullSize &&
29305
+ ((fullsizeStack.size === 1 && enable) ||
29306
+ (fullsizeStack.size === 0 && !enable));
29307
+ if (shouldToggleGlobalFullsize) {
28830
29308
  var node = container.parentNode;
28831
29309
  while (node &&
28832
29310
  node.nodeType !== Node.DOCUMENT_NODE &&
@@ -29459,7 +29937,7 @@ var imageProcessor = (function (_super) {
29459
29937
  }
29460
29938
  };
29461
29939
  imageProcessor.prototype.afterChange = function (data) {
29462
- return tslib_1.__awaiter(this, void 0, Promise, function () {
29940
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
29463
29941
  var editor;
29464
29942
  return tslib_1.__generator(this, function (_a) {
29465
29943
  editor = this.jodit;
@@ -29658,7 +30136,7 @@ var imageProperties = (function (_super) {
29658
30136
  if (this.dialog) {
29659
30137
  return;
29660
30138
  }
29661
- this.dialog = this.j.dialog({
30139
+ this.dialog = this.j.dlg({
29662
30140
  minWidth: Math.min(400, screen.width),
29663
30141
  minHeight: 590,
29664
30142
  buttons: ['fullsize', 'dialog.close']
@@ -30391,9 +30869,9 @@ __webpack_require__(21112);
30391
30869
  __webpack_require__(74212);
30392
30870
  __webpack_require__(67122);
30393
30871
  __webpack_require__(96154);
30394
- __webpack_require__(85098);
30395
30872
  __webpack_require__(82887);
30396
30873
  __webpack_require__(37455);
30874
+ __webpack_require__(10583);
30397
30875
  __webpack_require__(84865);
30398
30876
 
30399
30877
 
@@ -31267,7 +31745,8 @@ var limit = (function (_super) {
31267
31745
  limit.prototype.shouldPreventInsertHTML = function (event, inputText) {
31268
31746
  if (event === void 0) { event = null; }
31269
31747
  if (inputText === void 0) { inputText = ''; }
31270
- if (event && constants_1.COMMAND_KEYS.includes(event.key)) {
31748
+ if (event &&
31749
+ (constants_1.COMMAND_KEYS.includes(event.key) || event.ctrlKey || event.metaKey)) {
31271
31750
  return false;
31272
31751
  }
31273
31752
  var jodit = this.jodit;
@@ -31584,7 +32063,7 @@ var link = (function (_super) {
31584
32063
  jodit.e.on('generateLinkForm.link', this.generateForm);
31585
32064
  jodit.registerCommand('openLinkDialog', {
31586
32065
  exec: function () {
31587
- var dialog = jodit.dialog({
32066
+ var dialog = jodit.dlg({
31588
32067
  resizable: false
31589
32068
  });
31590
32069
  var htmlForm = _this.generateForm(jodit.s.current(), function () {
@@ -32141,7 +32620,7 @@ function mobile(editor) {
32141
32620
  }
32142
32621
  var width = ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
32143
32622
  var newStore = (function () {
32144
- if (width >= editor.o.sizeLG) {
32623
+ if (editor.isFullSize || width >= editor.o.sizeLG) {
32145
32624
  return (0, helpers_1.splitArray)(editor.o.buttons);
32146
32625
  }
32147
32626
  if (width >= editor.o.sizeMD) {
@@ -32503,7 +32982,7 @@ var pasteStorage = (function (_super) {
32503
32982
  }
32504
32983
  pasteStorage.prototype.createDialog = function () {
32505
32984
  var _this = this;
32506
- this.dialog = this.j.dialog();
32985
+ this.dialog = this.j.dlg();
32507
32986
  var pasteButton = (0, button_1.Button)(this.j, 'paste', 'Paste', 'primary');
32508
32987
  pasteButton.onAction(this.paste);
32509
32988
  var cancelButton = (0, button_1.Button)(this.j, '', 'Cancel');
@@ -32592,7 +33071,6 @@ config_1.Config.prototype.pasteHTMLActionList = [
32592
33071
  ];
32593
33072
  config_1.Config.prototype.memorizeChoiceWhenPasteFragment = false;
32594
33073
  config_1.Config.prototype.nl2brInPlainText = true;
32595
- config_1.Config.prototype.draggableTags = ['img', 'jodit-media', 'jodit'];
32596
33074
  var psKey = 'pasteStorage';
32597
33075
  config_1.Config.prototype.controls.paste = {
32598
33076
  tooltip: 'Paste from clipboard',
@@ -33180,7 +33658,7 @@ function preview(editor) {
33180
33658
  name: 'preview'
33181
33659
  });
33182
33660
  editor.registerCommand('preview', function (_, _1, defaultValue) {
33183
- var dialog = editor.dialog();
33661
+ var dialog = editor.dlg();
33184
33662
  dialog
33185
33663
  .setSize(1024, 600)
33186
33664
  .open('', editor.i18n('Preview'))
@@ -34647,7 +35125,7 @@ var search = (function (_super) {
34647
35125
  configurable: true
34648
35126
  });
34649
35127
  search.prototype.updateCounters = function () {
34650
- return tslib_1.__awaiter(this, void 0, Promise, function () {
35128
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
34651
35129
  var _a;
34652
35130
  return tslib_1.__generator(this, function (_b) {
34653
35131
  switch (_b.label) {
@@ -34678,7 +35156,7 @@ var search = (function (_super) {
34678
35156
  (0, helpers_1.scrollIntoViewIfNeeded)(parentBox, this.j.editor, this.j.ed);
34679
35157
  };
34680
35158
  search.prototype.calcCounts = function (query) {
34681
- return tslib_1.__awaiter(this, void 0, Promise, function () {
35159
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
34682
35160
  var result;
34683
35161
  return tslib_1.__generator(this, function (_a) {
34684
35162
  switch (_a.label) {
@@ -34698,7 +35176,7 @@ var search = (function (_super) {
34698
35176
  });
34699
35177
  };
34700
35178
  search.prototype.findAndReplace = function (query) {
34701
- return tslib_1.__awaiter(this, void 0, Promise, function () {
35179
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
34702
35180
  var range, bounds, currentIndex, bound, rng, textNode;
34703
35181
  return tslib_1.__generator(this, function (_a) {
34704
35182
  switch (_a.label) {
@@ -34725,7 +35203,7 @@ var search = (function (_super) {
34725
35203
  rng.setEnd(bound.endContainer, bound.endOffset);
34726
35204
  rng.deleteContents();
34727
35205
  textNode = this.j.createInside.text(this.ui.replace);
34728
- rng.insertNode(textNode);
35206
+ dom_1.Dom.safeInsertNode(rng, textNode);
34729
35207
  this.j.s.select(textNode);
34730
35208
  this.tryScrollToElement(textNode);
34731
35209
  this.cache = {};
@@ -34742,7 +35220,7 @@ var search = (function (_super) {
34742
35220
  };
34743
35221
  search.prototype.findAndSelect = function (query, next) {
34744
35222
  var _a;
34745
- return tslib_1.__awaiter(this, void 0, Promise, function () {
35223
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
34746
35224
  var bounds, currentIndex, bound, rng;
34747
35225
  return tslib_1.__generator(this, function (_b) {
34748
35226
  switch (_b.label) {
@@ -34812,7 +35290,7 @@ var search = (function (_super) {
34812
35290
  });
34813
35291
  };
34814
35292
  search.prototype.isValidCache = function (promise) {
34815
- return tslib_1.__awaiter(this, void 0, Promise, function () {
35293
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
34816
35294
  var res;
34817
35295
  return tslib_1.__generator(this, function (_a) {
34818
35296
  switch (_a.label) {
@@ -34831,7 +35309,7 @@ var search = (function (_super) {
34831
35309
  });
34832
35310
  };
34833
35311
  search.prototype.find = function (walker, query) {
34834
- return tslib_1.__awaiter(this, void 0, Promise, function () {
35312
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
34835
35313
  var cache, _a, sentence;
34836
35314
  var _this = this;
34837
35315
  return tslib_1.__generator(this, function (_b) {
@@ -35555,7 +36033,7 @@ global_1.pluginSystem.add('selectCells', selectCells);
35555
36033
  Object.defineProperty(exports, "__esModule", ({ value: true }));
35556
36034
  var config_1 = __webpack_require__(27537);
35557
36035
  config_1.Config.prototype.select = {
35558
- normalizeSelectionBeforeCutAndCopy: true
36036
+ normalizeSelectionBeforeCutAndCopy: false
35559
36037
  };
35560
36038
 
35561
36039
 
@@ -36570,7 +37048,7 @@ var source = (function (_super) {
36570
37048
  .on('change.source', this.syncValueFromWYSIWYG)
36571
37049
  .on('beautifyHTML', function (html) { return html; });
36572
37050
  if (editor.o.beautifyHTML) {
36573
- var addEventListener = function () {
37051
+ var addEventListener_1 = function () {
36574
37052
  var _a;
36575
37053
  var html_beautify = editor.ow.html_beautify;
36576
37054
  if (html_beautify && !editor.isInDestruct) {
@@ -36579,8 +37057,8 @@ var source = (function (_super) {
36579
37057
  }
36580
37058
  return false;
36581
37059
  };
36582
- if (!addEventListener()) {
36583
- (0, helpers_1.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(addEventListener);
37060
+ if (!addEventListener_1()) {
37061
+ (0, helpers_1.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(addEventListener_1);
36584
37062
  }
36585
37063
  }
36586
37064
  this.syncValueFromWYSIWYG(true);
@@ -37824,15 +38302,6 @@ config_1.Config.prototype.controls.table = {
37824
38302
  tbody.appendChild(crt.text('\n'));
37825
38303
  tbody.appendChild(tr);
37826
38304
  }
37827
- var crnt = editor.s.current();
37828
- if (crnt && editor.s.isCollapsed()) {
37829
- var block = dom_1.Dom.closest(crnt, dom_1.Dom.isBlock, editor.editor);
37830
- if (block &&
37831
- block !== editor.editor &&
37832
- !block.nodeName.match(/^TD|TH|TBODY|TABLE|THEADER|TFOOTER$/)) {
37833
- editor.s.setCursorAfter(block);
37834
- }
37835
- }
37836
38305
  (0, helpers_1.$$)('input[type=checkbox]:checked', options).forEach(function (input) {
37837
38306
  input.value
37838
38307
  .split(/[\s]+/)
@@ -37840,7 +38309,9 @@ config_1.Config.prototype.controls.table = {
37840
38309
  table.classList.add(className);
37841
38310
  });
37842
38311
  });
37843
- editor.s.insertNode(crt.text('\n'));
38312
+ if (editor.editor.firstChild) {
38313
+ editor.s.insertNode(crt.text('\n'), false, false);
38314
+ }
37844
38315
  editor.s.insertNode(table, false);
37845
38316
  if (first_td) {
37846
38317
  editor.s.setCursorIn(first_td);
@@ -37893,100 +38364,6 @@ exports.table = table;
37893
38364
  global_1.pluginSystem.add('table', table);
37894
38365
 
37895
38366
 
37896
- /***/ }),
37897
-
37898
- /***/ 85098:
37899
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
37900
-
37901
- "use strict";
37902
-
37903
- /*!
37904
- * Jodit Editor (https://xdsoft.net/jodit/)
37905
- * Released under MIT see LICENSE.txt in the project root for license information.
37906
- * Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
37907
- */
37908
- Object.defineProperty(exports, "__esModule", ({ value: true }));
37909
- var tslib_1 = __webpack_require__(20255);
37910
- __webpack_require__(14351);
37911
- var helpers_1 = __webpack_require__(92654);
37912
- var plugin_1 = __webpack_require__(35570);
37913
- var dom_1 = __webpack_require__(94522);
37914
- var global_1 = __webpack_require__(58299);
37915
- var decorators_1 = __webpack_require__(9901);
37916
- var tooltip = (function (_super) {
37917
- tslib_1.__extends(tooltip, _super);
37918
- function tooltip() {
37919
- var _this = _super !== null && _super.apply(this, arguments) || this;
37920
- _this.isOpened = false;
37921
- _this.delayShowTimeout = 0;
37922
- return _this;
37923
- }
37924
- tooltip.prototype.afterInit = function (jodit) {
37925
- var _this = this;
37926
- this.container = jodit.c.div('jodit-tooltip');
37927
- (0, global_1.getContainer)(this.j, tooltip).appendChild(this.container);
37928
- var timeout = 0;
37929
- jodit.e
37930
- .off('.tooltip')
37931
- .on('showTooltip.tooltip', function (getPoint, content) {
37932
- jodit.async.clearTimeout(timeout);
37933
- _this.open(getPoint, content);
37934
- })
37935
- .on('delayShowTooltip.tooltip', this.delayOpen)
37936
- .on('escape.tooltip', this.close)
37937
- .on('hideTooltip.tooltip change.tooltip scroll.tooltip changePlace.tooltip hidePopup.tooltip closeAllPopups.tooltip', function () {
37938
- _this.j.async.clearTimeout(_this.delayShowTimeout);
37939
- timeout = jodit.async.setTimeout(_this.close, _this.j.defaultTimeout);
37940
- });
37941
- };
37942
- tooltip.prototype.delayOpen = function (getPoint, content) {
37943
- var _this = this;
37944
- var to = this.j.o.showTooltipDelay || this.j.defaultTimeout;
37945
- this.j.async.clearTimeout(this.delayShowTimeout);
37946
- this.delayShowTimeout = this.j.async.setTimeout(function () { return _this.open(getPoint, content); }, {
37947
- timeout: to,
37948
- label: 'tooltip'
37949
- });
37950
- };
37951
- tooltip.prototype.open = function (getPoint, content) {
37952
- this.container.classList.add('jodit-tooltip_visible');
37953
- this.container.innerHTML = content;
37954
- this.isOpened = true;
37955
- this.setPosition(getPoint);
37956
- };
37957
- tooltip.prototype.setPosition = function (getPoint) {
37958
- var point = getPoint();
37959
- (0, helpers_1.css)(this.container, {
37960
- left: point.x,
37961
- top: point.y
37962
- });
37963
- };
37964
- tooltip.prototype.close = function () {
37965
- this.j.async.clearTimeout(this.delayShowTimeout);
37966
- if (this.isOpened) {
37967
- this.isOpened = false;
37968
- this.container.classList.remove('jodit-tooltip_visible');
37969
- (0, helpers_1.css)(this.container, {
37970
- left: -5000
37971
- });
37972
- }
37973
- };
37974
- tooltip.prototype.beforeDestruct = function (jodit) {
37975
- jodit === null || jodit === void 0 ? void 0 : jodit.e.off('.tooltip');
37976
- this.close();
37977
- dom_1.Dom.safeRemove(this.container);
37978
- };
37979
- tslib_1.__decorate([
37980
- decorators_1.autobind
37981
- ], tooltip.prototype, "delayOpen", null);
37982
- tslib_1.__decorate([
37983
- decorators_1.autobind
37984
- ], tooltip.prototype, "close", null);
37985
- return tooltip;
37986
- }(plugin_1.Plugin));
37987
- global_1.pluginSystem.add('tooltip', tooltip);
37988
-
37989
-
37990
38367
  /***/ }),
37991
38368
 
37992
38369
  /***/ 58991:
@@ -38149,7 +38526,11 @@ var wrapNodes = (function (_super) {
38149
38526
  if (jodit.o.enter.toLowerCase() === 'br') {
38150
38527
  return;
38151
38528
  }
38152
- jodit.e.on('afterInit.wtn postProcessSetEditorValue.wtn', this.postProcessSetEditorValue);
38529
+ jodit.e
38530
+ .on('drop.wtn focus.wtn keydown.wtn mousedown.wtn', this.preprocessInput, {
38531
+ top: true
38532
+ })
38533
+ .on('afterInit.wtn postProcessSetEditorValue.wtn', this.postProcessSetEditorValue);
38153
38534
  };
38154
38535
  wrapNodes.prototype.beforeDestruct = function (jodit) {
38155
38536
  jodit.e.off('.wtn');
@@ -38161,7 +38542,7 @@ var wrapNodes = (function (_super) {
38161
38542
  }
38162
38543
  var child = jodit.editor.firstChild, isChanged = false;
38163
38544
  while (child) {
38164
- this.checkAloneListLeaf(child, jodit);
38545
+ child = this.checkAloneListLeaf(child, jodit);
38165
38546
  if (this.isSuitableStart(child)) {
38166
38547
  if (!isChanged) {
38167
38548
  jodit.s.save();
@@ -38175,6 +38556,7 @@ var wrapNodes = (function (_super) {
38175
38556
  child = next;
38176
38557
  }
38177
38558
  box.normalize();
38559
+ child = box;
38178
38560
  }
38179
38561
  child = child && child.nextSibling;
38180
38562
  }
@@ -38186,15 +38568,44 @@ var wrapNodes = (function (_super) {
38186
38568
  }
38187
38569
  };
38188
38570
  wrapNodes.prototype.checkAloneListLeaf = function (child, jodit) {
38189
- if (dom_1.Dom.isElement(child) &&
38190
- dom_1.Dom.isTag(child, 'li') &&
38191
- !dom_1.Dom.isTag(child.parentElement, ['ul', 'ol'])) {
38192
- dom_1.Dom.wrap(child, 'ul', jodit.createInside);
38571
+ var result = child;
38572
+ var next = child;
38573
+ do {
38574
+ if (dom_1.Dom.isElement(next) &&
38575
+ dom_1.Dom.isTag(next, 'li') &&
38576
+ !dom_1.Dom.isTag(next.parentElement, ['ul', 'ol'])) {
38577
+ var nextChild = dom_1.Dom.findNotEmptySibling(next, false);
38578
+ if (dom_1.Dom.isTag(result, 'ul')) {
38579
+ result.appendChild(next);
38580
+ }
38581
+ else {
38582
+ result = dom_1.Dom.wrap(next, 'ul', jodit.createInside);
38583
+ }
38584
+ next = nextChild;
38585
+ }
38586
+ else {
38587
+ break;
38588
+ }
38589
+ } while (next);
38590
+ return result;
38591
+ };
38592
+ wrapNodes.prototype.preprocessInput = function () {
38593
+ var jodit = this.jodit;
38594
+ if (!jodit.isEditorMode() || jodit.editor.firstChild) {
38595
+ return;
38193
38596
  }
38597
+ var box = jodit.createInside.element(jodit.o.enter);
38598
+ var br = jodit.createInside.element('br');
38599
+ dom_1.Dom.append(box, br);
38600
+ dom_1.Dom.append(jodit.editor, box);
38601
+ jodit.s.setCursorBefore(br);
38194
38602
  };
38195
38603
  tslib_1.__decorate([
38196
38604
  decorators_1.autobind
38197
38605
  ], wrapNodes.prototype, "postProcessSetEditorValue", null);
38606
+ tslib_1.__decorate([
38607
+ decorators_1.autobind
38608
+ ], wrapNodes.prototype, "preprocessInput", null);
38198
38609
  return wrapNodes;
38199
38610
  }(plugin_1.Plugin));
38200
38611
  global_1.pluginSystem.add('wrapNodes', wrapNodes);