reactjs-tiptap-editor-pro 0.2.30 → 0.2.32

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 (333) hide show
  1. package/lib/RichTextEditor-BwbqJLnA.cjs +141 -0
  2. package/lib/RichTextEditor-iGJ6-rbq.js +8833 -0
  3. package/lib/extension-bundle.cjs +33 -0
  4. package/lib/extension-bundle.d.cts +947 -0
  5. package/lib/extension-bundle.d.ts +947 -0
  6. package/lib/extension-bundle.js +5755 -0
  7. package/lib/index-DV-nXpU1.cjs +1 -0
  8. package/lib/index-M6H3FoBi.js +1147 -0
  9. package/lib/index.cjs +1 -0
  10. package/lib/index.d.cts +513 -0
  11. package/lib/index.d.ts +513 -0
  12. package/lib/index.js +16 -0
  13. package/lib/locale-bundle.cjs +1 -0
  14. package/lib/locale-bundle.d.cts +1140 -0
  15. package/lib/locale-bundle.d.ts +1140 -0
  16. package/lib/locale-bundle.js +9 -0
  17. package/lib/style.css +1 -0
  18. package/lib/tiptap-DkWHMWDt.js +6061 -0
  19. package/lib/tiptap-gBG-1T-V.cjs +116 -0
  20. package/lib/vendor-BJ0Yf78E.cjs +8114 -0
  21. package/lib/vendor-Cpa6z-M0.js +67575 -0
  22. package/package.json +60 -4
  23. package/src/components/ActionButton.tsx +0 -103
  24. package/src/components/ActionMenuButton.tsx +0 -76
  25. package/src/components/BubbleMenu.tsx +0 -93
  26. package/src/components/CharactorCount.tsx +0 -50
  27. package/src/components/ColorPicker.tsx +0 -272
  28. package/src/components/RichTextEditor.tsx +0 -212
  29. package/src/components/SizeSetter/SizeSetter.tsx +0 -102
  30. package/src/components/Toolbar.tsx +0 -108
  31. package/src/components/icons/Activity.tsx +0 -19
  32. package/src/components/icons/Animas.tsx +0 -24
  33. package/src/components/icons/AspectRatio.tsx +0 -13
  34. package/src/components/icons/Blockquote.tsx +0 -17
  35. package/src/components/icons/ColumnAddLeft.tsx +0 -7
  36. package/src/components/icons/ColumnAddRight.tsx +0 -7
  37. package/src/components/icons/DeleteColumn.tsx +0 -26
  38. package/src/components/icons/DeleteRow.tsx +0 -26
  39. package/src/components/icons/Direction.tsx +0 -7
  40. package/src/components/icons/Excalidraw.tsx +0 -7
  41. package/src/components/icons/ExportPdf.tsx +0 -8
  42. package/src/components/icons/ExportWord.tsx +0 -24
  43. package/src/components/icons/FileWordOutline.tsx +0 -13
  44. package/src/components/icons/Flag.tsx +0 -19
  45. package/src/components/icons/Food.tsx +0 -20
  46. package/src/components/icons/GIfIcon.tsx +0 -10
  47. package/src/components/icons/Icon.tsx +0 -30
  48. package/src/components/icons/ImportWord.tsx +0 -23
  49. package/src/components/icons/LeftToRight.tsx +0 -7
  50. package/src/components/icons/LineHeight.tsx +0 -13
  51. package/src/components/icons/MenuDown.tsx +0 -24
  52. package/src/components/icons/Mermaid.tsx +0 -13
  53. package/src/components/icons/NoFill.tsx +0 -7
  54. package/src/components/icons/Object.tsx +0 -24
  55. package/src/components/icons/RightToLeft.tsx +0 -7
  56. package/src/components/icons/SizeL.tsx +0 -9
  57. package/src/components/icons/SizeM.tsx +0 -13
  58. package/src/components/icons/SizeS.tsx +0 -13
  59. package/src/components/icons/Symbol.tsx +0 -19
  60. package/src/components/icons/Travel.tsx +0 -24
  61. package/src/components/icons/Twitter.tsx +0 -7
  62. package/src/components/icons/icons.ts +0 -212
  63. package/src/components/icons/index.ts +0 -12
  64. package/src/components/index.ts +0 -9
  65. package/src/components/menus/bubble.ts +0 -395
  66. package/src/components/menus/components/BubbleMenuContent.tsx +0 -15
  67. package/src/components/menus/components/BubbleMenuDrawer.tsx +0 -128
  68. package/src/components/menus/components/BubbleMenuExcalidraw.tsx +0 -91
  69. package/src/components/menus/components/BubbleMenuIframe.tsx +0 -143
  70. package/src/components/menus/components/BubbleMenuKatex.tsx +0 -136
  71. package/src/components/menus/components/BubbleMenuLink.tsx +0 -99
  72. package/src/components/menus/components/BubbleMenuMedia.tsx +0 -235
  73. package/src/components/menus/components/BubbleMenuMermaid.tsx +0 -128
  74. package/src/components/menus/components/BubbleMenuText.tsx +0 -102
  75. package/src/components/menus/components/BubbleMenuTwitter.tsx +0 -91
  76. package/src/components/menus/components/ColumnsBubbleMenu.tsx +0 -59
  77. package/src/components/menus/components/ContentMenu.tsx +0 -396
  78. package/src/components/menus/components/TableBubbleMenu.tsx +0 -362
  79. package/src/components/menus/index.ts +0 -7
  80. package/src/components/ui/button.tsx +0 -56
  81. package/src/components/ui/checkbox.tsx +0 -30
  82. package/src/components/ui/dialog.tsx +0 -128
  83. package/src/components/ui/dropdown-menu.tsx +0 -203
  84. package/src/components/ui/emoji-picker.tsx +0 -166
  85. package/src/components/ui/index.ts +0 -14
  86. package/src/components/ui/input.tsx +0 -25
  87. package/src/components/ui/label.tsx +0 -26
  88. package/src/components/ui/popover.tsx +0 -31
  89. package/src/components/ui/select.tsx +0 -162
  90. package/src/components/ui/separator.tsx +0 -31
  91. package/src/components/ui/switch.tsx +0 -29
  92. package/src/components/ui/tabs.tsx +0 -55
  93. package/src/components/ui/textarea.tsx +0 -24
  94. package/src/components/ui/toast.tsx +0 -129
  95. package/src/components/ui/toaster.tsx +0 -44
  96. package/src/components/ui/toggle.tsx +0 -45
  97. package/src/components/ui/tooltip.tsx +0 -30
  98. package/src/components/ui/use-toast.ts +0 -197
  99. package/src/constants/index.ts +0 -223
  100. package/src/constants/resetCSS.ts +0 -139
  101. package/src/extension-bundle.ts +0 -2
  102. package/src/extensions/Attachment/Attachment.ts +0 -144
  103. package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +0 -69
  104. package/src/extensions/Attachment/components/NodeViewAttachment/FileIconString.ts +0 -28
  105. package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +0 -155
  106. package/src/extensions/Attachment/components/NodeViewAttachment/index.module.scss +0 -23
  107. package/src/extensions/Attachment/index.ts +0 -1
  108. package/src/extensions/BaseKit.ts +0 -253
  109. package/src/extensions/Blockquote/Blockquote.ts +0 -31
  110. package/src/extensions/Blockquote/index.ts +0 -1
  111. package/src/extensions/Bold/Bold.ts +0 -26
  112. package/src/extensions/Bold/index.ts +0 -1
  113. package/src/extensions/BulletList/BulletList.ts +0 -28
  114. package/src/extensions/BulletList/index.ts +0 -1
  115. package/src/extensions/Clear/Clear.ts +0 -24
  116. package/src/extensions/Clear/index.ts +0 -1
  117. package/src/extensions/Code/Code.ts +0 -26
  118. package/src/extensions/Code/index.ts +0 -1
  119. package/src/extensions/CodeBlock/CodeBlock.ts +0 -54
  120. package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +0 -66
  121. package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +0 -89
  122. package/src/extensions/CodeBlock/components/NodeViewCodeBlock/index.module.scss +0 -81
  123. package/src/extensions/CodeBlock/highlighter.ts +0 -132
  124. package/src/extensions/CodeBlock/index.ts +0 -1
  125. package/src/extensions/CodeBlock/shiki-plugin.ts +0 -213
  126. package/src/extensions/Color/Color.ts +0 -52
  127. package/src/extensions/Color/components/ColorActionButton.tsx +0 -104
  128. package/src/extensions/Color/index.ts +0 -1
  129. package/src/extensions/Document/Document.ts +0 -8
  130. package/src/extensions/Document/index.ts +0 -1
  131. package/src/extensions/Drawer/Drawer.ts +0 -177
  132. package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.module.scss +0 -85
  133. package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +0 -598
  134. package/src/extensions/Drawer/components/ControlDrawer/icon.tsx +0 -500
  135. package/src/extensions/Drawer/components/DrawerActiveButton.tsx +0 -239
  136. package/src/extensions/Drawer/components/EditDrawerBlock.tsx +0 -238
  137. package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +0 -260
  138. package/src/extensions/Drawer/index.ts +0 -1
  139. package/src/extensions/Emoji/Emoji.ts +0 -146
  140. package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +0 -103
  141. package/src/extensions/Emoji/components/EmojiList/emojis.ts +0 -1858
  142. package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +0 -61
  143. package/src/extensions/Emoji/index.ts +0 -1
  144. package/src/extensions/Excalidraw/Excalidraw.ts +0 -123
  145. package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +0 -138
  146. package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +0 -178
  147. package/src/extensions/Excalidraw/components/NodeViewExcalidraw/index.module.scss +0 -43
  148. package/src/extensions/Excalidraw/index.ts +0 -1
  149. package/src/extensions/ExportPdf/ExportPdf.ts +0 -25
  150. package/src/extensions/ExportPdf/index.ts +0 -1
  151. package/src/extensions/ExportWord/ExportWord.ts +0 -87
  152. package/src/extensions/ExportWord/index.ts +0 -1
  153. package/src/extensions/FontFamily/FontFamily.ts +0 -64
  154. package/src/extensions/FontFamily/components/FontFamilyButton.tsx +0 -97
  155. package/src/extensions/FontFamily/index.ts +0 -1
  156. package/src/extensions/FontSize/FontSize.ts +0 -119
  157. package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +0 -84
  158. package/src/extensions/FontSize/index.ts +0 -1
  159. package/src/extensions/FormatPainter/FormatPainter.ts +0 -121
  160. package/src/extensions/FormatPainter/index.ts +0 -1
  161. package/src/extensions/Heading/Heading.ts +0 -57
  162. package/src/extensions/Heading/components/HeadingButton.tsx +0 -96
  163. package/src/extensions/Heading/index.ts +0 -1
  164. package/src/extensions/Highlight/Highlight.ts +0 -36
  165. package/src/extensions/Highlight/components/HighlightActionButton.tsx +0 -108
  166. package/src/extensions/Highlight/index.ts +0 -1
  167. package/src/extensions/History/History.ts +0 -39
  168. package/src/extensions/History/components/HistoryActionButton.tsx +0 -74
  169. package/src/extensions/History/index.ts +0 -1
  170. package/src/extensions/HorizontalRule/HorizontalRule.ts +0 -42
  171. package/src/extensions/HorizontalRule/index.ts +0 -1
  172. package/src/extensions/Iframe/Iframe.ts +0 -140
  173. package/src/extensions/Iframe/components/IframeNodeView.tsx +0 -92
  174. package/src/extensions/Iframe/components/index.module.scss +0 -40
  175. package/src/extensions/Iframe/embed.ts +0 -487
  176. package/src/extensions/Iframe/index.ts +0 -1
  177. package/src/extensions/Image/Image.ts +0 -303
  178. package/src/extensions/Image/components/ActionImageButton.tsx +0 -186
  179. package/src/extensions/Image/components/ImageCropper.tsx +0 -198
  180. package/src/extensions/Image/components/ImageView.tsx +0 -271
  181. package/src/extensions/Image/index.ts +0 -1
  182. package/src/extensions/Image/store.ts +0 -15
  183. package/src/extensions/ImageGif/ImageGif.ts +0 -176
  184. package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +0 -138
  185. package/src/extensions/ImageGif/components/ImageGifView.tsx +0 -260
  186. package/src/extensions/ImageGif/index.ts +0 -1
  187. package/src/extensions/ImportWord/ImportWord.ts +0 -52
  188. package/src/extensions/ImportWord/components/ImportWordButton.tsx +0 -151
  189. package/src/extensions/ImportWord/index.ts +0 -1
  190. package/src/extensions/Indent/Indent.ts +0 -110
  191. package/src/extensions/Indent/index.ts +0 -1
  192. package/src/extensions/Italic/Italic.ts +0 -29
  193. package/src/extensions/Italic/index.ts +0 -1
  194. package/src/extensions/Katex/Katex.ts +0 -109
  195. package/src/extensions/Katex/components/KatexActiveButton.tsx +0 -117
  196. package/src/extensions/Katex/components/KatexWrapper.tsx +0 -53
  197. package/src/extensions/Katex/index.ts +0 -1
  198. package/src/extensions/LineHeight/LineHeight.ts +0 -76
  199. package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +0 -93
  200. package/src/extensions/LineHeight/index.ts +0 -1
  201. package/src/extensions/Link/Link.ts +0 -92
  202. package/src/extensions/Link/components/LinkEditBlock.tsx +0 -110
  203. package/src/extensions/Link/components/LinkEditPopover.tsx +0 -46
  204. package/src/extensions/Link/components/LinkViewBlock.tsx +0 -54
  205. package/src/extensions/Link/index.ts +0 -1
  206. package/src/extensions/ListItem/ListItem.ts +0 -1
  207. package/src/extensions/ListItem/index.ts +0 -1
  208. package/src/extensions/Mention/Mention.ts +0 -100
  209. package/src/extensions/Mention/components/NodeViewMentionList/NodeViewMentionList.tsx +0 -94
  210. package/src/extensions/Mention/components/NodeViewMentionList/index.module.scss +0 -38
  211. package/src/extensions/Mention/index.ts +0 -1
  212. package/src/extensions/Mermaid/Mermaid.ts +0 -177
  213. package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +0 -155
  214. package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +0 -151
  215. package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +0 -260
  216. package/src/extensions/Mermaid/index.ts +0 -1
  217. package/src/extensions/MoreMark/MoreMark.ts +0 -102
  218. package/src/extensions/MoreMark/components/ActionMoreButton.tsx +0 -97
  219. package/src/extensions/MoreMark/index.ts +0 -1
  220. package/src/extensions/MultiColumn/Column.ts +0 -36
  221. package/src/extensions/MultiColumn/MultiColumn.ts +0 -111
  222. package/src/extensions/MultiColumn/components/ColumnActionButton.ts +0 -22
  223. package/src/extensions/MultiColumn/index.ts +0 -3
  224. package/src/extensions/OrderedList/OrderedList.ts +0 -28
  225. package/src/extensions/OrderedList/index.ts +0 -1
  226. package/src/extensions/SearchAndReplace/SearchAndReplace.ts +0 -395
  227. package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +0 -190
  228. package/src/extensions/SearchAndReplace/index.ts +0 -1
  229. package/src/extensions/Selection/Selection.ts +0 -32
  230. package/src/extensions/Selection/index.ts +0 -1
  231. package/src/extensions/SlashCommand/SlashCommand.ts +0 -255
  232. package/src/extensions/SlashCommand/components/CommandsList.tsx +0 -180
  233. package/src/extensions/SlashCommand/groups.ts +0 -183
  234. package/src/extensions/SlashCommand/index.ts +0 -1
  235. package/src/extensions/SlashCommand/types.ts +0 -24
  236. package/src/extensions/Strike/Strike.ts +0 -26
  237. package/src/extensions/Strike/index.ts +0 -1
  238. package/src/extensions/Subscript/Subscript.ts +0 -88
  239. package/src/extensions/Subscript/index.ts +0 -1
  240. package/src/extensions/Table/Cell.ts +0 -131
  241. package/src/extensions/Table/Header.ts +0 -93
  242. package/src/extensions/Table/Row.ts +0 -8
  243. package/src/extensions/Table/Table.ts +0 -60
  244. package/src/extensions/Table/cell-background.ts +0 -112
  245. package/src/extensions/Table/components/CreateTablePopover.tsx +0 -132
  246. package/src/extensions/Table/components/TableActionButton.tsx +0 -42
  247. package/src/extensions/Table/index.ts +0 -6
  248. package/src/extensions/Table/utils.ts +0 -352
  249. package/src/extensions/TableOfContent/TableOfContent.ts +0 -124
  250. package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +0 -116
  251. package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +0 -27
  252. package/src/extensions/TableOfContent/components/index.module.scss +0 -40
  253. package/src/extensions/TableOfContent/index.ts +0 -1
  254. package/src/extensions/TaskList/TaskList.ts +0 -46
  255. package/src/extensions/TaskList/index.ts +0 -1
  256. package/src/extensions/TextAlign/TextAlign.ts +0 -68
  257. package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +0 -103
  258. package/src/extensions/TextAlign/index.ts +0 -1
  259. package/src/extensions/TextBubble/TextBubble.ts +0 -22
  260. package/src/extensions/TextBubble/components/TextDropdown.tsx +0 -146
  261. package/src/extensions/TextBubble/index.ts +0 -1
  262. package/src/extensions/TextDirection/TextDirection.ts +0 -97
  263. package/src/extensions/TextDirection/components/TextDirectionButton.tsx +0 -103
  264. package/src/extensions/TextDirection/index.ts +0 -1
  265. package/src/extensions/TrailingNode/TrailingNode.ts +0 -71
  266. package/src/extensions/TrailingNode/index.ts +0 -1
  267. package/src/extensions/Twitter/Twitter.ts +0 -161
  268. package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +0 -68
  269. package/src/extensions/Twitter/components/NodeViewTweet.tsx +0 -30
  270. package/src/extensions/Twitter/components/TwitterActiveButton.tsx +0 -41
  271. package/src/extensions/Twitter/index.ts +0 -1
  272. package/src/extensions/UnderLine/Underline.ts +0 -30
  273. package/src/extensions/UnderLine/index.ts +0 -1
  274. package/src/extensions/Video/Video.ts +0 -204
  275. package/src/extensions/Video/components/ActiveVideoButton.tsx +0 -191
  276. package/src/extensions/Video/index.ts +0 -1
  277. package/src/extensions/Video/store.ts +0 -15
  278. package/src/extensions/index.ts +0 -122
  279. package/src/hooks/useActive.tsx +0 -24
  280. package/src/hooks/useAttributes.tsx +0 -45
  281. package/src/hooks/useCopy.tsx +0 -20
  282. package/src/hooks/useEditorState.tsx +0 -23
  283. package/src/hooks/useExtension.tsx +0 -29
  284. package/src/index.ts +0 -8
  285. package/src/lib/utils.ts +0 -7
  286. package/src/locale-bundle.ts +0 -3
  287. package/src/locales/en.ts +0 -173
  288. package/src/locales/hu.ts +0 -173
  289. package/src/locales/index.tsx +0 -163
  290. package/src/locales/pt-br.ts +0 -173
  291. package/src/locales/vi.ts +0 -173
  292. package/src/locales/zh-cn.ts +0 -173
  293. package/src/plugins/DragHandle/index.ts +0 -375
  294. package/src/plugins/DragHandle/range.ts +0 -114
  295. package/src/plugins/DragHandle/utils.ts +0 -80
  296. package/src/plugins/image-upload.ts +0 -160
  297. package/src/store/ProviderRichText.tsx +0 -53
  298. package/src/store/editableEditor.ts +0 -15
  299. package/src/store/fast-context.tsx +0 -70
  300. package/src/store/store.ts +0 -35
  301. package/src/styles/ProseMirror.scss +0 -176
  302. package/src/styles/columns.scss +0 -23
  303. package/src/styles/editor.scss +0 -411
  304. package/src/styles/global.scss +0 -87
  305. package/src/styles/index.scss +0 -5
  306. package/src/styles/mention.scss +0 -6
  307. package/src/theme/theme.ts +0 -15
  308. package/src/types.ts +0 -271
  309. package/src/utils/_event.ts +0 -55
  310. package/src/utils/color.ts +0 -67
  311. package/src/utils/columns.ts +0 -142
  312. package/src/utils/customEvents/customEvents.ts +0 -18
  313. package/src/utils/customEvents/events.constant.ts +0 -11
  314. package/src/utils/delete-node.ts +0 -46
  315. package/src/utils/dom-dataset.ts +0 -121
  316. package/src/utils/download.ts +0 -17
  317. package/src/utils/dynamicCSS.ts +0 -192
  318. package/src/utils/editor-container-size.ts +0 -28
  319. package/src/utils/file.ts +0 -112
  320. package/src/utils/getRenderContainer.ts +0 -41
  321. package/src/utils/indent.ts +0 -99
  322. package/src/utils/is-mobile.ts +0 -57
  323. package/src/utils/json.ts +0 -18
  324. package/src/utils/line-height.ts +0 -109
  325. package/src/utils/lru-cache.ts +0 -145
  326. package/src/utils/mitt.ts +0 -114
  327. package/src/utils/node.ts +0 -92
  328. package/src/utils/pdf.ts +0 -72
  329. package/src/utils/plateform.ts +0 -49
  330. package/src/utils/shortId.ts +0 -5
  331. package/src/utils/storage.ts +0 -18
  332. package/src/utils/utils.ts +0 -71
  333. package/src/vite-env.d.ts +0 -3
