jodit 4.18.11 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/es2015/jodit.css +10 -1
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +18 -12
  5. package/es2015/jodit.js +2489 -305
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +18 -12
  8. package/es2015/plugins/debug/debug.css +1 -1
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +18 -12
  16. package/es2018/jodit.min.css +1 -1
  17. package/es2018/jodit.min.js +18 -12
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  20. package/es2021/jodit.css +10 -1
  21. package/es2021/jodit.fat.min.css +1 -1
  22. package/es2021/jodit.fat.min.js +26 -19
  23. package/es2021/jodit.js +2451 -302
  24. package/es2021/jodit.min.css +1 -1
  25. package/es2021/jodit.min.js +26 -19
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  32. package/es2021.en/jodit.css +10 -1
  33. package/es2021.en/jodit.fat.min.css +1 -1
  34. package/es2021.en/jodit.fat.min.js +29 -22
  35. package/es2021.en/jodit.js +2425 -276
  36. package/es2021.en/jodit.min.css +1 -1
  37. package/es2021.en/jodit.min.js +29 -22
  38. package/es2021.en/plugins/debug/debug.css +1 -1
  39. package/es2021.en/plugins/debug/debug.js +1 -1
  40. package/es2021.en/plugins/debug/debug.min.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  44. package/es5/jodit.css +11 -2
  45. package/es5/jodit.fat.min.css +1 -1
  46. package/es5/jodit.fat.min.js +2 -2
  47. package/es5/jodit.js +2873 -365
  48. package/es5/jodit.min.css +3 -3
  49. package/es5/jodit.min.js +2 -2
  50. package/es5/plugins/debug/debug.css +1 -1
  51. package/es5/plugins/debug/debug.js +1 -1
  52. package/es5/plugins/debug/debug.min.js +1 -1
  53. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  56. package/es5/polyfills.fat.min.js +1 -1
  57. package/es5/polyfills.js +1 -1
  58. package/es5/polyfills.min.js +1 -1
  59. package/esm/config.d.ts +44 -1
  60. package/esm/config.js +2 -1
  61. package/esm/core/constants.js +1 -1
  62. package/esm/core/dom/dom.js +4 -2
  63. package/esm/core/event-emitter/event-emitter.js +1 -0
  64. package/esm/core/helpers/utils/align.d.ts +6 -1
  65. package/esm/core/helpers/utils/align.js +22 -12
  66. package/esm/core/helpers/utils/image-caption.d.ts +24 -0
  67. package/esm/core/helpers/utils/image-caption.js +43 -0
  68. package/esm/core/helpers/utils/index.d.ts +1 -0
  69. package/esm/core/helpers/utils/index.js +1 -0
  70. package/esm/core/selection/selection.d.ts +3 -0
  71. package/esm/core/selection/selection.js +20 -5
  72. package/esm/core/selection/style/api/list/toggle-ordered-list.d.ts +1 -1
  73. package/esm/core/selection/style/api/list/toggle-ordered-list.js +30 -4
  74. package/esm/core/selection/style/transactions.js +1 -1
  75. package/esm/core/ui/helpers/focus-form-field.d.ts +12 -0
  76. package/esm/core/ui/helpers/focus-form-field.js +21 -0
  77. package/esm/jodit.js +18 -2
  78. package/esm/langs/ar.d.ts +2 -0
  79. package/esm/langs/ar.js +2 -0
  80. package/esm/langs/az.d.ts +2 -0
  81. package/esm/langs/az.js +2 -0
  82. package/esm/langs/cs_cz.d.ts +2 -0
  83. package/esm/langs/cs_cz.js +2 -0
  84. package/esm/langs/de.d.ts +2 -0
  85. package/esm/langs/de.js +2 -0
  86. package/esm/langs/es.d.ts +2 -0
  87. package/esm/langs/es.js +2 -0
  88. package/esm/langs/fa.d.ts +2 -0
  89. package/esm/langs/fa.js +2 -0
  90. package/esm/langs/fi.d.ts +2 -0
  91. package/esm/langs/fi.js +2 -0
  92. package/esm/langs/fr.d.ts +2 -0
  93. package/esm/langs/fr.js +2 -0
  94. package/esm/langs/he.d.ts +2 -0
  95. package/esm/langs/he.js +2 -0
  96. package/esm/langs/hu.d.ts +2 -0
  97. package/esm/langs/hu.js +2 -0
  98. package/esm/langs/id.d.ts +2 -0
  99. package/esm/langs/id.js +2 -0
  100. package/esm/langs/it.d.ts +2 -0
  101. package/esm/langs/it.js +2 -0
  102. package/esm/langs/ja.d.ts +2 -0
  103. package/esm/langs/ja.js +2 -0
  104. package/esm/langs/ko.d.ts +2 -0
  105. package/esm/langs/ko.js +2 -0
  106. package/esm/langs/mn.d.ts +2 -0
  107. package/esm/langs/mn.js +2 -0
  108. package/esm/langs/nl.d.ts +2 -0
  109. package/esm/langs/nl.js +2 -0
  110. package/esm/langs/no.d.ts +2 -0
  111. package/esm/langs/no.js +2 -0
  112. package/esm/langs/pl.d.ts +2 -0
  113. package/esm/langs/pl.js +2 -0
  114. package/esm/langs/pt_br.d.ts +2 -0
  115. package/esm/langs/pt_br.js +2 -0
  116. package/esm/langs/ru.d.ts +2 -0
  117. package/esm/langs/ru.js +2 -0
  118. package/esm/langs/sk.d.ts +2 -0
  119. package/esm/langs/sk.js +2 -0
  120. package/esm/langs/sv.d.ts +2 -0
  121. package/esm/langs/sv.js +2 -0
  122. package/esm/langs/tr.d.ts +2 -0
  123. package/esm/langs/tr.js +2 -0
  124. package/esm/langs/ua.d.ts +2 -0
  125. package/esm/langs/ua.js +2 -0
  126. package/esm/langs/zh_cn.d.ts +2 -0
  127. package/esm/langs/zh_cn.js +2 -0
  128. package/esm/langs/zh_tw.d.ts +2 -0
  129. package/esm/langs/zh_tw.js +2 -0
  130. package/esm/modules/table/table.d.ts +27 -0
  131. package/esm/modules/table/table.js +110 -2
  132. package/esm/modules/toolbar/button/button.js +11 -3
  133. package/esm/modules/uploader/helpers/send-files.js +3 -1
  134. package/esm/modules/widget/tabs/tabs.js +2 -0
  135. package/esm/plugins/all.d.ts +1 -0
  136. package/esm/plugins/all.js +1 -0
  137. package/esm/plugins/backspace/backspace.js +17 -1
  138. package/esm/plugins/backspace/cases/check-remove-char.js +1 -11
  139. package/esm/plugins/backspace/helpers.d.ts +5 -0
  140. package/esm/plugins/backspace/helpers.js +11 -0
  141. package/esm/plugins/clean-html/clean-html.js +2 -2
  142. package/esm/plugins/clean-html/helpers/index.d.ts +1 -0
  143. package/esm/plugins/clean-html/helpers/index.js +1 -0
  144. package/esm/plugins/clean-html/helpers/remove-format/remove-format-for-word.d.ts +16 -0
  145. package/esm/plugins/clean-html/helpers/remove-format/remove-format-for-word.js +109 -0
  146. package/esm/plugins/drag-and-drop-element/drag-and-drop-element.js +4 -2
  147. package/esm/plugins/format-block/config.d.ts +13 -0
  148. package/esm/plugins/format-block/config.js +38 -1
  149. package/esm/plugins/format-block/content-fonts.d.ts +17 -0
  150. package/esm/plugins/format-block/content-fonts.js +156 -0
  151. package/esm/plugins/image-caption/config.d.ts +31 -0
  152. package/esm/plugins/image-caption/config.js +11 -0
  153. package/esm/plugins/image-caption/image-caption.d.ts +140 -0
  154. package/esm/plugins/image-caption/image-caption.js +799 -0
  155. package/esm/plugins/image-processor/image-processor.d.ts +2 -1
  156. package/esm/plugins/image-processor/image-processor.js +9 -4
  157. package/esm/plugins/image-properties/config.js +1 -0
  158. package/esm/plugins/image-properties/image-properties.js +19 -5
  159. package/esm/plugins/image-properties/interface.d.ts +6 -0
  160. package/esm/plugins/image-properties/readers/align.d.ts +1 -1
  161. package/esm/plugins/image-properties/readers/index.js +9 -3
  162. package/esm/plugins/image-properties/readers/margin.d.ts +1 -1
  163. package/esm/plugins/image-properties/readers/size.d.ts +5 -1
  164. package/esm/plugins/image-properties/readers/size.js +4 -5
  165. package/esm/plugins/image-properties/ui/ui-image-main-tab.d.ts +2 -0
  166. package/esm/plugins/image-properties/ui/ui-image-main-tab.js +20 -0
  167. package/esm/plugins/image-properties/writers/caption.d.ts +15 -0
  168. package/esm/plugins/image-properties/writers/caption.js +18 -0
  169. package/esm/plugins/image-properties/writers/index.js +15 -10
  170. package/esm/plugins/image-properties/writers/link.js +7 -2
  171. package/esm/plugins/image-properties/writers/margin.d.ts +1 -1
  172. package/esm/plugins/image-properties/writers/size.d.ts +5 -2
  173. package/esm/plugins/image-properties/writers/size.js +16 -2
  174. package/esm/plugins/indent/helpers.d.ts +9 -0
  175. package/esm/plugins/indent/helpers.js +23 -3
  176. package/esm/plugins/indent/indent.js +2 -20
  177. package/esm/plugins/index.d.ts +1 -0
  178. package/esm/plugins/inline-popup/config/config.js +4 -0
  179. package/esm/plugins/inline-popup/config/items/cells.js +29 -0
  180. package/esm/plugins/inline-popup/config/items/img.js +35 -5
  181. package/esm/plugins/inline-popup/icons/caption.svg.js +1 -0
  182. package/esm/plugins/inline-popup/icons/headerrow.svg.js +1 -0
  183. package/esm/plugins/inline-popup/inline-popup.js +3 -2
  184. package/esm/plugins/placeholder/placeholder.js +7 -1
  185. package/esm/plugins/resize-cells/resize-cells.d.ts +49 -0
  186. package/esm/plugins/resize-cells/resize-cells.js +247 -13
  187. package/esm/plugins/resizer/resizer.js +13 -2
  188. package/esm/plugins/select-cells/select-cells.d.ts +5 -0
  189. package/esm/plugins/select-cells/select-cells.js +29 -11
  190. package/esm/plugins/tab/cases/index.d.ts +1 -0
  191. package/esm/plugins/tab/cases/index.js +1 -0
  192. package/esm/plugins/tab/cases/on-tab-inside-li.js +3 -1
  193. package/esm/plugins/tab/cases/tab-spaces.d.ts +32 -0
  194. package/esm/plugins/tab/cases/tab-spaces.js +263 -0
  195. package/esm/plugins/tab/config.d.ts +10 -0
  196. package/esm/plugins/tab/config.js +2 -1
  197. package/esm/plugins/tab/tab.js +61 -6
  198. package/esm/types/types.d.ts +16 -0
  199. package/esm/types/uploader.d.ts +6 -0
  200. package/package.json +1 -1
  201. package/types/config.d.ts +44 -1
  202. package/types/core/helpers/utils/align.d.ts +6 -1
  203. package/types/core/helpers/utils/image-caption.d.ts +24 -0
  204. package/types/core/helpers/utils/index.d.ts +1 -0
  205. package/types/core/selection/selection.d.ts +3 -0
  206. package/types/core/selection/style/api/list/toggle-ordered-list.d.ts +1 -1
  207. package/types/core/ui/helpers/focus-form-field.d.ts +12 -0
  208. package/types/langs/ar.d.ts +2 -0
  209. package/types/langs/az.d.ts +2 -0
  210. package/types/langs/cs_cz.d.ts +2 -0
  211. package/types/langs/de.d.ts +2 -0
  212. package/types/langs/es.d.ts +2 -0
  213. package/types/langs/fa.d.ts +2 -0
  214. package/types/langs/fi.d.ts +2 -0
  215. package/types/langs/fr.d.ts +2 -0
  216. package/types/langs/he.d.ts +2 -0
  217. package/types/langs/hu.d.ts +2 -0
  218. package/types/langs/id.d.ts +2 -0
  219. package/types/langs/it.d.ts +2 -0
  220. package/types/langs/ja.d.ts +2 -0
  221. package/types/langs/ko.d.ts +2 -0
  222. package/types/langs/mn.d.ts +2 -0
  223. package/types/langs/nl.d.ts +2 -0
  224. package/types/langs/no.d.ts +2 -0
  225. package/types/langs/pl.d.ts +2 -0
  226. package/types/langs/pt_br.d.ts +2 -0
  227. package/types/langs/ru.d.ts +2 -0
  228. package/types/langs/sk.d.ts +2 -0
  229. package/types/langs/sv.d.ts +2 -0
  230. package/types/langs/tr.d.ts +2 -0
  231. package/types/langs/ua.d.ts +2 -0
  232. package/types/langs/zh_cn.d.ts +2 -0
  233. package/types/langs/zh_tw.d.ts +2 -0
  234. package/types/modules/table/table.d.ts +27 -0
  235. package/types/plugins/backspace/helpers.d.ts +5 -0
  236. package/types/plugins/clean-html/helpers/index.d.ts +1 -0
  237. package/types/plugins/clean-html/helpers/remove-format/remove-format-for-word.d.ts +16 -0
  238. package/types/plugins/format-block/config.d.ts +13 -0
  239. package/types/plugins/format-block/content-fonts.d.ts +17 -0
  240. package/types/plugins/image-caption/config.d.ts +31 -0
  241. package/types/plugins/image-caption/image-caption.d.ts +140 -0
  242. package/types/plugins/image-processor/image-processor.d.ts +2 -1
  243. package/types/plugins/image-properties/interface.d.ts +6 -0
  244. package/types/plugins/image-properties/readers/align.d.ts +1 -1
  245. package/types/plugins/image-properties/readers/margin.d.ts +1 -1
  246. package/types/plugins/image-properties/readers/size.d.ts +5 -1
  247. package/types/plugins/image-properties/ui/ui-image-main-tab.d.ts +2 -0
  248. package/types/plugins/image-properties/writers/caption.d.ts +15 -0
  249. package/types/plugins/image-properties/writers/margin.d.ts +1 -1
  250. package/types/plugins/image-properties/writers/size.d.ts +5 -2
  251. package/types/plugins/indent/helpers.d.ts +9 -0
  252. package/types/plugins/index.d.ts +1 -0
  253. package/types/plugins/resize-cells/resize-cells.d.ts +49 -0
  254. package/types/plugins/select-cells/select-cells.d.ts +5 -0
  255. package/types/plugins/tab/cases/index.d.ts +1 -0
  256. package/types/plugins/tab/cases/tab-spaces.d.ts +32 -0
  257. package/types/plugins/tab/config.d.ts +10 -0
  258. package/types/types/types.d.ts +16 -0
  259. package/types/types/uploader.d.ts +6 -0
