reactjs-tiptap-editor 0.2.29 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionMenuButton-Bycn676n.js +33 -0
- package/lib/ActionMenuButton-CpFNwSUZ.cjs +1 -0
- package/lib/Attachment.cjs +19 -0
- package/lib/Attachment.d.cts +344 -0
- package/lib/Attachment.d.ts +344 -0
- package/lib/Attachment.js +259 -0
- package/lib/Blockquote.cjs +1 -0
- package/lib/Blockquote.d.cts +343 -0
- package/lib/Blockquote.d.ts +343 -0
- package/lib/Blockquote.js +65 -0
- package/lib/Bold.cjs +1 -0
- package/lib/Bold.d.cts +343 -0
- package/lib/Bold.d.ts +343 -0
- package/lib/Bold.js +90 -0
- package/lib/BulletList.cjs +1 -0
- package/lib/BulletList.d.cts +343 -0
- package/lib/BulletList.d.ts +343 -0
- package/lib/BulletList.js +72 -0
- package/lib/Clear.cjs +1 -0
- package/lib/Clear.d.cts +342 -0
- package/lib/Clear.d.ts +342 -0
- package/lib/Clear.js +23 -0
- package/lib/Code.cjs +1 -0
- package/lib/Code.d.cts +343 -0
- package/lib/Code.d.ts +343 -0
- package/lib/Code.js +70 -0
- package/lib/CodeBlock.cjs +39 -0
- package/lib/CodeBlock.d.cts +352 -0
- package/lib/CodeBlock.d.ts +352 -0
- package/lib/CodeBlock.js +3639 -0
- package/lib/Color.cjs +1 -0
- package/lib/Color.d.cts +350 -0
- package/lib/Color.d.ts +350 -0
- package/lib/Color.js +141 -0
- package/lib/Document.cjs +1 -0
- package/lib/Document.d.cts +272 -0
- package/lib/Document.d.ts +272 -0
- package/lib/Document.js +13 -0
- package/lib/Drawer-BZadE1gM.js +1367 -0
- package/lib/Drawer-rwnFvgZR.cjs +1 -0
- package/lib/Drawer.cjs +1 -0
- package/lib/Drawer.d.cts +344 -0
- package/lib/Drawer.d.ts +344 -0
- package/lib/Drawer.js +7 -0
- package/lib/Emoji.cjs +1 -0
- package/lib/Emoji.d.cts +277 -0
- package/lib/Emoji.d.ts +277 -0
- package/lib/Emoji.js +2168 -0
- package/lib/Excalidraw-B2414Smc.js +651 -0
- package/lib/Excalidraw-D21vMFe0.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -0
- package/lib/Excalidraw.d.cts +278 -0
- package/lib/Excalidraw.d.ts +278 -0
- package/lib/Excalidraw.js +6 -0
- package/lib/ExportPdf.cjs +15 -0
- package/lib/ExportPdf.d.cts +270 -0
- package/lib/ExportPdf.d.ts +270 -0
- package/lib/ExportPdf.js +67 -0
- package/lib/ExportWord.cjs +1 -0
- package/lib/ExportWord.d.cts +341 -0
- package/lib/ExportWord.d.ts +341 -0
- package/lib/ExportWord.js +72 -0
- package/lib/FontFamily.cjs +1 -0
- package/lib/FontFamily.d.cts +354 -0
- package/lib/FontFamily.d.ts +354 -0
- package/lib/FontFamily.js +136 -0
- package/lib/FontSize.cjs +1 -0
- package/lib/FontSize.d.cts +359 -0
- package/lib/FontSize.d.ts +359 -0
- package/lib/FontSize.js +110 -0
- package/lib/FormatPainter.cjs +1 -0
- package/lib/FormatPainter.d.cts +353 -0
- package/lib/FormatPainter.d.ts +353 -0
- package/lib/FormatPainter.js +74 -0
- package/lib/Heading.cjs +1 -0
- package/lib/Heading.d.cts +343 -0
- package/lib/Heading.d.ts +343 -0
- package/lib/Heading.js +147 -0
- package/lib/Highlight.cjs +1 -0
- package/lib/Highlight.d.cts +344 -0
- package/lib/Highlight.d.ts +344 -0
- package/lib/Highlight.js +85 -0
- package/lib/History.cjs +1 -0
- package/lib/History.d.cts +343 -0
- package/lib/History.d.ts +343 -0
- package/lib/History.js +431 -0
- package/lib/HorizontalRule.cjs +1 -0
- package/lib/HorizontalRule.d.cts +343 -0
- package/lib/HorizontalRule.d.ts +343 -0
- package/lib/HorizontalRule.js +87 -0
- package/lib/Iframe.cjs +1 -0
- package/lib/Iframe.d.cts +277 -0
- package/lib/Iframe.d.ts +277 -0
- package/lib/Iframe.js +6 -0
- package/lib/Image.cjs +1 -0
- package/lib/Image.d.cts +370 -0
- package/lib/Image.d.ts +370 -0
- package/lib/Image.js +7 -0
- package/lib/ImageGif.cjs +1 -0
- package/lib/ImageGif.d.cts +292 -0
- package/lib/ImageGif.d.ts +292 -0
- package/lib/ImageGif.js +7 -0
- package/lib/ImportWord.cjs +231 -0
- package/lib/ImportWord.d.cts +353 -0
- package/lib/ImportWord.d.ts +353 -0
- package/lib/ImportWord.js +16620 -0
- package/lib/Indent.cjs +1 -0
- package/lib/Indent.d.cts +344 -0
- package/lib/Indent.d.ts +344 -0
- package/lib/Indent.js +78 -0
- package/lib/Italic.cjs +1 -0
- package/lib/Italic.d.cts +343 -0
- package/lib/Italic.d.ts +343 -0
- package/lib/Italic.js +91 -0
- package/lib/Katex.cjs +1 -0
- package/lib/Katex.d.cts +279 -0
- package/lib/Katex.d.ts +279 -0
- package/lib/Katex.js +197 -0
- package/lib/LineHeight.cjs +1 -0
- package/lib/LineHeight.d.cts +347 -0
- package/lib/LineHeight.d.ts +347 -0
- package/lib/LineHeight.js +137 -0
- package/lib/Link.cjs +5 -0
- package/lib/Link.d.cts +343 -0
- package/lib/Link.d.ts +343 -0
- package/lib/Link.js +1048 -0
- package/lib/ListItem.cjs +1 -0
- package/lib/ListItem.d.cts +269 -0
- package/lib/ListItem.d.ts +269 -0
- package/lib/ListItem.js +33 -0
- package/lib/Mention.cjs +1 -0
- package/lib/Mention.d.cts +272 -0
- package/lib/Mention.d.ts +272 -0
- package/lib/Mention.js +233 -0
- package/lib/Mermaid.cjs +2 -0
- package/lib/Mermaid.d.cts +344 -0
- package/lib/Mermaid.d.ts +344 -0
- package/lib/Mermaid.js +390 -0
- package/lib/MoreMark.cjs +1 -0
- package/lib/MoreMark.d.cts +355 -0
- package/lib/MoreMark.d.ts +355 -0
- package/lib/MoreMark.js +95 -0
- package/lib/MultiColumn.cjs +1 -0
- package/lib/MultiColumn.d.cts +277 -0
- package/lib/MultiColumn.d.ts +277 -0
- package/lib/MultiColumn.js +8 -0
- package/lib/OrderedList.cjs +1 -0
- package/lib/OrderedList.d.cts +343 -0
- package/lib/OrderedList.d.ts +343 -0
- package/lib/OrderedList.js +90 -0
- package/lib/RichTextEditor-Cy9XKEI5.js +11178 -0
- package/lib/RichTextEditor-DkpDEr5U.cjs +137 -0
- package/lib/SearchAndReplace.cjs +1 -0
- package/lib/SearchAndReplace.d.cts +358 -0
- package/lib/SearchAndReplace.d.ts +358 -0
- package/lib/SearchAndReplace.js +339 -0
- package/lib/Selection.cjs +1 -0
- package/lib/Selection.d.cts +272 -0
- package/lib/Selection.d.ts +272 -0
- package/lib/Selection.js +25 -0
- package/lib/SlashCommand.cjs +1 -0
- package/lib/SlashCommand.d.cts +299 -0
- package/lib/SlashCommand.d.ts +299 -0
- package/lib/SlashCommand.js +369 -0
- package/lib/Strike.cjs +1 -0
- package/lib/Strike.d.cts +343 -0
- package/lib/Strike.d.ts +343 -0
- package/lib/Strike.js +80 -0
- package/lib/SubAndSuperScript.cjs +1 -0
- package/lib/SubAndSuperScript.d.cts +358 -0
- package/lib/SubAndSuperScript.d.ts +358 -0
- package/lib/SubAndSuperScript.js +41 -0
- package/lib/Table.cjs +1 -0
- package/lib/Table.d.cts +366 -0
- package/lib/Table.d.ts +366 -0
- package/lib/Table.js +2165 -0
- package/lib/TableOfContent.cjs +1 -0
- package/lib/TableOfContent.d.cts +274 -0
- package/lib/TableOfContent.d.ts +274 -0
- package/lib/TableOfContent.js +184 -0
- package/lib/TaskList.cjs +1 -0
- package/lib/TaskList.d.cts +349 -0
- package/lib/TaskList.d.ts +349 -0
- package/lib/TaskList.js +175 -0
- package/lib/TextAlign.cjs +1 -0
- package/lib/TextAlign.d.cts +353 -0
- package/lib/TextAlign.d.ts +353 -0
- package/lib/TextAlign.js +165 -0
- package/lib/TextBubble.cjs +1 -0
- package/lib/TextBubble.d.cts +343 -0
- package/lib/TextBubble.d.ts +343 -0
- package/lib/TextBubble.js +131 -0
- package/lib/TextDirection.cjs +1 -0
- package/lib/TextDirection.d.cts +270 -0
- package/lib/TextDirection.d.ts +270 -0
- package/lib/TextDirection.js +142 -0
- package/lib/TextUnderline.cjs +1 -0
- package/lib/TextUnderline.d.cts +343 -0
- package/lib/TextUnderline.d.ts +343 -0
- package/lib/TextUnderline.js +61 -0
- package/lib/TrailingNode.cjs +1 -0
- package/lib/TrailingNode.d.cts +280 -0
- package/lib/TrailingNode.d.ts +280 -0
- package/lib/TrailingNode.js +41 -0
- package/lib/Twitter-B_tSItrW.js +1743 -0
- package/lib/Twitter-CfDC4bFV.cjs +17 -0
- package/lib/Twitter.cjs +1 -0
- package/lib/Twitter.d.cts +295 -0
- package/lib/Twitter.d.ts +295 -0
- package/lib/Twitter.js +6 -0
- package/lib/Video.cjs +1 -0
- package/lib/Video.d.cts +371 -0
- package/lib/Video.d.ts +371 -0
- package/lib/Video.js +6 -0
- package/lib/bubble-extra.cjs +2 -0
- package/lib/bubble-extra.d.cts +294 -0
- package/lib/bubble-extra.d.ts +294 -0
- package/lib/bubble-extra.js +623 -0
- package/lib/dom-dataset-CAXnsjYE.cjs +33 -0
- package/lib/dom-dataset-CJ7GyQ2E.js +999 -0
- package/lib/index-COecBbaE.cjs +89 -0
- package/lib/index-ClFtfQ0J.cjs +1 -0
- package/lib/index-CvYIX2-x.js +129 -0
- package/lib/index-CySbCeQd.cjs +1 -0
- package/lib/{index-CO-iymkb.js → index-D9llIWB5.js} +442 -101
- package/lib/index-DXBa3JBo.js +46 -0
- package/lib/index-DjP7Onch.cjs +1 -0
- package/lib/index-Drmyqk9P.js +12322 -0
- package/lib/index-DuhDIOel.js +76 -0
- package/lib/index-LbrE7K9i.cjs +1 -0
- package/lib/index.cjs +2 -1
- package/lib/index.d.cts +290 -108
- package/lib/index.d.ts +290 -108
- package/lib/index.js +587 -13
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +108 -108
- package/lib/locale-bundle.d.ts +108 -108
- package/lib/locale-bundle.js +1 -1
- package/lib/shortId-Bfj8TyNr.cjs +2 -0
- package/lib/shortId-WJVkrvml.js +30 -0
- package/lib/style.css +1 -1
- package/lib/textarea-B45fP3gP.cjs +1 -0
- package/lib/textarea-DXTdXr2y.js +20 -0
- package/package.json +678 -15
- package/lib/RichTextEditor-Ce2IeNE6.js +0 -8265
- package/lib/RichTextEditor-hDDApaDD.cjs +0 -136
- package/lib/extension-bundle.cjs +0 -33
- package/lib/extension-bundle.d.cts +0 -951
- package/lib/extension-bundle.d.ts +0 -951
- package/lib/extension-bundle.js +0 -5982
- package/lib/index-CJ6Hb9MN.cjs +0 -1
- package/lib/tiptap-DOP8lVCQ.js +0 -5950
- package/lib/tiptap-Dq62HiQ9.cjs +0 -113
- package/lib/vendor-BbgkyoD-.js +0 -40297
- package/lib/vendor-DdwtMmSr.cjs +0 -302
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { N as n, w as s, m as p } from "./index-Drmyqk9P.js";
|
|
2
|
+
import { A as u } from "./RichTextEditor-Cy9XKEI5.js";
|
|
3
|
+
const l = "listItem", i = "textStyle", o = /^\s*([-+*])\s$/, a = n.create({
|
|
4
|
+
name: "bulletList",
|
|
5
|
+
addOptions() {
|
|
6
|
+
return {
|
|
7
|
+
itemTypeName: "listItem",
|
|
8
|
+
HTMLAttributes: {},
|
|
9
|
+
keepMarks: !1,
|
|
10
|
+
keepAttributes: !1
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
group: "block list",
|
|
14
|
+
content() {
|
|
15
|
+
return `${this.options.itemTypeName}+`;
|
|
16
|
+
},
|
|
17
|
+
parseHTML() {
|
|
18
|
+
return [
|
|
19
|
+
{ tag: "ul" }
|
|
20
|
+
];
|
|
21
|
+
},
|
|
22
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
23
|
+
return ["ul", p(this.options.HTMLAttributes, t), 0];
|
|
24
|
+
},
|
|
25
|
+
addCommands() {
|
|
26
|
+
return {
|
|
27
|
+
toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(l, this.editor.getAttributes(i)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
addKeyboardShortcuts() {
|
|
31
|
+
return {
|
|
32
|
+
"Mod-Shift-8": () => this.editor.commands.toggleBulletList()
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
addInputRules() {
|
|
36
|
+
let t = s({
|
|
37
|
+
find: o,
|
|
38
|
+
type: this.type
|
|
39
|
+
});
|
|
40
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (t = s({
|
|
41
|
+
find: o,
|
|
42
|
+
type: this.type,
|
|
43
|
+
keepMarks: this.options.keepMarks,
|
|
44
|
+
keepAttributes: this.options.keepAttributes,
|
|
45
|
+
getAttributes: () => this.editor.getAttributes(i),
|
|
46
|
+
editor: this.editor
|
|
47
|
+
})), [
|
|
48
|
+
t
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
}), h = /* @__PURE__ */ a.extend({
|
|
52
|
+
addOptions() {
|
|
53
|
+
var t;
|
|
54
|
+
return {
|
|
55
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
56
|
+
button: ({ editor: e, t: r }) => ({
|
|
57
|
+
component: u,
|
|
58
|
+
componentProps: {
|
|
59
|
+
action: () => e.commands.toggleBulletList(),
|
|
60
|
+
isActive: () => e.isActive("bulletList") || !1,
|
|
61
|
+
disabled: !1,
|
|
62
|
+
shortcutKeys: ["shift", "mod", "8"],
|
|
63
|
+
icon: "List",
|
|
64
|
+
tooltip: r("editor.bulletlist.tooltip")
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
h as BulletList
|
|
72
|
+
};
|
package/lib/Clear.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-COecBbaE.cjs"),r=require("./RichTextEditor-DkpDEr5U.cjs"),a=n.Node.create({name:"clear",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:o})=>({component:r.ActionButton,componentProps:{action:()=>t.chain().focus().clearNodes().unsetAllMarks().run(),disabled:!t.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:o("editor.clear.tooltip")}})}}});exports.Clear=a;
|
package/lib/Clear.d.cts
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import { Extension } from '@tiptap/core';
|
|
3
|
+
import { Node as Node_2 } from '@tiptap/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represents the ButtonView function.
|
|
7
|
+
*/
|
|
8
|
+
declare type ButtonView<T = any> = (options: ButtonViewParams<T>) => ButtonViewReturn | ButtonViewReturn[];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents the parameters for the ButtonView function.
|
|
12
|
+
*/
|
|
13
|
+
declare interface ButtonViewParams<T = any> {
|
|
14
|
+
/** Editor object */
|
|
15
|
+
editor: Editor;
|
|
16
|
+
/** Extension object */
|
|
17
|
+
extension: Extension<T>;
|
|
18
|
+
/** Translation function */
|
|
19
|
+
t: (path: string) => string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents the return value for the ButtonView component.
|
|
24
|
+
*/
|
|
25
|
+
declare interface ButtonViewReturn {
|
|
26
|
+
/** Component */
|
|
27
|
+
component: unknown;
|
|
28
|
+
/** Component props */
|
|
29
|
+
componentProps: ButtonViewReturnComponentProps;
|
|
30
|
+
/** Component slots */
|
|
31
|
+
componentSlots?: ButtonViewReturnComponentSlots;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Represents the props for the ButtonView component.
|
|
36
|
+
*/
|
|
37
|
+
declare interface ButtonViewReturnComponentProps {
|
|
38
|
+
/** Method triggered when action is performed */
|
|
39
|
+
action?: (value?: any) => void;
|
|
40
|
+
/** Whether it is in the active state */
|
|
41
|
+
isActive?: () => boolean;
|
|
42
|
+
/** Button icon */
|
|
43
|
+
icon?: any;
|
|
44
|
+
/** Text displayed on hover */
|
|
45
|
+
tooltip?: string;
|
|
46
|
+
[x: string]: any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Represents the slots for the ButtonView component.
|
|
51
|
+
*/
|
|
52
|
+
declare interface ButtonViewReturnComponentSlots {
|
|
53
|
+
/** Dialog slot */
|
|
54
|
+
dialog: () => any;
|
|
55
|
+
[x: string]: () => any;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare const Clear: Node_2<ClearOptions, any>;
|
|
59
|
+
|
|
60
|
+
export declare interface ClearOptions extends GeneralOptions<ClearOptions> {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Represents the general options for Tiptap extensions.
|
|
65
|
+
*/
|
|
66
|
+
declare interface GeneralOptions<T> {
|
|
67
|
+
/** Enabled divider */
|
|
68
|
+
divider: boolean;
|
|
69
|
+
/** Enabled spacer */
|
|
70
|
+
spacer: boolean;
|
|
71
|
+
/** Button view function */
|
|
72
|
+
button: ButtonView<T>;
|
|
73
|
+
/** Show on Toolbar */
|
|
74
|
+
toolbar?: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { }
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
declare module '@tiptap/core' {
|
|
81
|
+
interface Commands<ReturnType> {
|
|
82
|
+
attachment: {
|
|
83
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
declare module '@tiptap/core' {
|
|
90
|
+
interface Commands<ReturnType> {
|
|
91
|
+
setCodeBlock: {
|
|
92
|
+
setCodeBlock: (options?: any) => ReturnType;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
declare module '@tiptap/core' {
|
|
99
|
+
interface Commands<ReturnType> {
|
|
100
|
+
excalidraw: {
|
|
101
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
declare module '@tiptap/core' {
|
|
108
|
+
interface Commands<ReturnType> {
|
|
109
|
+
emoji: {
|
|
110
|
+
setEmoji: (emoji: {
|
|
111
|
+
name: string;
|
|
112
|
+
emoji: string;
|
|
113
|
+
}) => ReturnType;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
declare module '@tiptap/core' {
|
|
120
|
+
interface Commands<ReturnType> {
|
|
121
|
+
drawer: {
|
|
122
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
123
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
declare module '@tiptap/core' {
|
|
130
|
+
interface Commands<ReturnType> {
|
|
131
|
+
exportWord: {
|
|
132
|
+
exportToWord: () => ReturnType;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
declare module '@tiptap/core' {
|
|
139
|
+
interface Commands<ReturnType> {
|
|
140
|
+
fontSize: {
|
|
141
|
+
/**
|
|
142
|
+
* Set the text font size. ex: "12px", "2em", or "small". Must be a valid
|
|
143
|
+
* CSS font-size
|
|
144
|
+
* (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
|
|
145
|
+
*/
|
|
146
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
147
|
+
/**
|
|
148
|
+
* Unset the font size
|
|
149
|
+
*/
|
|
150
|
+
unsetFontSize: () => ReturnType;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
declare module '@tiptap/core' {
|
|
157
|
+
interface Commands<ReturnType> {
|
|
158
|
+
painter: {
|
|
159
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
declare module '@tiptap/core' {
|
|
166
|
+
interface Commands<ReturnType> {
|
|
167
|
+
iframe: {
|
|
168
|
+
/**
|
|
169
|
+
* Add an iframe
|
|
170
|
+
*/
|
|
171
|
+
setIframe: (options: {
|
|
172
|
+
src: string;
|
|
173
|
+
service: string;
|
|
174
|
+
}) => ReturnType;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
declare module '@tiptap/core' {
|
|
181
|
+
interface Commands<ReturnType> {
|
|
182
|
+
imageUpload: {
|
|
183
|
+
/**
|
|
184
|
+
* Add an image
|
|
185
|
+
*/
|
|
186
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
187
|
+
/**
|
|
188
|
+
* Update an image
|
|
189
|
+
*/
|
|
190
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
191
|
+
/**
|
|
192
|
+
* Set image alignment
|
|
193
|
+
*/
|
|
194
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
declare module '@tiptap/core' {
|
|
201
|
+
interface Commands<ReturnType> {
|
|
202
|
+
imageGifUpload: {
|
|
203
|
+
/**
|
|
204
|
+
* Add an image gif
|
|
205
|
+
*/
|
|
206
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
207
|
+
/**
|
|
208
|
+
* Update an image gif
|
|
209
|
+
*/
|
|
210
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
211
|
+
/**
|
|
212
|
+
* Set image alignment
|
|
213
|
+
*/
|
|
214
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
declare module '@tiptap/core' {
|
|
221
|
+
interface Commands<ReturnType> {
|
|
222
|
+
indent: {
|
|
223
|
+
/**
|
|
224
|
+
* Set the indent attribute
|
|
225
|
+
*/
|
|
226
|
+
indent: () => ReturnType;
|
|
227
|
+
/**
|
|
228
|
+
* Set the outdent attribute
|
|
229
|
+
*/
|
|
230
|
+
outdent: () => ReturnType;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
declare module '@tiptap/core' {
|
|
237
|
+
interface Commands<ReturnType> {
|
|
238
|
+
katex: {
|
|
239
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
declare module '@tiptap/core' {
|
|
246
|
+
interface Commands<ReturnType> {
|
|
247
|
+
lineHeight: {
|
|
248
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
249
|
+
unsetLineHeight: () => ReturnType;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
declare module '@tiptap/core' {
|
|
256
|
+
interface Commands<ReturnType> {
|
|
257
|
+
mermaid: {
|
|
258
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
259
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
declare module '@tiptap/core' {
|
|
266
|
+
interface Commands<ReturnType> {
|
|
267
|
+
columns: {
|
|
268
|
+
insertColumns: (attrs?: {
|
|
269
|
+
cols: number;
|
|
270
|
+
}) => ReturnType;
|
|
271
|
+
addColBefore: () => ReturnType;
|
|
272
|
+
addColAfter: () => ReturnType;
|
|
273
|
+
deleteCol: () => ReturnType;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
declare module '@tiptap/core' {
|
|
280
|
+
interface Commands<ReturnType> {
|
|
281
|
+
search: {
|
|
282
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
283
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
284
|
+
replace: () => ReturnType;
|
|
285
|
+
replaceAll: () => ReturnType;
|
|
286
|
+
goToPrevSearchResult: () => void;
|
|
287
|
+
goToNextSearchResult: () => void;
|
|
288
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
declare module '@tiptap/core' {
|
|
295
|
+
interface Commands<ReturnType> {
|
|
296
|
+
tableOfContents: {
|
|
297
|
+
setTableOfContents: () => ReturnType;
|
|
298
|
+
removeTableOfContents: () => ReturnType;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
declare module '@tiptap/core' {
|
|
305
|
+
interface Commands<ReturnType> {
|
|
306
|
+
twitter: {
|
|
307
|
+
/**
|
|
308
|
+
* Insert a tweet
|
|
309
|
+
* @param options The tweet attributes
|
|
310
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
311
|
+
*/
|
|
312
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
313
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
declare module '@tiptap/core' {
|
|
320
|
+
interface Commands<ReturnType> {
|
|
321
|
+
video: {
|
|
322
|
+
/**
|
|
323
|
+
* Add an video
|
|
324
|
+
*/
|
|
325
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
326
|
+
/**
|
|
327
|
+
* Update an video
|
|
328
|
+
*/
|
|
329
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
declare module '@tiptap/core' {
|
|
336
|
+
interface Commands<ReturnType> {
|
|
337
|
+
tableCellBackground: {
|
|
338
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
339
|
+
unsetTableCellBackground: () => ReturnType;
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}
|