@@ -0,0 +1,947 @@
1
+ import { BlockquoteOptions as BlockquoteOptions_2 } from '@tiptap/extension-blockquote';
2
+ import { BoldOptions as BoldOptions_2 } from '@tiptap/extension-bold';
3
+ import { BulletListOptions as BulletListOptions_2 } from '@tiptap/extension-bullet-list';
4
+ import { BundledLanguage } from 'shiki';
5
+ import { BundledTheme } from 'shiki';
6
+ import { CharacterCountOptions } from '@tiptap/extension-character-count';
7
+ import { CodeBlockOptions as CodeBlockOptions_2 } from '@tiptap/extension-code-block';
8
+ import { CodeOptions as CodeOptions_2 } from '@tiptap/extension-code';
9
+ import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-color';
10
+ import { default as default_2 } from 'mammoth';
11
+ import { DropcursorOptions } from '@tiptap/extension-dropcursor';
12
+ import { Editor } from '@tiptap/react';
13
+ import { Editor as Editor_2 } from '@tiptap/core';
14
+ import { Extension } from '@tiptap/core';
15
+ import { Extensions } from '@tiptap/core';
16
+ import { FocusOptions as FocusOptions_2 } from '@tiptap/extension-focus';
17
+ import { FontFamilyOptions as FontFamilyOptions_2 } from '@tiptap/extension-font-family';
18
+ import { HardBreakOptions } from '@tiptap/extension-hard-break';
19
+ import { HeadingOptions as HeadingOptions_2 } from '@tiptap/extension-heading';
20
+ import { HighlightOptions as HighlightOptions_2 } from '@tiptap/extension-highlight';
21
+ import { HistoryOptions as HistoryOptions_2 } from '@tiptap/extension-history';
22
+ import { HorizontalRuleOptions as HorizontalRuleOptions_2 } from '@tiptap/extension-horizontal-rule';
23
+ import { ImageOptions } from '@tiptap/extension-image';
24
+ import { ItalicOptions as ItalicOptions_2 } from '@tiptap/extension-italic';
25
+ import { LinkOptions as LinkOptions_2 } from '@tiptap/extension-link';
26
+ import { ListItemOptions } from '@tiptap/extension-list-item';
27
+ import { Mark } from '@tiptap/core';
28
+ import { MentionNodeAttrs } from '@tiptap/extension-mention';
29
+ import { MentionOptions } from '@tiptap/extension-mention';
30
+ import { Node as Node_2 } from '@tiptap/core';
31
+ import { OrderedListOptions as OrderedListOptions_2 } from '@tiptap/extension-ordered-list';
32
+ import { ParagraphOptions } from '@tiptap/extension-paragraph';
33
+ import { PlaceholderOptions } from '@tiptap/extension-placeholder';
34
+ import { Range as Range_2 } from '@tiptap/core';
35
+ import { StrikeOptions as StrikeOptions_2 } from '@tiptap/extension-strike';
36
+ import { SubscriptExtensionOptions } from '@tiptap/extension-subscript';
37
+ import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript';
38
+ import { TableCellOptions } from '@tiptap/extension-table-cell';
39
+ import { TableHeaderOptions } from '@tiptap/extension-table-header';
40
+ import { TableRowOptions } from '@tiptap/extension-table-row';
41
+ import { TaskItemOptions } from '@tiptap/extension-task-item';
42
+ import { TaskListOptions as TaskListOptions_2 } from '@tiptap/extension-task-list';
43
+ import { TextAlignOptions as TextAlignOptions_2 } from '@tiptap/extension-text-align';
44
+ import { TextStyleOptions } from '@tiptap/extension-text-style';
45
+ import { UnderlineOptions as UnderlineOptions_2 } from '@tiptap/extension-underline';
46
+
47
+ declare type Alignments = 'left' | 'center' | 'right' | 'justify';
48
+
49
+ export declare const Attachment: Node_2<AttachmentOptions, any>;
50
+
51
+ declare interface AttachmentOptions extends GeneralOptions<AttachmentOptions> {
52
+ /** Function for uploading files */
53
+ upload?: (file: File) => Promise<string>;
54
+ }
55
+
56
+ export declare const BaseKit: Extension<BaseKitOptions, any>;
57
+
58
+ /**
59
+ * Represents the interface for options in the base toolkit.
60
+ */
61
+ export declare interface BaseKitOptions {
62
+ /**
63
+ * Whether to enable the document option
64
+ *
65
+ * @default true
66
+ */
67
+ document: false;
68
+ /**
69
+ * Whether to enable the document option
70
+ *
71
+ * @default false
72
+ */
73
+ multiColumn?: boolean;
74
+ /**
75
+ * Whether to enable the text option
76
+ *
77
+ * @default true
78
+ */
79
+ text: false;
80
+ /**
81
+ * Whether to enable the Gapcursor
82
+ *
83
+ * @default true
84
+ */
85
+ gapcursor: false;
86
+ /**
87
+ * Dropcursor options or false, indicating whether to enable the drop cursor
88
+ *
89
+ * @default true
90
+ */
91
+ dropcursor: Partial<DropcursorOptions> | false;
92
+ /**
93
+ * character count options or false, indicating whether to enable character count
94
+ *
95
+ * @default true
96
+ */
97
+ characterCount: Partial<CharacterCountOptions> | false;
98
+ /**
99
+ * HardBreak options or false, indicating whether to enable hard breaks
100
+ *
101
+ * @default true
102
+ */
103
+ hardBreak: Partial<HardBreakOptions> | false;
104
+ /**
105
+ * Placeholder options or false, indicating whether to enable placeholders
106
+ *
107
+ * @default true
108
+ */
109
+ placeholder: Partial<PlaceholderOptions> | false;
110
+ /**
111
+ * Paragraph options or false, indicating whether to enable paragraph functionality
112
+ *
113
+ * @default true
114
+ */
115
+ paragraph: Partial<ParagraphOptions> | false;
116
+ /**
117
+ * Focus options or false, indicating whether to enable focus functionality
118
+ *
119
+ * @default true
120
+ */
121
+ focus: Partial<FocusOptions_2> | false;
122
+ /**
123
+ * ListItem options or false, indicating whether to enable list item functionality
124
+ *
125
+ * @default true
126
+ */
127
+ listItem: Partial<ListItemOptions> | false;
128
+ /**
129
+ * Text Style options or false, indicating whether to enable text style functionality
130
+ *
131
+ * @default true
132
+ */
133
+ textStyle: Partial<TextStyleOptions> | false;
134
+ /**
135
+ * Bubble options, taking `BubbleOptions<BaseKitOptions>` as parameters, indicating whether to enable the bubble functionality
136
+ */
137
+ bubble: any;
138
+ /**
139
+ * Iframe options or false, indicating whether to enable the iframe
140
+ *
141
+ * @default true
142
+ */
143
+ /**
144
+ * Trailing node options or false, indicating whether to enable the trailing node
145
+ *
146
+ * @default true
147
+ */
148
+ trailingNode: Partial<TrailingNodeOptions> | false;
149
+ /**
150
+ * textBubble options or false, indicating whether to enable the textBubble
151
+ *
152
+ * @default true
153
+ */
154
+ textBubble: Partial<TextBubbleOptions> | false;
155
+ /**
156
+ * selection options or false, indicating whether to enable the selection
157
+ *
158
+ * @default true
159
+ */
160
+ selection: any | false;
161
+ }
162
+
163
+ export declare const Blockquote: Node_2<BlockquoteOptions, any>;
164
+
165
+ export declare interface BlockquoteOptions extends BlockquoteOptions_2, GeneralOptions<BlockquoteOptions> {
166
+ }
167
+
168
+ export declare const Bold: Mark<BoldOptions, any>;
169
+
170
+ export declare interface BoldOptions extends BoldOptions_2, GeneralOptions<BoldOptions> {
171
+ }
172
+
173
+ export declare const BulletList: Node_2<BulletListOptions, any>;
174
+
175
+ export declare interface BulletListOptions extends BulletListOptions_2, GeneralOptions<BulletListOptions> {
176
+ }
177
+
178
+ /**
179
+ * Represents the ButtonView function.
180
+ */
181
+ declare type ButtonView<T = any> = (options: ButtonViewParams<T>) => ButtonViewReturn | ButtonViewReturn[];
182
+
183
+ /**
184
+ * Represents the parameters for the ButtonView function.
185
+ */
186
+ declare interface ButtonViewParams<T = any> {
187
+ /** Editor object */
188
+ editor: Editor;
189
+ /** Extension object */
190
+ extension: Extension<T>;
191
+ /** Translation function */
192
+ t: (path: string) => string;
193
+ }
194
+
195
+ /**
196
+ * Represents the return value for the ButtonView component.
197
+ */
198
+ declare interface ButtonViewReturn {
199
+ /** Component */
200
+ component: unknown;
201
+ /** Component props */
202
+ componentProps: ButtonViewReturnComponentProps;
203
+ /** Component slots */
204
+ componentSlots?: ButtonViewReturnComponentSlots;
205
+ }
206
+
207
+ /**
208
+ * Represents the props for the ButtonView component.
209
+ */
210
+ declare interface ButtonViewReturnComponentProps {
211
+ /** Method triggered when action is performed */
212
+ action?: (value?: any) => void;
213
+ /** Whether it is in the active state */
214
+ isActive?: () => boolean;
215
+ /** Button icon */
216
+ icon?: any;
217
+ /** Text displayed on hover */
218
+ tooltip?: string;
219
+ [x: string]: any;
220
+ }
221
+
222
+ /**
223
+ * Represents the slots for the ButtonView component.
224
+ */
225
+ declare interface ButtonViewReturnComponentSlots {
226
+ /** Dialog slot */
227
+ dialog: () => any;
228
+ [x: string]: () => any;
229
+ }
230
+
231
+ export declare const Clear: Node_2<ClearOptions, any>;
232
+
233
+ export declare interface ClearOptions extends GeneralOptions<ClearOptions> {
234
+ }
235
+
236
+ export declare const Code: Mark<CodeOptions, any>;
237
+
238
+ export declare const CodeBlock: Node_2<CodeBlockOptions, any>;
239
+
240
+ export declare interface CodeBlockOptions extends GeneralOptions<CodeBlockOptions_2> {
241
+ languages?: BundledLanguage[];
242
+ defaultTheme: BundledTheme;
243
+ }
244
+
245
+ export declare interface CodeOptions extends CodeOptions_2, GeneralOptions<CodeOptions> {
246
+ }
247
+
248
+ export declare const Color: Extension<ColorOptions, any>;
249
+
250
+ export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<ColorOptions> {
251
+ /**
252
+ * An array of color options to display in the color picker
253
+ */
254
+ colors?: string[];
255
+ /**
256
+ * The default color to use when no color is selected
257
+ */
258
+ defaultColor?: string;
259
+ }
260
+
261
+ export declare const Column: Node_2<any, any>;
262
+
263
+ export declare const ColumnActionButton: Extension<any, any>;
264
+
265
+ declare interface Command {
266
+ name: string;
267
+ label: string;
268
+ description?: string;
269
+ aliases?: string[];
270
+ iconName?: any;
271
+ iconUrl?: string;
272
+ action: ({ editor, range }: {
273
+ editor: Editor_2;
274
+ range: Range_2;
275
+ }) => void;
276
+ shouldBeHidden?: (editor: Editor_2) => boolean;
277
+ }
278
+
279
+ export declare const Drawer: Node_2<DrawerOptions, any>;
280
+
281
+ declare interface DrawerOptions extends GeneralOptions<DrawerOptions> {
282
+ /** Function for uploading files */
283
+ upload?: (file: File) => Promise<string>;
284
+ }
285
+
286
+ export declare const Emoji: Node_2<any, any>;
287
+
288
+ export declare const Excalidraw: Node_2<any, any>;
289
+
290
+ export declare const ExportPdf: Extension<any, any>;
291
+
292
+ export declare const ExportWord: Extension<ExportWordOptions, any>;
293
+
294
+ declare interface ExportWordOptions extends GeneralOptions<ExportWordOptions> {
295
+ }
296
+
297
+ export declare const FontFamily: Extension<FontFamilyOptions, any>;
298
+
299
+ declare interface FontFamilyOptions extends FontFamilyOptions_2, GeneralOptions<FontFamilyOptions> {
300
+ /**
301
+ * Font family list.
302
+ */
303
+ fontFamilyList: (string | NameValueOption)[];
304
+ }
305
+
306
+ export declare const FontSize: Extension<FontSizeOptions, any>;
307
+
308
+ /**
309
+ * Represents the interface for font size options, extending GeneralOptions.
310
+ */
311
+ export declare interface FontSizeOptions extends GeneralOptions<FontSizeOptions> {
312
+ types: string[];
313
+ /**
314
+ * List of available font size values
315
+ *
316
+ * @default DEFAULT_FONT_SIZE_LIST
317
+ */
318
+ fontSizes: (string | NameValueOption)[];
319
+ }
320
+
321
+ /**
322
+ * 格式刷
323
+ */
324
+ export declare const FormatPainter: Extension<FormatPainterOptions, any>;
325
+
326
+ /**
327
+ * Represents the interface for font size options, extending GeneralOptions.
328
+ */
329
+ export declare interface FormatPainterOptions extends GeneralOptions<FormatPainterOptions> {
330
+ }
331
+
332
+ /**
333
+ * Represents the general options for Tiptap extensions.
334
+ */
335
+ declare interface GeneralOptions<T> {
336
+ /** Enabled divider */
337
+ divider: boolean;
338
+ /** Enabled spacer */
339
+ spacer: boolean;
340
+ /** Button view function */
341
+ button: ButtonView<T>;
342
+ /** Show on Toolbar */
343
+ toolbar?: boolean;
344
+ }
345
+
346
+ declare interface Group {
347
+ name: string;
348
+ title: string;
349
+ commands: Command[];
350
+ }
351
+
352
+ export declare const Heading: Node_2<HeadingOptions, any>;
353
+
354
+ export declare interface HeadingOptions extends HeadingOptions_2, GeneralOptions<HeadingOptions> {
355
+ }
356
+
357
+ declare const Highlight_2: Mark<HighlightOptions, any>;
358
+ export { Highlight_2 as Highlight }
359
+
360
+ export declare interface HighlightOptions extends HighlightOptions_2, GeneralOptions<HighlightOptions> {
361
+ }
362
+
363
+ declare const History_2: Extension<HistoryOptions, any>;
364
+ export { History_2 as History }
365
+
366
+ export declare interface HistoryOptions extends HistoryOptions_2, GeneralOptions<HistoryOptions> {
367
+ }
368
+
369
+ export declare const HorizontalRule: Node_2<HorizontalRuleOptions, any>;
370
+
371
+ export declare interface HorizontalRuleOptions extends HorizontalRuleOptions_2, GeneralOptions<HorizontalRuleOptions> {
372
+ }
373
+
374
+ export declare const Iframe: Node_2<any, any>;
375
+
376
+ declare interface IImageOptions extends GeneralOptions<IImageOptions> {
377
+ /** Function for uploading files */
378
+ upload?: (file: File) => Promise<string>;
379
+ HTMLAttributes?: any;
380
+ acceptMimes?: string[];
381
+ maxSize?: number;
382
+ /** The source URL of the image */
383
+ resourceImage: 'upload' | 'link' | 'both';
384
+ defaultInline?: boolean;
385
+ }
386
+
387
+ declare interface IKatexOptions {
388
+ HTMLAttributes: Record<string, any>;
389
+ }
390
+
391
+ declare const Image_2: Node_2<IImageOptions, any>;
392
+ export { Image_2 as Image }
393
+
394
+ export declare const ImageGif: Node_2<ImageGifOptions, any>;
395
+
396
+ declare interface ImageGifOptions extends ImageOptions {
397
+ /**
398
+ * The key for the gif https://giphy.com/
399
+ */
400
+ GIPHY_API_KEY: string;
401
+ }
402
+
403
+ export declare const ImportWord: Extension<ImportWordOptions, any>;
404
+
405
+ declare interface ImportWordOptions extends GeneralOptions<ImportWordOptions> {
406
+ /** Function for converting Word files to HTML */
407
+ convert?: (file: File) => Promise<string>;
408
+ /** Function for uploading images */
409
+ upload?: (files: File[]) => Promise<unknown>;
410
+ /**
411
+ * File Size limit(10 MB)
412
+ *
413
+ * @default 1024 * 1024 * 10
414
+ */
415
+ limit?: number;
416
+ mammothOptions?: Parameters<typeof default_2['convertToHtml']>[1];
417
+ }
418
+
419
+ export declare const Indent: Extension<IndentOptions, any>;
420
+
421
+ export declare interface IndentOptions extends GeneralOptions<IndentOptions> {
422
+ types: string[];
423
+ minIndent: number;
424
+ maxIndent: number;
425
+ }
426
+
427
+ export declare const Italic: Mark<ItalicOptions, any>;
428
+
429
+ export declare interface ItalicOptions extends ItalicOptions_2, GeneralOptions<ItalicOptions> {
430
+ }
431
+
432
+ export declare const Katex: Node_2<IKatexOptions, any>;
433
+
434
+ export declare const LineHeight: Extension<LineHeightOptions, any>;
435
+
436
+ export declare interface LineHeightOptions extends GeneralOptions<LineHeightOptions> {
437
+ types: string[];
438
+ lineHeights: string[];
439
+ defaultHeight: string;
440
+ }
441
+
442
+ export declare const Link: Mark<LinkOptions, any>;
443
+
444
+ export declare interface LinkOptions extends LinkOptions_2, GeneralOptions<LinkOptions> {
445
+ }
446
+
447
+ export declare const Mention: Node_2<MentionOptions<any, MentionNodeAttrs>, any>;
448
+
449
+ export declare const Mermaid: Node_2<MermaidOptions, any>;
450
+
451
+ declare interface MermaidOptions extends GeneralOptions<MermaidOptions> {
452
+ /** Function for uploading files */
453
+ upload?: (file: File) => Promise<string>;
454
+ }
455
+
456
+ export declare const MoreMark: Extension<MoreMarkOptions, any>;
457
+
458
+ export declare interface MoreMarkOptions extends GeneralOptions<MoreMarkOptions> {
459
+ /**
460
+ * // 下标
461
+ *
462
+ * @default true
463
+ */
464
+ subscript: Partial<SubscriptExtensionOptions> | false;
465
+ /**
466
+ * // 上标
467
+ *
468
+ * @default true
469
+ */
470
+ superscript: Partial<SuperscriptExtensionOptions> | false;
471
+ }
472
+
473
+ export declare const MultiColumn: Node_2<any, any>;
474
+
475
+ declare interface NameValueOption<T = string> {
476
+ name: string;
477
+ value: T;
478
+ }
479
+
480
+ declare interface Options {
481
+ onHasOneBeforeInsert?: () => void;
482
+ }
483
+
484
+ export declare const OrderedList: Node_2<OrderedListOptions, any>;
485
+
486
+ export declare interface OrderedListOptions extends OrderedListOptions_2, GeneralOptions<OrderedListOptions> {
487
+ }
488
+
489
+ declare interface Result {
490
+ from: number;
491
+ to: number;
492
+ }
493
+
494
+ export declare const SearchAndReplace: Extension<SearchOptions, SearchStorage>;
495
+
496
+ declare interface SearchOptions extends GeneralOptions<SearchOptions> {
497
+ searchTerm: string;
498
+ replaceTerm: string;
499
+ searchResultClass: string;
500
+ searchResultCurrentClass: string;
501
+ caseSensitive: boolean;
502
+ disableRegex: boolean;
503
+ onChange?: () => void;
504
+ }
505
+
506
+ declare interface SearchStorage {
507
+ results: Result[];
508
+ currentIndex: number;
509
+ }
510
+
511
+ export declare interface SetImageAttrsOptions {
512
+ src?: string;
513
+ /** The alternative text for the image. */
514
+ alt?: string;
515
+ /** The caption of the image. */
516
+ caption?: string;
517
+ /** The width of the image. */
518
+ width?: number | string | null;
519
+ /** The alignment of the image. */
520
+ align?: 'left' | 'center' | 'right';
521
+ /** Whether the image is inline. */
522
+ inline?: boolean;
523
+ /** image FlipX */
524
+ flipX?: boolean;
525
+ /** image FlipY */
526
+ flipY?: boolean;
527
+ }
528
+
529
+ export declare const SlashCommand: Extension<SlashCommandOptions, any>;
530
+
531
+ declare interface SlashCommandOptions {
532
+ renderGroupItem?: (extension: Extensions[number], groups: Group[]) => void;
533
+ }
534
+
535
+ export declare const Strike: Mark<StrikeOptions, any>;
536
+
537
+ export declare interface StrikeOptions extends StrikeOptions_2, GeneralOptions<StrikeOptions> {
538
+ }
539
+
540
+ export declare const SubAndSuperScript: Extension<SubAndSuperScriptOptions, any>;
541
+
542
+ /**
543
+ * Represents the interface for subscript and superscript options, extending GeneralOptions.
544
+ */
545
+ export declare interface SubAndSuperScriptOptions extends GeneralOptions<SubAndSuperScriptOptions> {
546
+ /**
547
+ * subscript options or false, indicating whether subscript is enabled
548
+ *
549
+ * @default true
550
+ */
551
+ subscript: Partial<SubscriptExtensionOptions> | false;
552
+ /**
553
+ * superscript options or false, indicating whether superscript is enabled
554
+ *
555
+ * @default true
556
+ */
557
+ superscript: Partial<SuperscriptExtensionOptions> | false;
558
+ }
559
+
560
+ export declare const Table: Node_2<TableOptions, any>;
561
+
562
+ declare interface TableCellBackgroundOptions {
563
+ HTMLAttributes: Record<string, any>;
564
+ types?: any;
565
+ }
566
+
567
+ export declare const TableOfContents: Node_2<Options, any>;
568
+
569
+ export declare interface TableOptions extends GeneralOptions<TableOptions> {
570
+ HTMLAttributes: Record<string, any>;
571
+ resizable: boolean;
572
+ handleWidth: number;
573
+ cellMinWidth: number;
574
+ lastColumnResizable: boolean;
575
+ allowTableNodeSelection: boolean;
576
+ /** options for table rows */
577
+ tableRow: Partial<TableRowOptions>;
578
+ /** options for table headers */
579
+ tableHeader: Partial<TableHeaderOptions>;
580
+ /** options for table cells */
581
+ tableCell: Partial<TableCellOptions>;
582
+ /** options for table cell background */
583
+ tableCellBackground: Partial<TableCellBackgroundOptions>;
584
+ }
585
+
586
+ export declare const TaskList: Node_2<TaskListOptions, any>;
587
+
588
+ /**
589
+ * Represents the interface for task list options, extending TiptapTaskListOptions and GeneralOptions.
590
+ */
591
+ export declare interface TaskListOptions extends TaskListOptions_2, GeneralOptions<TaskListOptions> {
592
+ /** options for task items */
593
+ taskItem: Partial<TaskItemOptions>;
594
+ }
595
+
596
+ export declare const TextAlign: Extension<TextAlignOptions, any>;
597
+
598
+ /**
599
+ * Represents the interface for text align options, extending TiptapTextAlignOptions and GeneralOptions.
600
+ */
601
+ export declare interface TextAlignOptions extends TextAlignOptions_2, GeneralOptions<TextAlignOptions> {
602
+ /**
603
+ * List of available alignment options
604
+ *
605
+ * @default ['left', 'center', 'right', 'justify']
606
+ */
607
+ alignments: Alignments[];
608
+ }
609
+
610
+ declare interface TextBubbleOptions extends GeneralOptions<TextBubbleOptions> {
611
+ }
612
+
613
+ export declare const TextDirection: Extension<any, any>;
614
+
615
+ /**
616
+ * Extension based on:
617
+ * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js
618
+ * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts
619
+ */
620
+ declare interface TrailingNodeOptions {
621
+ node: string;
622
+ notAfter: string[];
623
+ }
624
+
625
+ /**
626
+ * This extension adds support for tweets.
627
+ */
628
+ export declare const Twitter: Node_2<TwitterOptions, any>;
629
+
630
+ declare interface TwitterOptions {
631
+ /**
632
+ * Controls if the paste handler for tweets should be added.
633
+ * @default true
634
+ * @example false
635
+ */
636
+ addPasteHandler: boolean;
637
+ HTMLAttributes: Record<string, any>;
638
+ /**
639
+ * Controls if the twitter node should be inline or not.
640
+ * @default false
641
+ * @example true
642
+ */
643
+ inline: boolean;
644
+ /**
645
+ * The origin of the tweet.
646
+ * @default ''
647
+ * @example 'https://tiptap.dev'
648
+ */
649
+ origin: string;
650
+ }
651
+
652
+ export declare const Underline: Mark<UnderlineOptions, any>;
653
+
654
+ export declare interface UnderlineOptions extends UnderlineOptions_2, GeneralOptions<UnderlineOptions> {
655
+ }
656
+
657
+ export declare const Video: Node_2<VideoOptions, any>;
658
+
659
+ /**
660
+ * Represents the interface for video options, extending GeneralOptions.
661
+ */
662
+ export declare interface VideoOptions extends GeneralOptions<VideoOptions> {
663
+ /**
664
+ * Indicates whether fullscreen play is allowed
665
+ *
666
+ * @default true
667
+ */
668
+ allowFullscreen: boolean;
669
+ /**
670
+ * Indicates whether to display the frameborder
671
+ *
672
+ * @default false
673
+ */
674
+ frameborder: boolean;
675
+ /**
676
+ * Width of the video, can be a number or string
677
+ *
678
+ * @default VIDEO_SIZE['size-medium']
679
+ */
680
+ width: number | string;
681
+ /** HTML attributes object for passing additional attributes */
682
+ HTMLAttributes: {
683
+ [key: string]: any;
684
+ };
685
+ /** Function for uploading files */
686
+ upload?: (file: File) => Promise<string>;
687
+ /** The source URL of the video */
688
+ resourceVideo: 'upload' | 'link' | 'both';
689
+ }
690
+
691
+ export { }
692
+
693
+
694
+ declare module '@tiptap/core' {
695
+ interface Commands<ReturnType> {
696
+ video: {
697
+ /**
698
+ * Add an video
699
+ */
700
+ setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
701
+ /**
702
+ * Update an video
703
+ */
704
+ updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
705
+ };
706
+ }
707
+ }
708
+
709
+
710
+ declare module '@tiptap/core' {
711
+ interface Commands<ReturnType> {
712
+ fontSize: {
713
+ /**
714
+ * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
715
+ * CSS font-size
716
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
717
+ */
718
+ setFontSize: (fontSize: string) => ReturnType;
719
+ /**
720
+ * Unset the font size
721
+ */
722
+ unsetFontSize: () => ReturnType;
723
+ };
724
+ }
725
+ }
726
+
727
+
728
+ declare module '@tiptap/core' {
729
+ interface Commands<ReturnType> {
730
+ indent: {
731
+ /**
732
+ * Set the indent attribute
733
+ */
734
+ indent: () => ReturnType;
735
+ /**
736
+ * Set the outdent attribute
737
+ */
738
+ outdent: () => ReturnType;
739
+ };
740
+ }
741
+ }
742
+
743
+
744
+ declare module '@tiptap/core' {
745
+ interface Commands<ReturnType> {
746
+ tableCellBackground: {
747
+ setTableCellBackground: (color: string) => ReturnType;
748
+ unsetTableCellBackground: () => ReturnType;
749
+ };
750
+ }
751
+ }
752
+
753
+
754
+ declare module '@tiptap/core' {
755
+ interface Commands<ReturnType> {
756
+ emoji: {
757
+ setEmoji: (emoji: {
758
+ name: string;
759
+ emoji: string;
760
+ }) => ReturnType;
761
+ };
762
+ }
763
+ }
764
+
765
+
766
+ declare module '@tiptap/core' {
767
+ interface Commands<ReturnType> {
768
+ painter: {
769
+ setPainter: (marks: Mark[]) => ReturnType;
770
+ };
771
+ }
772
+ }
773
+
774
+
775
+ declare module '@tiptap/core' {
776
+ interface Commands<ReturnType> {
777
+ imageUpload: {
778
+ /**
779
+ * Add an image
780
+ */
781
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
782
+ /**
783
+ * Update an image
784
+ */
785
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
786
+ /**
787
+ * Set image alignment
788
+ */
789
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
790
+ };
791
+ }
792
+ }
793
+
794
+
795
+ declare module '@tiptap/core' {
796
+ interface Commands<ReturnType> {
797
+ katex: {
798
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
799
+ };
800
+ }
801
+ }
802
+
803
+
804
+ declare module '@tiptap/core' {
805
+ interface Commands<ReturnType> {
806
+ search: {
807
+ setSearchTerm: (searchTerm: string) => ReturnType;
808
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
809
+ replace: () => ReturnType;
810
+ replaceAll: () => ReturnType;
811
+ goToPrevSearchResult: () => void;
812
+ goToNextSearchResult: () => void;
813
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
814
+ };
815
+ }
816
+ }
817
+
818
+
819
+ declare module '@tiptap/core' {
820
+ interface Commands<ReturnType> {
821
+ iframe: {
822
+ /**
823
+ * Add an iframe
824
+ */
825
+ setIframe: (options: {
826
+ src: string;
827
+ service: string;
828
+ }) => ReturnType;
829
+ };
830
+ }
831
+ }
832
+
833
+
834
+ declare module '@tiptap/core' {
835
+ interface Commands<ReturnType> {
836
+ columns: {
837
+ insertColumns: (attrs?: {
838
+ cols: number;
839
+ }) => ReturnType;
840
+ addColBefore: () => ReturnType;
841
+ addColAfter: () => ReturnType;
842
+ deleteCol: () => ReturnType;
843
+ };
844
+ }
845
+ }
846
+
847
+
848
+ declare module '@tiptap/core' {
849
+ interface Commands<ReturnType> {
850
+ lineHeight: {
851
+ setLineHeight: (lineHeight: string) => ReturnType;
852
+ unsetLineHeight: () => ReturnType;
853
+ };
854
+ }
855
+ }
856
+
857
+
858
+ declare module '@tiptap/core' {
859
+ interface Commands<ReturnType> {
860
+ exportWord: {
861
+ exportToWord: () => ReturnType;
862
+ };
863
+ }
864
+ }
865
+
866
+
867
+ declare module '@tiptap/core' {
868
+ interface Commands<ReturnType> {
869
+ excalidraw: {
870
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
871
+ };
872
+ }
873
+ }
874
+
875
+
876
+ declare module '@tiptap/core' {
877
+ interface Commands<ReturnType> {
878
+ tableOfContents: {
879
+ setTableOfContents: () => ReturnType;
880
+ removeTableOfContents: () => ReturnType;
881
+ };
882
+ }
883
+ }
884
+
885
+
886
+ declare module '@tiptap/core' {
887
+ interface Commands<ReturnType> {
888
+ imageGifUpload: {
889
+ /**
890
+ * Add an image gif
891
+ */
892
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
893
+ /**
894
+ * Update an image gif
895
+ */
896
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
897
+ /**
898
+ * Set image alignment
899
+ */
900
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
901
+ };
902
+ }
903
+ }
904
+
905
+
906
+ declare module '@tiptap/core' {
907
+ interface Commands<ReturnType> {
908
+ attachment: {
909
+ setAttachment: (attrs?: unknown) => ReturnType;
910
+ };
911
+ }
912
+ }
913
+
914
+
915
+ declare module '@tiptap/core' {
916
+ interface Commands<ReturnType> {
917
+ mermaid: {
918
+ setMermaid: (options: any, replace?: any) => ReturnType;
919
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
920
+ };
921
+ }
922
+ }
923
+
924
+
925
+ declare module '@tiptap/core' {
926
+ interface Commands<ReturnType> {
927
+ drawer: {
928
+ setDrawer: (options: any, replace?: any) => ReturnType;
929
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
930
+ };
931
+ }
932
+ }
933
+
934
+
935
+ declare module '@tiptap/core' {
936
+ interface Commands<ReturnType> {
937
+ twitter: {
938
+ /**
939
+ * Insert a tweet
940
+ * @param options The tweet attributes
941
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
942
+ */
943
+ setTweet: (options: SetTweetOptions) => ReturnType;
944
+ updateTweet: (options: SetTweetOptions) => ReturnType;
945
+ };
946
+ }
947
+ }