@@ -0,0 +1,140 @@
1
+ /*!
2
+ * Jodit Editor (https://xdsoft.net/jodit/)
3
+ * Released under MIT see LICENSE.txt in the project root for license information.
4
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ /**
7
+ * [[include:plugins/image-caption/README.md]]
8
+ * @packageDocumentation
9
+ * @module plugins/image-caption
10
+ */
11
+ import type { IJodit, Nullable } from "../../types/index";
12
+ import { Plugin } from "../../core/plugin/plugin";
13
+ import "./config";
14
+ /**
15
+ * Captions images: wraps an image in `imageCaption`'s elements and back, and
16
+ * keeps the caret in the caption
17
+ */
18
+ export declare class imageCaption extends Plugin {
19
+ /** @override */
20
+ protected afterInit(jodit: IJodit): void;
21
+ /**
22
+ * Gives `image` a caption, or takes it away, as `on` says, or else the
23
+ * other way round from how it is. Returns the caption it gave, or null
24
+ * when it took one away
25
+ */
26
+ protected onToggleImageCaption(image: HTMLImageElement, on?: boolean): Nullable<HTMLElement> | void;
27
+ /**
28
+ * The caption given last, while nothing has changed round it and it's
29
+ * still blank, so taking it off can put everything back as it was
30
+ */
31
+ private __fresh;
32
+ private __freshCaption;
33
+ /**
34
+ * Giving a caption isn't a step in the history of its own, as the first
35
+ * thing typed in it is, so Undo never brings back a blank caption
36
+ */
37
+ private __caption;
38
+ /**
39
+ * Changes the content with no step in the history of its own, so Undo
40
+ * never brings back a blank caption. A step still open takes it in
41
+ */
42
+ private __unrecorded;
43
+ private __wrap;
44
+ /**
45
+ * Puts the image back as it was before its caption: in the line the
46
+ * caption split, and with its own alignment, margins and width. The image
47
+ * goes into the part of the line holding the caret, so the caret stays
48
+ */
49
+ private __restore;
50
+ private __uncaption;
51
+ private __create;
52
+ /**
53
+ * Puts `wrapper` where `target` is. A block can't go in a paragraph, so the
54
+ * paragraph is split round it, and a part left empty goes
55
+ */
56
+ private __insert;
57
+ /**
58
+ * The wrapper can't be edited, apart from its caption, so typing can't
59
+ * land between the image and the caption
60
+ */
61
+ private __mark;
62
+ private __placeholder;
63
+ protected onChange(): void;
64
+ /**
65
+ * The placeholder goes with the first letter typed or pasted, and comes
66
+ * back when the last is deleted
67
+ */
68
+ protected onInput(): void;
69
+ /**
70
+ * The editor's own attributes stay out of the value, as the caption would
71
+ * be editable on the page. So does a caption given and left blank, as
72
+ * leaving it takes it off, so saving at once keeps the image as it was
73
+ */
74
+ protected onAfterGetValueFromEditor(data: {
75
+ value: string;
76
+ }): void;
77
+ protected onChangePlace(): void;
78
+ private __press;
79
+ private __afterPress;
80
+ private __onMouseDown;
81
+ /**
82
+ * A caption left blank goes when the focus leaves it. That's checked once
83
+ * the focus has landed, as switching windows or opening the editor's own
84
+ * popups keeps it, and once a press that took the focus is over, as the
85
+ * browsers fire no click when its target moves
86
+ */
87
+ private __onFocusOut;
88
+ private __onMouseUp;
89
+ private __dropBlank;
90
+ /**
91
+ * The caption has the focus, or had it when another window took it, or
92
+ * the editor's own popups and dialogs have it, as the link form
93
+ */
94
+ private __keepsFocus;
95
+ /**
96
+ * The caption the caret is in
97
+ */
98
+ private __caretCaption;
99
+ /**
100
+ * Enter in a caption starts a line after the image, and Shift+Enter
101
+ * breaks the caption's line, as everywhere
102
+ */
103
+ protected onBeforeEnter(event?: KeyboardEvent): false | void;
104
+ /**
105
+ * The caption keeps the focus, as an editable element of its own, and
106
+ * would take the caret back, so the editor takes it before the caret
107
+ * leaves the caption
108
+ */
109
+ private __focusEditor;
110
+ private __line;
111
+ /**
112
+ * A caption holds text. An image, a table or a block put in it would end
113
+ * the captioned image, so it goes after the image, as Enter would
114
+ */
115
+ protected onBeforeInsertNode(node: Node): void;
116
+ private __arrow;
117
+ /**
118
+ * A selected captioned image goes as an image on a line of its own does,
119
+ * leaving the line empty, rather than joining the lines either side
120
+ */
121
+ protected onBeforeCommandDelete(): false | void;
122
+ /**
123
+ * The captioned image the selection holds, as a click on the image selects
124
+ */
125
+ private __selectedWrapper;
126
+ protected onKeyDown(event: KeyboardEvent): void;
127
+ /**
128
+ * An arrow key that couldn't move the caret in the caption takes it out,
129
+ * past the image, as the caption is an editable element of its own
130
+ */
131
+ protected onKeyUp(event: KeyboardEvent): void;
132
+ protected onBeforeCommand(command: string): false | void;
133
+ /**
134
+ * Select all in a caption selects the caption, as the caption is an
135
+ * editable element of its own
136
+ */
137
+ private __onSelectAll;
138
+ /** @override */
139
+ protected beforeDestruct(jodit: IJodit): void;
140
+ }
@@ -28,7 +28,8 @@ export declare class imageProcessor extends Plugin {
28
28
  * paints the rest of a block image's line with its parent's highlight. See #1528.
29
29
  * Media in a wrapper (`jodit-media`, the resizer's `jodit` for an embed, or
30
30
  * one from `mediaWrappers`) isn't highlighted either, as Safari paints its
31
- * wrapper's whole line, and its resize frame shows it's selected
31
+ * wrapper's whole line, and its resize frame shows it's selected. Nor is
32
+ * a captioned image's caption
32
33
  */
33
34
  private onSelectionChange;
34
35
  protected afterChange(data: {
@@ -13,6 +13,7 @@ export type EditValues = {
13
13
  borderRadius: number;
14
14
  imageTitle: string;
15
15
  imageAlt: string;
16
+ imageCaption: boolean;
16
17
  imageLink: string;
17
18
  imageLinkOpenInNewTab: boolean;
18
19
  imageWidth: number | string;
@@ -59,6 +60,11 @@ export interface ImagePropertiesOptions {
59
60
  * Show edit 'alt' input
60
61
  */
61
62
  editAlt: boolean;
63
+ /**
64
+ * Show the Caption checkbox, which gives the image a caption or takes it
65
+ * away (see `imageCaption`). The caption itself is typed under the image
66
+ */
67
+ showCaptionCheckbox: boolean;
62
68
  /**
63
69
  * Show edit image link's options
64
70
  */
@@ -11,4 +11,4 @@ import type { EditValues } from "../interface";
11
11
  /**
12
12
  * @private
13
13
  */
14
- export declare function readAlign(image: HTMLImageElement, values: EditValues, classes?: Nullable<HAlignClasses>): void;
14
+ export declare function readAlign(image: HTMLElement, values: EditValues, classes?: Nullable<HAlignClasses>): void;
@@ -5,4 +5,4 @@
5
5
  */
6
6
  import type { EditValues, ImagePropertiesState } from "../interface";
7
7
  /** @private */
8
- export declare function readMargins(image: HTMLImageElement, values: EditValues, state: ImagePropertiesState): void;
8
+ export declare function readMargins(image: HTMLElement, values: EditValues, state: ImagePropertiesState): void;
@@ -3,6 +3,10 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
9
+ import type { Nullable } from "../../../types/index";
6
10
  import type { EditValues, ImagePropertiesState } from "../interface";
7
11
  /** @private */
8
- export declare function readSizes(image: HTMLImageElement, values: EditValues, state: ImagePropertiesState): Promise<void>;
12
+ export declare function readSizes(image: HTMLImageElement, values: EditValues, state: ImagePropertiesState, captionWrapper?: Nullable<HTMLElement>): Promise<void>;
@@ -31,6 +31,8 @@ export declare class UIImageMainTab extends UIGroup<IJodit> {
31
31
  protected onTitleChange(): void;
32
32
  protected onStateAltChange(): void;
33
33
  protected onAltChange(): void;
34
+ protected onStateCaptionChange(): void;
35
+ protected onCaptionChange(): void;
34
36
  protected onStateImageLinkChange(): void;
35
37
  protected onImageLinkChange(): void;
36
38
  protected onStateImageLinkOpenInNewTabChange(): void;
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * Jodit Editor (https://xdsoft.net/jodit/)
3
+ * Released under MIT see LICENSE.txt in the project root for license information.
4
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ /**
7
+ * @module plugins/image-properties
8
+ */
9
+ import type { IJodit } from "../../../types/index";
10
+ /**
11
+ * Gives the image a caption or takes it away, and returns the element that
12
+ * holds the image's place on the page: the caption's, or the image
13
+ * @private
14
+ */
15
+ export declare function applyCaption(j: IJodit, image: HTMLImageElement, imageCaption: boolean): HTMLElement;
@@ -8,4 +8,4 @@
8
8
  */
9
9
  import type { IJodit } from "../../../types/index";
10
10
  /** @private */
11
- export declare function applyMargin(j: IJodit, marginTop: number | string, marginRight: number | string, marginBottom: number | string, marginLeft: number | string, image: HTMLImageElement, marginIsLocked: boolean): void;
11
+ export declare function applyMargin(j: IJodit, marginTop: number | string, marginRight: number | string, marginBottom: number | string, marginLeft: number | string, image: HTMLElement, marginIsLocked: boolean): void;
@@ -3,5 +3,8 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- /** @private */
7
- export declare function applySize(image: HTMLImageElement, imageWidth: number | string, imageHeight: number | string, sizeIsLocked: boolean): void;
6
+ /**
7
+ * A captioned image fills its caption's element, `box`, which takes the width
8
+ * @private
9
+ */
10
+ export declare function applySize(image: HTMLImageElement, imageWidth: number | string, imageHeight: number | string, sizeIsLocked: boolean, box?: HTMLElement): void;
@@ -3,8 +3,17 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ /**
7
+ * @module plugins/indent
8
+ */
9
+ import type { IJodit } from "../../types/index";
6
10
  /**
7
11
  * Get style rule key for current direction
8
12
  * @internal
9
13
  */
10
14
  export declare const getKey: (direction: string, box: HTMLElement) => "marginLeft" | "marginRight" | "paddingLeft" | "paddingRight";
15
+ /**
16
+ * Indents or outdents a box by `indentMargin`
17
+ * @internal
18
+ */
19
+ export declare const applyIndentToBox: (processedElements: Set<HTMLElement>, currentBox: HTMLElement, editor: IJodit, command: string) => void;
@@ -30,6 +30,7 @@ import "./hotkeys/hotkeys";
30
30
  import "./hr/hr";
31
31
  import "./iframe/iframe";
32
32
  import "./image/image";
33
+ import "./image-caption/image-caption";
33
34
  import "./image-processor/image-processor";
34
35
  import "./image-properties/image-properties";
35
36
  import "./indent/indent";
@@ -37,6 +37,28 @@ export declare class resizeCells extends Plugin {
37
37
  private minX;
38
38
  private maxX;
39
39
  private startX;
40
+ /**
41
+ * The table's and its cells' styles as a column drag started, put back
42
+ * before each new width
43
+ */
44
+ private startStyles;
45
+ private startLeft;
46
+ private startEdge;
47
+ /**
48
+ * The row whose height the handle sets, or null while it sets a width
49
+ */
50
+ private workRow;
51
+ private startY;
52
+ private startHeight;
53
+ private rowStyle;
54
+ /**
55
+ * The boxes that scroll the row, with their styles, as a row drag turns
56
+ * off their scroll anchoring, which would move the border off the pointer
57
+ */
58
+ private anchored;
59
+ private scrolled;
60
+ private scrollFrame;
61
+ private pointerY;
40
62
  /**
41
63
  * Click on resize handle
42
64
  */
@@ -49,6 +71,23 @@ export declare class resizeCells extends Plugin {
49
71
  * Mouse up every where after move and click
50
72
  */
51
73
  private onMouseUp;
74
+ private resizeColumnsOrTable;
75
+ private restoreStyles;
76
+ /**
77
+ * Where the border the handle is on lies: the work cell's left side
78
+ * for the table's left edge, otherwise its right side
79
+ */
80
+ private columnEdge;
81
+ /**
82
+ * Sets the row's height from where the pointer is, and how far the drag
83
+ * has scrolled. The browser keeps the row as tall as its content
84
+ */
85
+ private resizeRow;
86
+ /**
87
+ * While the pointer is near or past the top or bottom of the part of the
88
+ * row's scroller in view, scrolls it on, and the row's border with it
89
+ */
90
+ private scrollAlong;
52
91
  /**
53
92
  * Resize only one column
54
93
  */
@@ -68,6 +107,16 @@ export declare class resizeCells extends Plugin {
68
107
  * Calc helper resize handle position
69
108
  */
70
109
  private calcHandlePosition;
110
+ /**
111
+ * Shows the handle across the table on the border below a row, near the
112
+ * cell's bottom or near its top, which is the bottom of the row above.
113
+ * The table's top edge has no row above it
114
+ */
115
+ private calcRowHandlePosition;
116
+ /**
117
+ * Lays the handle across the table on the border below the row
118
+ */
119
+ private placeRowHandle;
71
120
  /** @override */
72
121
  afterInit(editor: IJodit): void;
73
122
  /**
@@ -75,6 +75,11 @@ export declare class selectCells extends Plugin {
75
75
  * Execute custom commands for table
76
76
  */
77
77
  private onExecCommand;
78
+ /**
79
+ * Turns the table's header row on or off. The caret and the marked cells
80
+ * move to the cells that replace them
81
+ */
82
+ private __toggleHeaderRow;
78
83
  /**
79
84
  * The cell that takes the caret when rows or columns are deleted: the next
80
85
  * one in the same column (or row) that is not deleted, else the previous one
@@ -7,3 +7,4 @@
7
7
  * @module plugins/tab
8
8
  */
9
9
  export * from "./on-tab-inside-li";
10
+ export * from "./tab-spaces";
@@ -0,0 +1,32 @@
1
+ /*!
2
+ * Jodit Editor (https://xdsoft.net/jodit/)
3
+ * Released under MIT see LICENSE.txt in the project root for license information.
4
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ /**
7
+ * @module plugins/tab
8
+ */
9
+ import type { IJodit } from "../../../types/index";
10
+ /**
11
+ * With `tab.spaces`, outside table cells: Tab at a caret inserts the spaces,
12
+ * or a tab where white space is kept, as in `pre`, and in a list's first item
13
+ * it indents the list, as Word does. Shift+Tab takes them out again. Tab or
14
+ * Shift+Tab with a selection indents or outdents it. Neither moves the focus
15
+ * on: Escape and then Tab does that
16
+ * @private
17
+ */
18
+ export declare function onTabSpaces(jodit: IJodit, shift: boolean): boolean;
19
+ /**
20
+ * With `tab.spaces`, Backspace just after that many spaces removes them
21
+ * together, as it would a tab. With `upTo`, as for Shift+Tab, fewer will do,
22
+ * if one of them is non-breaking, so a space between words stays
23
+ * @private
24
+ */
25
+ export declare function removeTabSpaces(jodit: IJodit, caret: Node, upTo?: boolean): boolean;
26
+ /**
27
+ * With `tab.spaces`, a tab in pasted text becomes the spaces, as HTML would
28
+ * show it as one space. Tabs in white space that's kept, and those that only
29
+ * lay out the HTML, stay as they are
30
+ * @private
31
+ */
32
+ export declare function tabsToSpaces(jodit: IJodit, html: string): string | void;
@@ -10,6 +10,16 @@ declare module 'jodit/config' {
10
10
  * Pressing Tab inside LI will add an internal list
11
11
  */
12
12
  tabInsideLiInsertNewList: boolean;
13
+ /**
14
+ * Outside table cells and the list items Tab already nests, Tab at a
15
+ * caret inserts this many non-breaking spaces, and Shift+Tab or
16
+ * Backspace takes them out again. In a list's first item Tab
17
+ * indents the list. Tab and Shift+Tab with a selection indent and
18
+ * outdent it, and a tab in pasted text becomes the same spaces.
19
+ * Neither key moves the focus on: Escape and then Tab does. 0
20
+ * leaves Tab to the browser, which moves the focus on
21
+ */
22
+ spaces: number;
13
23
  };
14
24
  }
15
25
  }
@@ -203,6 +203,22 @@ export interface MediaWrapper {
203
203
  tag: string;
204
204
  className: string;
205
205
  }
206
+ /**
207
+ * The elements a captioned image is kept in, see `imageCaption`. An empty
208
+ * `className` matches the tag alone
209
+ */
210
+ export interface ImageCaptionMarkup {
211
+ /**
212
+ * Holds the image, or its link, and the caption
213
+ */
214
+ wrapper: MediaWrapper;
215
+ /**
216
+ * Inside the wrapper, round the image and the caption, as Froala's
217
+ * `span.fr-img-wrap`
218
+ */
219
+ inner: Nullable<MediaWrapper>;
220
+ caption: MediaWrapper;
221
+ }
206
222
  export interface ImageBox {
207
223
  w: number;
208
224
  h: number;
@@ -16,6 +16,12 @@ interface IUploaderData {
16
16
  path?: string;
17
17
  baseurl: string;
18
18
  newfilename?: string;
19
+ /**
20
+ * The names the files had on the user's device. Only set when the
21
+ * images were read as base64 (`insertImageAsBase64URI`), where `files`
22
+ * holds data URIs.
23
+ */
24
+ fileNames?: string[];
19
25
  }
20
26
  interface IUploaderAnswer {
21
27
  success: boolean;