reactjs-tiptap-editor-pro 0.2.29 → 0.2.30

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/package.json +4 -60
  2. package/src/components/ActionButton.tsx +103 -0
  3. package/src/components/ActionMenuButton.tsx +76 -0
  4. package/src/components/BubbleMenu.tsx +93 -0
  5. package/src/components/CharactorCount.tsx +50 -0
  6. package/src/components/ColorPicker.tsx +272 -0
  7. package/src/components/RichTextEditor.tsx +212 -0
  8. package/src/components/SizeSetter/SizeSetter.tsx +102 -0
  9. package/src/components/Toolbar.tsx +108 -0
  10. package/src/components/icons/Activity.tsx +19 -0
  11. package/src/components/icons/Animas.tsx +24 -0
  12. package/src/components/icons/AspectRatio.tsx +13 -0
  13. package/src/components/icons/Blockquote.tsx +17 -0
  14. package/src/components/icons/ColumnAddLeft.tsx +7 -0
  15. package/src/components/icons/ColumnAddRight.tsx +7 -0
  16. package/src/components/icons/DeleteColumn.tsx +26 -0
  17. package/src/components/icons/DeleteRow.tsx +26 -0
  18. package/src/components/icons/Direction.tsx +7 -0
  19. package/src/components/icons/Excalidraw.tsx +7 -0
  20. package/src/components/icons/ExportPdf.tsx +8 -0
  21. package/src/components/icons/ExportWord.tsx +24 -0
  22. package/src/components/icons/FileWordOutline.tsx +13 -0
  23. package/src/components/icons/Flag.tsx +19 -0
  24. package/src/components/icons/Food.tsx +20 -0
  25. package/src/components/icons/GIfIcon.tsx +10 -0
  26. package/src/components/icons/Icon.tsx +30 -0
  27. package/src/components/icons/ImportWord.tsx +23 -0
  28. package/src/components/icons/LeftToRight.tsx +7 -0
  29. package/src/components/icons/LineHeight.tsx +13 -0
  30. package/src/components/icons/MenuDown.tsx +24 -0
  31. package/src/components/icons/Mermaid.tsx +13 -0
  32. package/src/components/icons/NoFill.tsx +7 -0
  33. package/src/components/icons/Object.tsx +24 -0
  34. package/src/components/icons/RightToLeft.tsx +7 -0
  35. package/src/components/icons/SizeL.tsx +9 -0
  36. package/src/components/icons/SizeM.tsx +13 -0
  37. package/src/components/icons/SizeS.tsx +13 -0
  38. package/src/components/icons/Symbol.tsx +19 -0
  39. package/src/components/icons/Travel.tsx +24 -0
  40. package/src/components/icons/Twitter.tsx +7 -0
  41. package/src/components/icons/icons.ts +212 -0
  42. package/src/components/icons/index.ts +12 -0
  43. package/src/components/index.ts +9 -0
  44. package/src/components/menus/bubble.ts +395 -0
  45. package/src/components/menus/components/BubbleMenuContent.tsx +15 -0
  46. package/src/components/menus/components/BubbleMenuDrawer.tsx +128 -0
  47. package/src/components/menus/components/BubbleMenuExcalidraw.tsx +91 -0
  48. package/src/components/menus/components/BubbleMenuIframe.tsx +143 -0
  49. package/src/components/menus/components/BubbleMenuKatex.tsx +136 -0
  50. package/src/components/menus/components/BubbleMenuLink.tsx +99 -0
  51. package/src/components/menus/components/BubbleMenuMedia.tsx +235 -0
  52. package/src/components/menus/components/BubbleMenuMermaid.tsx +128 -0
  53. package/src/components/menus/components/BubbleMenuText.tsx +102 -0
  54. package/src/components/menus/components/BubbleMenuTwitter.tsx +91 -0
  55. package/src/components/menus/components/ColumnsBubbleMenu.tsx +59 -0
  56. package/src/components/menus/components/ContentMenu.tsx +396 -0
  57. package/src/components/menus/components/TableBubbleMenu.tsx +362 -0
  58. package/src/components/menus/index.ts +7 -0
  59. package/src/components/ui/button.tsx +56 -0
  60. package/src/components/ui/checkbox.tsx +30 -0
  61. package/src/components/ui/dialog.tsx +128 -0
  62. package/src/components/ui/dropdown-menu.tsx +203 -0
  63. package/src/components/ui/emoji-picker.tsx +166 -0
  64. package/src/components/ui/index.ts +14 -0
  65. package/src/components/ui/input.tsx +25 -0
  66. package/src/components/ui/label.tsx +26 -0
  67. package/src/components/ui/popover.tsx +31 -0
  68. package/src/components/ui/select.tsx +162 -0
  69. package/src/components/ui/separator.tsx +31 -0
  70. package/src/components/ui/switch.tsx +29 -0
  71. package/src/components/ui/tabs.tsx +55 -0
  72. package/src/components/ui/textarea.tsx +24 -0
  73. package/src/components/ui/toast.tsx +129 -0
  74. package/src/components/ui/toaster.tsx +44 -0
  75. package/src/components/ui/toggle.tsx +45 -0
  76. package/src/components/ui/tooltip.tsx +30 -0
  77. package/src/components/ui/use-toast.ts +197 -0
  78. package/src/constants/index.ts +223 -0
  79. package/src/constants/resetCSS.ts +139 -0
  80. package/src/extension-bundle.ts +2 -0
  81. package/src/extensions/Attachment/Attachment.ts +144 -0
  82. package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +69 -0
  83. package/src/extensions/Attachment/components/NodeViewAttachment/FileIconString.ts +28 -0
  84. package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +155 -0
  85. package/src/extensions/Attachment/components/NodeViewAttachment/index.module.scss +23 -0
  86. package/src/extensions/Attachment/index.ts +1 -0
  87. package/src/extensions/BaseKit.ts +253 -0
  88. package/src/extensions/Blockquote/Blockquote.ts +31 -0
  89. package/src/extensions/Blockquote/index.ts +1 -0
  90. package/src/extensions/Bold/Bold.ts +26 -0
  91. package/src/extensions/Bold/index.ts +1 -0
  92. package/src/extensions/BulletList/BulletList.ts +28 -0
  93. package/src/extensions/BulletList/index.ts +1 -0
  94. package/src/extensions/Clear/Clear.ts +24 -0
  95. package/src/extensions/Clear/index.ts +1 -0
  96. package/src/extensions/Code/Code.ts +26 -0
  97. package/src/extensions/Code/index.ts +1 -0
  98. package/src/extensions/CodeBlock/CodeBlock.ts +54 -0
  99. package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +66 -0
  100. package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +89 -0
  101. package/src/extensions/CodeBlock/components/NodeViewCodeBlock/index.module.scss +81 -0
  102. package/src/extensions/CodeBlock/highlighter.ts +132 -0
  103. package/src/extensions/CodeBlock/index.ts +1 -0
  104. package/src/extensions/CodeBlock/shiki-plugin.ts +213 -0
  105. package/src/extensions/Color/Color.ts +52 -0
  106. package/src/extensions/Color/components/ColorActionButton.tsx +104 -0
  107. package/src/extensions/Color/index.ts +1 -0
  108. package/src/extensions/Document/Document.ts +8 -0
  109. package/src/extensions/Document/index.ts +1 -0
  110. package/src/extensions/Drawer/Drawer.ts +177 -0
  111. package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.module.scss +85 -0
  112. package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +598 -0
  113. package/src/extensions/Drawer/components/ControlDrawer/icon.tsx +500 -0
  114. package/src/extensions/Drawer/components/DrawerActiveButton.tsx +239 -0
  115. package/src/extensions/Drawer/components/EditDrawerBlock.tsx +238 -0
  116. package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +260 -0
  117. package/src/extensions/Drawer/index.ts +1 -0
  118. package/src/extensions/Emoji/Emoji.ts +146 -0
  119. package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +103 -0
  120. package/src/extensions/Emoji/components/EmojiList/emojis.ts +1858 -0
  121. package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +61 -0
  122. package/src/extensions/Emoji/index.ts +1 -0
  123. package/src/extensions/Excalidraw/Excalidraw.ts +123 -0
  124. package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +138 -0
  125. package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +178 -0
  126. package/src/extensions/Excalidraw/components/NodeViewExcalidraw/index.module.scss +43 -0
  127. package/src/extensions/Excalidraw/index.ts +1 -0
  128. package/src/extensions/ExportPdf/ExportPdf.ts +25 -0
  129. package/src/extensions/ExportPdf/index.ts +1 -0
  130. package/src/extensions/ExportWord/ExportWord.ts +87 -0
  131. package/src/extensions/ExportWord/index.ts +1 -0
  132. package/src/extensions/FontFamily/FontFamily.ts +64 -0
  133. package/src/extensions/FontFamily/components/FontFamilyButton.tsx +97 -0
  134. package/src/extensions/FontFamily/index.ts +1 -0
  135. package/src/extensions/FontSize/FontSize.ts +119 -0
  136. package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +84 -0
  137. package/src/extensions/FontSize/index.ts +1 -0
  138. package/src/extensions/FormatPainter/FormatPainter.ts +121 -0
  139. package/src/extensions/FormatPainter/index.ts +1 -0
  140. package/src/extensions/Heading/Heading.ts +57 -0
  141. package/src/extensions/Heading/components/HeadingButton.tsx +96 -0
  142. package/src/extensions/Heading/index.ts +1 -0
  143. package/src/extensions/Highlight/Highlight.ts +36 -0
  144. package/src/extensions/Highlight/components/HighlightActionButton.tsx +108 -0
  145. package/src/extensions/Highlight/index.ts +1 -0
  146. package/src/extensions/History/History.ts +39 -0
  147. package/src/extensions/History/components/HistoryActionButton.tsx +74 -0
  148. package/src/extensions/History/index.ts +1 -0
  149. package/src/extensions/HorizontalRule/HorizontalRule.ts +42 -0
  150. package/src/extensions/HorizontalRule/index.ts +1 -0
  151. package/src/extensions/Iframe/Iframe.ts +140 -0
  152. package/src/extensions/Iframe/components/IframeNodeView.tsx +92 -0
  153. package/src/extensions/Iframe/components/index.module.scss +40 -0
  154. package/src/extensions/Iframe/embed.ts +487 -0
  155. package/src/extensions/Iframe/index.ts +1 -0
  156. package/src/extensions/Image/Image.ts +303 -0
  157. package/src/extensions/Image/components/ActionImageButton.tsx +186 -0
  158. package/src/extensions/Image/components/ImageCropper.tsx +198 -0
  159. package/src/extensions/Image/components/ImageView.tsx +271 -0
  160. package/src/extensions/Image/index.ts +1 -0
  161. package/src/extensions/Image/store.ts +15 -0
  162. package/src/extensions/ImageGif/ImageGif.ts +176 -0
  163. package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +138 -0
  164. package/src/extensions/ImageGif/components/ImageGifView.tsx +260 -0
  165. package/src/extensions/ImageGif/index.ts +1 -0
  166. package/src/extensions/ImportWord/ImportWord.ts +52 -0
  167. package/src/extensions/ImportWord/components/ImportWordButton.tsx +151 -0
  168. package/src/extensions/ImportWord/index.ts +1 -0
  169. package/src/extensions/Indent/Indent.ts +110 -0
  170. package/src/extensions/Indent/index.ts +1 -0
  171. package/src/extensions/Italic/Italic.ts +29 -0
  172. package/src/extensions/Italic/index.ts +1 -0
  173. package/src/extensions/Katex/Katex.ts +109 -0
  174. package/src/extensions/Katex/components/KatexActiveButton.tsx +117 -0
  175. package/src/extensions/Katex/components/KatexWrapper.tsx +53 -0
  176. package/src/extensions/Katex/index.ts +1 -0
  177. package/src/extensions/LineHeight/LineHeight.ts +76 -0
  178. package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +93 -0
  179. package/src/extensions/LineHeight/index.ts +1 -0
  180. package/src/extensions/Link/Link.ts +92 -0
  181. package/src/extensions/Link/components/LinkEditBlock.tsx +110 -0
  182. package/src/extensions/Link/components/LinkEditPopover.tsx +46 -0
  183. package/src/extensions/Link/components/LinkViewBlock.tsx +54 -0
  184. package/src/extensions/Link/index.ts +1 -0
  185. package/src/extensions/ListItem/ListItem.ts +1 -0
  186. package/src/extensions/ListItem/index.ts +1 -0
  187. package/src/extensions/Mention/Mention.ts +100 -0
  188. package/src/extensions/Mention/components/NodeViewMentionList/NodeViewMentionList.tsx +94 -0
  189. package/src/extensions/Mention/components/NodeViewMentionList/index.module.scss +38 -0
  190. package/src/extensions/Mention/index.ts +1 -0
  191. package/src/extensions/Mermaid/Mermaid.ts +177 -0
  192. package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +155 -0
  193. package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +151 -0
  194. package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +260 -0
  195. package/src/extensions/Mermaid/index.ts +1 -0
  196. package/src/extensions/MoreMark/MoreMark.ts +102 -0
  197. package/src/extensions/MoreMark/components/ActionMoreButton.tsx +97 -0
  198. package/src/extensions/MoreMark/index.ts +1 -0
  199. package/src/extensions/MultiColumn/Column.ts +36 -0
  200. package/src/extensions/MultiColumn/MultiColumn.ts +111 -0
  201. package/src/extensions/MultiColumn/components/ColumnActionButton.ts +22 -0
  202. package/src/extensions/MultiColumn/index.ts +3 -0
  203. package/src/extensions/OrderedList/OrderedList.ts +28 -0
  204. package/src/extensions/OrderedList/index.ts +1 -0
  205. package/src/extensions/SearchAndReplace/SearchAndReplace.ts +395 -0
  206. package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +190 -0
  207. package/src/extensions/SearchAndReplace/index.ts +1 -0
  208. package/src/extensions/Selection/Selection.ts +32 -0
  209. package/src/extensions/Selection/index.ts +1 -0
  210. package/src/extensions/SlashCommand/SlashCommand.ts +255 -0
  211. package/src/extensions/SlashCommand/components/CommandsList.tsx +180 -0
  212. package/src/extensions/SlashCommand/groups.ts +183 -0
  213. package/src/extensions/SlashCommand/index.ts +1 -0
  214. package/src/extensions/SlashCommand/types.ts +24 -0
  215. package/src/extensions/Strike/Strike.ts +26 -0
  216. package/src/extensions/Strike/index.ts +1 -0
  217. package/src/extensions/Subscript/Subscript.ts +88 -0
  218. package/src/extensions/Subscript/index.ts +1 -0
  219. package/src/extensions/Table/Cell.ts +131 -0
  220. package/src/extensions/Table/Header.ts +93 -0
  221. package/src/extensions/Table/Row.ts +8 -0
  222. package/src/extensions/Table/Table.ts +60 -0
  223. package/src/extensions/Table/cell-background.ts +112 -0
  224. package/src/extensions/Table/components/CreateTablePopover.tsx +132 -0
  225. package/src/extensions/Table/components/TableActionButton.tsx +42 -0
  226. package/src/extensions/Table/index.ts +6 -0
  227. package/src/extensions/Table/utils.ts +352 -0
  228. package/src/extensions/TableOfContent/TableOfContent.ts +124 -0
  229. package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +116 -0
  230. package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +27 -0
  231. package/src/extensions/TableOfContent/components/index.module.scss +40 -0
  232. package/src/extensions/TableOfContent/index.ts +1 -0
  233. package/src/extensions/TaskList/TaskList.ts +46 -0
  234. package/src/extensions/TaskList/index.ts +1 -0
  235. package/src/extensions/TextAlign/TextAlign.ts +68 -0
  236. package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +103 -0
  237. package/src/extensions/TextAlign/index.ts +1 -0
  238. package/src/extensions/TextBubble/TextBubble.ts +22 -0
  239. package/src/extensions/TextBubble/components/TextDropdown.tsx +146 -0
  240. package/src/extensions/TextBubble/index.ts +1 -0
  241. package/src/extensions/TextDirection/TextDirection.ts +97 -0
  242. package/src/extensions/TextDirection/components/TextDirectionButton.tsx +103 -0
  243. package/src/extensions/TextDirection/index.ts +1 -0
  244. package/src/extensions/TrailingNode/TrailingNode.ts +71 -0
  245. package/src/extensions/TrailingNode/index.ts +1 -0
  246. package/src/extensions/Twitter/Twitter.ts +161 -0
  247. package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +68 -0
  248. package/src/extensions/Twitter/components/NodeViewTweet.tsx +30 -0
  249. package/src/extensions/Twitter/components/TwitterActiveButton.tsx +41 -0
  250. package/src/extensions/Twitter/index.ts +1 -0
  251. package/src/extensions/UnderLine/Underline.ts +30 -0
  252. package/src/extensions/UnderLine/index.ts +1 -0
  253. package/src/extensions/Video/Video.ts +204 -0
  254. package/src/extensions/Video/components/ActiveVideoButton.tsx +191 -0
  255. package/src/extensions/Video/index.ts +1 -0
  256. package/src/extensions/Video/store.ts +15 -0
  257. package/src/extensions/index.ts +122 -0
  258. package/src/hooks/useActive.tsx +24 -0
  259. package/src/hooks/useAttributes.tsx +45 -0
  260. package/src/hooks/useCopy.tsx +20 -0
  261. package/src/hooks/useEditorState.tsx +23 -0
  262. package/src/hooks/useExtension.tsx +29 -0
  263. package/src/index.ts +8 -0
  264. package/src/lib/utils.ts +7 -0
  265. package/src/locale-bundle.ts +3 -0
  266. package/src/locales/en.ts +173 -0
  267. package/src/locales/hu.ts +173 -0
  268. package/src/locales/index.tsx +163 -0
  269. package/src/locales/pt-br.ts +173 -0
  270. package/src/locales/vi.ts +173 -0
  271. package/src/locales/zh-cn.ts +173 -0
  272. package/src/plugins/DragHandle/index.ts +375 -0
  273. package/src/plugins/DragHandle/range.ts +114 -0
  274. package/src/plugins/DragHandle/utils.ts +80 -0
  275. package/src/plugins/image-upload.ts +160 -0
  276. package/src/store/ProviderRichText.tsx +53 -0
  277. package/src/store/editableEditor.ts +15 -0
  278. package/src/store/fast-context.tsx +70 -0
  279. package/src/store/store.ts +35 -0
  280. package/src/styles/ProseMirror.scss +176 -0
  281. package/src/styles/columns.scss +23 -0
  282. package/src/styles/editor.scss +411 -0
  283. package/src/styles/global.scss +87 -0
  284. package/src/styles/index.scss +5 -0
  285. package/src/styles/mention.scss +6 -0
  286. package/src/theme/theme.ts +15 -0
  287. package/src/types.ts +271 -0
  288. package/src/utils/_event.ts +55 -0
  289. package/src/utils/color.ts +67 -0
  290. package/src/utils/columns.ts +142 -0
  291. package/src/utils/customEvents/customEvents.ts +18 -0
  292. package/src/utils/customEvents/events.constant.ts +11 -0
  293. package/src/utils/delete-node.ts +46 -0
  294. package/src/utils/dom-dataset.ts +121 -0
  295. package/src/utils/download.ts +17 -0
  296. package/src/utils/dynamicCSS.ts +192 -0
  297. package/src/utils/editor-container-size.ts +28 -0
  298. package/src/utils/file.ts +112 -0
  299. package/src/utils/getRenderContainer.ts +41 -0
  300. package/src/utils/indent.ts +99 -0
  301. package/src/utils/is-mobile.ts +57 -0
  302. package/src/utils/json.ts +18 -0
  303. package/src/utils/line-height.ts +109 -0
  304. package/src/utils/lru-cache.ts +145 -0
  305. package/src/utils/mitt.ts +114 -0
  306. package/src/utils/node.ts +92 -0
  307. package/src/utils/pdf.ts +72 -0
  308. package/src/utils/plateform.ts +49 -0
  309. package/src/utils/shortId.ts +5 -0
  310. package/src/utils/storage.ts +18 -0
  311. package/src/utils/utils.ts +71 -0
  312. package/src/vite-env.d.ts +3 -0
  313. package/lib/RichTextEditor-BwbqJLnA.cjs +0 -141
  314. package/lib/RichTextEditor-iGJ6-rbq.js +0 -8833
  315. package/lib/extension-bundle.cjs +0 -33
  316. package/lib/extension-bundle.d.cts +0 -947
  317. package/lib/extension-bundle.d.ts +0 -947
  318. package/lib/extension-bundle.js +0 -5755
  319. package/lib/index-DV-nXpU1.cjs +0 -1
  320. package/lib/index-M6H3FoBi.js +0 -1147
  321. package/lib/index.cjs +0 -1
  322. package/lib/index.d.cts +0 -513
  323. package/lib/index.d.ts +0 -513
  324. package/lib/index.js +0 -16
  325. package/lib/locale-bundle.cjs +0 -1
  326. package/lib/locale-bundle.d.cts +0 -1140
  327. package/lib/locale-bundle.d.ts +0 -1140
  328. package/lib/locale-bundle.js +0 -9
  329. package/lib/style.css +0 -1
  330. package/lib/tiptap-DkWHMWDt.js +0 -6061
  331. package/lib/tiptap-gBG-1T-V.cjs +0 -116
  332. package/lib/vendor-BJ0Yf78E.cjs +0 -8114
  333. package/lib/vendor-Cpa6z-M0.js +0 -67575
@@ -1,947 +0,0 @@
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
- painter: {
731
- setPainter: (marks: Mark[]) => ReturnType;
732
- };
733
- }
734
- }
735
-
736
-
737
- declare module '@tiptap/core' {
738
- interface Commands<ReturnType> {
739
- indent: {
740
- /**
741
- * Set the indent attribute
742
- */
743
- indent: () => ReturnType;
744
- /**
745
- * Set the outdent attribute
746
- */
747
- outdent: () => ReturnType;
748
- };
749
- }
750
- }
751
-
752
-
753
- declare module '@tiptap/core' {
754
- interface Commands<ReturnType> {
755
- imageUpload: {
756
- /**
757
- * Add an image
758
- */
759
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
760
- /**
761
- * Update an image
762
- */
763
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
764
- /**
765
- * Set image alignment
766
- */
767
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
768
- };
769
- }
770
- }
771
-
772
-
773
- declare module '@tiptap/core' {
774
- interface Commands<ReturnType> {
775
- columns: {
776
- insertColumns: (attrs?: {
777
- cols: number;
778
- }) => ReturnType;
779
- addColBefore: () => ReturnType;
780
- addColAfter: () => ReturnType;
781
- deleteCol: () => ReturnType;
782
- };
783
- }
784
- }
785
-
786
-
787
- declare module '@tiptap/core' {
788
- interface Commands<ReturnType> {
789
- lineHeight: {
790
- setLineHeight: (lineHeight: string) => ReturnType;
791
- unsetLineHeight: () => ReturnType;
792
- };
793
- }
794
- }
795
-
796
-
797
- declare module '@tiptap/core' {
798
- interface Commands<ReturnType> {
799
- tableCellBackground: {
800
- setTableCellBackground: (color: string) => ReturnType;
801
- unsetTableCellBackground: () => ReturnType;
802
- };
803
- }
804
- }
805
-
806
-
807
- declare module '@tiptap/core' {
808
- interface Commands<ReturnType> {
809
- iframe: {
810
- /**
811
- * Add an iframe
812
- */
813
- setIframe: (options: {
814
- src: string;
815
- service: string;
816
- }) => ReturnType;
817
- };
818
- }
819
- }
820
-
821
-
822
- declare module '@tiptap/core' {
823
- interface Commands<ReturnType> {
824
- search: {
825
- setSearchTerm: (searchTerm: string) => ReturnType;
826
- setReplaceTerm: (replaceTerm: string) => ReturnType;
827
- replace: () => ReturnType;
828
- replaceAll: () => ReturnType;
829
- goToPrevSearchResult: () => void;
830
- goToNextSearchResult: () => void;
831
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
832
- };
833
- }
834
- }
835
-
836
-
837
- declare module '@tiptap/core' {
838
- interface Commands<ReturnType> {
839
- tableOfContents: {
840
- setTableOfContents: () => ReturnType;
841
- removeTableOfContents: () => ReturnType;
842
- };
843
- }
844
- }
845
-
846
-
847
- declare module '@tiptap/core' {
848
- interface Commands<ReturnType> {
849
- emoji: {
850
- setEmoji: (emoji: {
851
- name: string;
852
- emoji: string;
853
- }) => ReturnType;
854
- };
855
- }
856
- }
857
-
858
-
859
- declare module '@tiptap/core' {
860
- interface Commands<ReturnType> {
861
- exportWord: {
862
- exportToWord: () => ReturnType;
863
- };
864
- }
865
- }
866
-
867
-
868
- declare module '@tiptap/core' {
869
- interface Commands<ReturnType> {
870
- excalidraw: {
871
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
872
- };
873
- }
874
- }
875
-
876
-
877
- declare module '@tiptap/core' {
878
- interface Commands<ReturnType> {
879
- katex: {
880
- setKatex: (arg?: IKatexAttrs) => ReturnType;
881
- };
882
- }
883
- }
884
-
885
-
886
- declare module '@tiptap/core' {
887
- interface Commands<ReturnType> {
888
- mermaid: {
889
- setMermaid: (options: any, replace?: any) => ReturnType;
890
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
891
- };
892
- }
893
- }
894
-
895
-
896
- declare module '@tiptap/core' {
897
- interface Commands<ReturnType> {
898
- attachment: {
899
- setAttachment: (attrs?: unknown) => ReturnType;
900
- };
901
- }
902
- }
903
-
904
-
905
- declare module '@tiptap/core' {
906
- interface Commands<ReturnType> {
907
- drawer: {
908
- setDrawer: (options: any, replace?: any) => ReturnType;
909
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
910
- };
911
- }
912
- }
913
-
914
-
915
- declare module '@tiptap/core' {
916
- interface Commands<ReturnType> {
917
- twitter: {
918
- /**
919
- * Insert a tweet
920
- * @param options The tweet attributes
921
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
922
- */
923
- setTweet: (options: SetTweetOptions) => ReturnType;
924
- updateTweet: (options: SetTweetOptions) => ReturnType;
925
- };
926
- }
927
- }
928
-
929
-
930
- declare module '@tiptap/core' {
931
- interface Commands<ReturnType> {
932
- imageGifUpload: {
933
- /**
934
- * Add an image gif
935
- */
936
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
937
- /**
938
- * Update an image gif
939
- */
940
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
941
- /**
942
- * Set image alignment
943
- */
944
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
945
- };
946
- }
947
- }