reactjs-tiptap-editor 0.3.22 → 0.3.24
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-CtcDNq-L.js → ActionMenuButton-BW1lNB_I.js} +1 -1
- package/lib/{ActionMenuButton-B81uYOvt.cjs → ActionMenuButton-BqO6QTnX.cjs} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +29 -29
- package/lib/Attachment.d.ts +29 -29
- package/lib/Attachment.js +2 -2
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +29 -29
- package/lib/Blockquote.d.ts +29 -29
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +29 -29
- package/lib/Bold.d.ts +29 -29
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +29 -29
- package/lib/BulletList.d.ts +29 -29
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +29 -29
- package/lib/Clear.d.ts +29 -29
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +29 -29
- package/lib/Code.d.ts +29 -29
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +29 -29
- package/lib/CodeBlock.d.ts +29 -29
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +29 -29
- package/lib/CodeView.d.ts +29 -29
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +29 -29
- package/lib/Color.d.ts +29 -29
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +29 -29
- package/lib/Document.d.ts +29 -29
- package/lib/{Drawer-CHGZ5D6j.cjs → Drawer-B1rmIQfS.cjs} +1 -1
- package/lib/{Drawer-BI_9XSqI.js → Drawer-DEqRsjHw.js} +10 -10
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +29 -29
- package/lib/Drawer.d.ts +29 -29
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +29 -29
- package/lib/Emoji.d.ts +29 -29
- package/lib/Emoji.js +2 -2
- package/lib/{Excalidraw-AIzEaOzF.js → Excalidraw-D2y-x-OZ.js} +2 -2
- package/lib/{Excalidraw-DOJiMnFl.cjs → Excalidraw-Qr5vHe9J.cjs} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +29 -29
- package/lib/Excalidraw.d.ts +29 -29
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +29 -29
- package/lib/ExportPdf.d.ts +29 -29
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +29 -29
- package/lib/ExportWord.d.ts +29 -29
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +29 -29
- package/lib/FontFamily.d.ts +29 -29
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +29 -29
- package/lib/FontSize.d.ts +29 -29
- package/lib/FontSize.js +3 -3
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +29 -29
- package/lib/FormatPainter.d.ts +29 -29
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +29 -29
- package/lib/Heading.d.ts +29 -29
- package/lib/Heading.js +2 -2
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +29 -29
- package/lib/Highlight.d.ts +29 -29
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +29 -29
- package/lib/History.d.ts +29 -29
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +29 -29
- package/lib/HorizontalRule.d.ts +29 -29
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +29 -29
- package/lib/Iframe.d.ts +29 -29
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +29 -29
- package/lib/Image.d.ts +29 -29
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +29 -29
- package/lib/ImageGif.d.ts +29 -29
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.d.cts +29 -29
- package/lib/ImportWord.d.ts +29 -29
- package/lib/ImportWord.js +2 -2
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +29 -29
- package/lib/Indent.d.ts +29 -29
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +29 -29
- package/lib/Italic.d.ts +29 -29
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +29 -29
- package/lib/Katex.d.ts +29 -29
- package/lib/Katex.js +3 -3
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +29 -29
- package/lib/LineHeight.d.ts +29 -29
- package/lib/LineHeight.js +6 -6
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +29 -29
- package/lib/Link.d.ts +29 -29
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +29 -29
- package/lib/ListItem.d.ts +29 -29
- package/lib/Mention.d.cts +29 -29
- package/lib/Mention.d.ts +29 -29
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +29 -29
- package/lib/Mermaid.d.ts +29 -29
- package/lib/Mermaid.js +14 -14
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +29 -29
- package/lib/MoreMark.d.ts +29 -29
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +29 -29
- package/lib/MultiColumn.d.ts +29 -29
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +29 -29
- package/lib/OrderedList.d.ts +29 -29
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-DtxJlApT.cjs → RichTextEditor-CSA367l8.cjs} +2 -2
- package/lib/{RichTextEditor-CtxIf8pq.js → RichTextEditor-CrDGx-K7.js} +4 -4
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +29 -29
- package/lib/SearchAndReplace.d.ts +29 -29
- package/lib/SearchAndReplace.js +2 -2
- package/lib/Selection.d.cts +29 -29
- package/lib/Selection.d.ts +29 -29
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +29 -29
- package/lib/SlashCommand.d.ts +29 -29
- package/lib/SlashCommand.js +2 -2
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +29 -29
- package/lib/Strike.d.ts +29 -29
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +29 -29
- package/lib/SubAndSuperScript.d.ts +29 -29
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +29 -29
- package/lib/Table.d.ts +29 -29
- package/lib/Table.js +531 -531
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +29 -29
- package/lib/TableOfContent.d.ts +29 -29
- package/lib/TableOfContent.js +2 -2
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +29 -29
- package/lib/TaskList.d.ts +29 -29
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +29 -29
- package/lib/TextAlign.d.ts +29 -29
- package/lib/TextAlign.js +1 -1
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +29 -29
- package/lib/TextBubble.d.ts +29 -29
- package/lib/TextBubble.js +2 -2
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +29 -29
- package/lib/TextDirection.d.ts +29 -29
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +29 -29
- package/lib/TextUnderline.d.ts +29 -29
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +29 -29
- package/lib/TrailingNode.d.ts +29 -29
- package/lib/{Twitter-DBA28WG3.cjs → Twitter-BRF2Ehp3.cjs} +1 -1
- package/lib/{Twitter-CJIud-WM.js → Twitter-D-kqw1ZB.js} +2 -2
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +29 -29
- package/lib/Twitter.d.ts +29 -29
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +29 -29
- package/lib/Video.d.ts +29 -29
- package/lib/Video.js +2 -2
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +29 -29
- package/lib/bubble-extra.d.ts +29 -29
- package/lib/bubble-extra.js +6 -6
- package/lib/{index-Tj3Ci7xM.js → index-CsK90iVd.js} +306 -128
- package/lib/index-D_A0TBRA.cjs +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +29 -29
- package/lib/index.d.ts +29 -29
- package/lib/index.js +3 -3
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +208 -30
- package/lib/locale-bundle.d.ts +208 -30
- package/lib/locale-bundle.js +2 -1
- package/lib/{textarea-BhTw-eGz.js → textarea-06Uv95yx.js} +1 -1
- package/lib/{textarea-9iN67tad.cjs → textarea-QE8jlGEs.cjs} +1 -1
- package/package.json +1 -1
- package/lib/index-C19MB4Al.cjs +0 -1
package/lib/Italic.d.cts
CHANGED
|
@@ -120,11 +120,8 @@ declare module '@tiptap/core' {
|
|
|
120
120
|
|
|
121
121
|
declare module '@tiptap/core' {
|
|
122
122
|
interface Commands<ReturnType> {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
name: string;
|
|
126
|
-
emoji: string;
|
|
127
|
-
}) => ReturnType;
|
|
123
|
+
excalidraw: {
|
|
124
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
128
125
|
};
|
|
129
126
|
}
|
|
130
127
|
}
|
|
@@ -132,8 +129,11 @@ declare module '@tiptap/core' {
|
|
|
132
129
|
|
|
133
130
|
declare module '@tiptap/core' {
|
|
134
131
|
interface Commands<ReturnType> {
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
emoji: {
|
|
133
|
+
setEmoji: (emoji: {
|
|
134
|
+
name: string;
|
|
135
|
+
emoji: string;
|
|
136
|
+
}) => ReturnType;
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -230,6 +230,15 @@ declare module '@tiptap/core' {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
|
|
233
|
+
declare module '@tiptap/core' {
|
|
234
|
+
interface Commands<ReturnType> {
|
|
235
|
+
katex: {
|
|
236
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
|
|
233
242
|
declare module '@tiptap/core' {
|
|
234
243
|
interface Commands<ReturnType> {
|
|
235
244
|
indent: {
|
|
@@ -246,15 +255,6 @@ declare module '@tiptap/core' {
|
|
|
246
255
|
}
|
|
247
256
|
|
|
248
257
|
|
|
249
|
-
declare module '@tiptap/core' {
|
|
250
|
-
interface Commands<ReturnType> {
|
|
251
|
-
katex: {
|
|
252
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
258
|
declare module '@tiptap/core' {
|
|
259
259
|
interface Commands<ReturnType> {
|
|
260
260
|
lineHeight: {
|
|
@@ -316,15 +316,14 @@ declare module '@tiptap/core' {
|
|
|
316
316
|
|
|
317
317
|
declare module '@tiptap/core' {
|
|
318
318
|
interface Commands<ReturnType> {
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Add an video
|
|
322
|
-
*/
|
|
323
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
319
|
+
twitter: {
|
|
324
320
|
/**
|
|
325
|
-
*
|
|
321
|
+
* Insert a tweet
|
|
322
|
+
* @param options The tweet attributes
|
|
323
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
326
324
|
*/
|
|
327
|
-
|
|
325
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
326
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
328
327
|
};
|
|
329
328
|
}
|
|
330
329
|
}
|
|
@@ -332,14 +331,15 @@ declare module '@tiptap/core' {
|
|
|
332
331
|
|
|
333
332
|
declare module '@tiptap/core' {
|
|
334
333
|
interface Commands<ReturnType> {
|
|
335
|
-
|
|
334
|
+
video: {
|
|
336
335
|
/**
|
|
337
|
-
*
|
|
338
|
-
* @param options The tweet attributes
|
|
339
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
336
|
+
* Add an video
|
|
340
337
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
|
+
/**
|
|
340
|
+
* Update an video
|
|
341
|
+
*/
|
|
342
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
345
|
}
|
package/lib/Italic.d.ts
CHANGED
|
@@ -120,11 +120,8 @@ declare module '@tiptap/core' {
|
|
|
120
120
|
|
|
121
121
|
declare module '@tiptap/core' {
|
|
122
122
|
interface Commands<ReturnType> {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
name: string;
|
|
126
|
-
emoji: string;
|
|
127
|
-
}) => ReturnType;
|
|
123
|
+
excalidraw: {
|
|
124
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
128
125
|
};
|
|
129
126
|
}
|
|
130
127
|
}
|
|
@@ -132,8 +129,11 @@ declare module '@tiptap/core' {
|
|
|
132
129
|
|
|
133
130
|
declare module '@tiptap/core' {
|
|
134
131
|
interface Commands<ReturnType> {
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
emoji: {
|
|
133
|
+
setEmoji: (emoji: {
|
|
134
|
+
name: string;
|
|
135
|
+
emoji: string;
|
|
136
|
+
}) => ReturnType;
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -230,6 +230,15 @@ declare module '@tiptap/core' {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
|
|
233
|
+
declare module '@tiptap/core' {
|
|
234
|
+
interface Commands<ReturnType> {
|
|
235
|
+
katex: {
|
|
236
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
|
|
233
242
|
declare module '@tiptap/core' {
|
|
234
243
|
interface Commands<ReturnType> {
|
|
235
244
|
indent: {
|
|
@@ -246,15 +255,6 @@ declare module '@tiptap/core' {
|
|
|
246
255
|
}
|
|
247
256
|
|
|
248
257
|
|
|
249
|
-
declare module '@tiptap/core' {
|
|
250
|
-
interface Commands<ReturnType> {
|
|
251
|
-
katex: {
|
|
252
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
258
|
declare module '@tiptap/core' {
|
|
259
259
|
interface Commands<ReturnType> {
|
|
260
260
|
lineHeight: {
|
|
@@ -316,15 +316,14 @@ declare module '@tiptap/core' {
|
|
|
316
316
|
|
|
317
317
|
declare module '@tiptap/core' {
|
|
318
318
|
interface Commands<ReturnType> {
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Add an video
|
|
322
|
-
*/
|
|
323
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
319
|
+
twitter: {
|
|
324
320
|
/**
|
|
325
|
-
*
|
|
321
|
+
* Insert a tweet
|
|
322
|
+
* @param options The tweet attributes
|
|
323
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
326
324
|
*/
|
|
327
|
-
|
|
325
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
326
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
328
327
|
};
|
|
329
328
|
}
|
|
330
329
|
}
|
|
@@ -332,14 +331,15 @@ declare module '@tiptap/core' {
|
|
|
332
331
|
|
|
333
332
|
declare module '@tiptap/core' {
|
|
334
333
|
interface Commands<ReturnType> {
|
|
335
|
-
|
|
334
|
+
video: {
|
|
336
335
|
/**
|
|
337
|
-
*
|
|
338
|
-
* @param options The tweet attributes
|
|
339
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
336
|
+
* Add an video
|
|
340
337
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
|
+
/**
|
|
340
|
+
* Update an video
|
|
341
|
+
*/
|
|
342
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
345
|
}
|
package/lib/Italic.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as a, c as s, d as n, m as i } from "./index-DI9T3iLd.js";
|
|
2
|
-
import { A as o } from "./RichTextEditor-
|
|
2
|
+
import { A as o } from "./RichTextEditor-CrDGx-K7.js";
|
|
3
3
|
const l = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, c = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, d = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, u = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, m = a.create({
|
|
4
4
|
name: "italic",
|
|
5
5
|
addOptions() {
|
package/lib/Katex.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-ByRfqzMr.cjs"),f=require("./dom-dataset-Byuf1YmW.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-ByRfqzMr.cjs"),f=require("./dom-dataset-Byuf1YmW.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-CSA367l8.cjs"),w=require("./textarea-QE8jlGEs.cjs"),k=require("./index-D_A0TBRA.cjs");function $({editor:e,...t}){const{t:s}=k.useLocale(),o=u.useAttributes(e,x.name,{text:"",defaultShowPicker:!1}),{text:i,defaultShowPicker:r}=o,[a,d]=c.useState(""),p=c.useCallback(()=>{e.chain().focus().setKatex({text:a}).run(),d("")},[e,a]);c.useEffect(()=>{r&&e.chain().updateAttributes(x.name,{defaultShowPicker:!1}).focus().run()},[e,r]);const h=c.useMemo(()=>{try{return b.renderToString(`${a}`)}catch{return a}},[a]),m=c.useMemo(()=>`${a}`.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:h||""}}):null,[a,h]);return n.jsxs(u.Popover,{modal:!0,children:[n.jsx(u.PopoverTrigger,{asChild:!0,children:n.jsx(u.ActionButton,{icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip})}),n.jsxs(u.PopoverContent,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:[n.jsx(u.Label,{className:"richtext-mb-[6px]",children:s("editor.formula.dialog.text")}),n.jsx("div",{className:"richtext-mb-[16px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:n.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm",children:n.jsx(w.Textarea,{autoFocus:!0,className:"richtext-w-full",defaultValue:i,onChange:g=>d(g.target.value),placeholder:"Text",required:!0,rows:3,value:a})})}),m&&n.jsx("div",{className:"richtext-my-[10px] richtext-max-w-[286px] richtext-overflow-auto richtext-whitespace-nowrap richtext-rounded-[6px] !richtext-border richtext-p-[10px]",children:m}),n.jsxs("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]",children:[n.jsx(u.Button,{className:"richtext-flex-1",onClick:p,children:"Submit"}),n.jsx("a",{href:"https://katex.org/docs/supported",rel:"noreferrer noopener",target:"_blank",children:n.jsx(j.HelpCircle,{size:16})})]})]})]})}function T(e,t=1){let s=0,o=0,i=0;if(e.startsWith("rgb")){const r=e.replace(/\s/g,"").match(/rgb\((.*)\)$/)[1].split(",");s=+r[0],o=+r[1],i=+r[2]}else if(e.startsWith("#")){let r=e.replace("#","");r.length===3&&(r=`${r[0]}${r[0]}${r[1]}${r[1]}${r[2]}${r[2]}`),s=Number.parseInt(r.substring(0,2),16),o=Number.parseInt(r.substring(2,4),16),i=Number.parseInt(r.substring(4,6),16)}else return e;return t>1&&t<=100&&(t=t/100),`rgba(${s},${o},${i},${t})`}function v({node:e}){const t=u.useTheme(),{text:s}=e.attrs,o=c.useMemo(()=>{const a="rgb(254, 242, 237)";return t==="dark"?T(a,.75):a},[t]),i=c.useMemo(()=>{try{return b.renderToString(`${s}`)}catch{return s}},[s]),r=c.useMemo(()=>s.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:i}}):n.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[s,i]);return n.jsx(f.NodeViewWrapper,{style:{display:"inline-block",backgroundColor:o},as:"span",children:r})}function N(e){return t=>t.getAttribute(e)}const x=l.Node.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({editor:e,t})=>({component:$,componentProps:{editor:e,action:()=>!0,isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:t("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:N("text")},defaultShowPicker:{default:!1}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:e}){return["span",l.mergeAttributes(this.options&&this.options.HTMLAttributes||{},e)]},addCommands(){return{setKatex:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[l.nodeInputRule({find:/^\$katex\$$/,type:this.type,getAttributes:()=>({defaultShowPicker:!0})})]},addNodeView(){return f.ReactNodeViewRenderer(v)}});exports.Katex=x;
|
package/lib/Katex.d.cts
CHANGED
|
@@ -56,11 +56,8 @@ declare module '@tiptap/core' {
|
|
|
56
56
|
|
|
57
57
|
declare module '@tiptap/core' {
|
|
58
58
|
interface Commands<ReturnType> {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
name: string;
|
|
62
|
-
emoji: string;
|
|
63
|
-
}) => ReturnType;
|
|
59
|
+
excalidraw: {
|
|
60
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
64
61
|
};
|
|
65
62
|
}
|
|
66
63
|
}
|
|
@@ -68,8 +65,11 @@ declare module '@tiptap/core' {
|
|
|
68
65
|
|
|
69
66
|
declare module '@tiptap/core' {
|
|
70
67
|
interface Commands<ReturnType> {
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
emoji: {
|
|
69
|
+
setEmoji: (emoji: {
|
|
70
|
+
name: string;
|
|
71
|
+
emoji: string;
|
|
72
|
+
}) => ReturnType;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -166,6 +166,15 @@ declare module '@tiptap/core' {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
|
|
169
|
+
declare module '@tiptap/core' {
|
|
170
|
+
interface Commands<ReturnType> {
|
|
171
|
+
katex: {
|
|
172
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
169
178
|
declare module '@tiptap/core' {
|
|
170
179
|
interface Commands<ReturnType> {
|
|
171
180
|
indent: {
|
|
@@ -182,15 +191,6 @@ declare module '@tiptap/core' {
|
|
|
182
191
|
}
|
|
183
192
|
|
|
184
193
|
|
|
185
|
-
declare module '@tiptap/core' {
|
|
186
|
-
interface Commands<ReturnType> {
|
|
187
|
-
katex: {
|
|
188
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
194
|
declare module '@tiptap/core' {
|
|
195
195
|
interface Commands<ReturnType> {
|
|
196
196
|
lineHeight: {
|
|
@@ -252,15 +252,14 @@ declare module '@tiptap/core' {
|
|
|
252
252
|
|
|
253
253
|
declare module '@tiptap/core' {
|
|
254
254
|
interface Commands<ReturnType> {
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Add an video
|
|
258
|
-
*/
|
|
259
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
255
|
+
twitter: {
|
|
260
256
|
/**
|
|
261
|
-
*
|
|
257
|
+
* Insert a tweet
|
|
258
|
+
* @param options The tweet attributes
|
|
259
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
262
260
|
*/
|
|
263
|
-
|
|
261
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
262
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
264
263
|
};
|
|
265
264
|
}
|
|
266
265
|
}
|
|
@@ -268,14 +267,15 @@ declare module '@tiptap/core' {
|
|
|
268
267
|
|
|
269
268
|
declare module '@tiptap/core' {
|
|
270
269
|
interface Commands<ReturnType> {
|
|
271
|
-
|
|
270
|
+
video: {
|
|
272
271
|
/**
|
|
273
|
-
*
|
|
274
|
-
* @param options The tweet attributes
|
|
275
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
272
|
+
* Add an video
|
|
276
273
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
275
|
+
/**
|
|
276
|
+
* Update an video
|
|
277
|
+
*/
|
|
278
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
}
|
package/lib/Katex.d.ts
CHANGED
|
@@ -56,11 +56,8 @@ declare module '@tiptap/core' {
|
|
|
56
56
|
|
|
57
57
|
declare module '@tiptap/core' {
|
|
58
58
|
interface Commands<ReturnType> {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
name: string;
|
|
62
|
-
emoji: string;
|
|
63
|
-
}) => ReturnType;
|
|
59
|
+
excalidraw: {
|
|
60
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
64
61
|
};
|
|
65
62
|
}
|
|
66
63
|
}
|
|
@@ -68,8 +65,11 @@ declare module '@tiptap/core' {
|
|
|
68
65
|
|
|
69
66
|
declare module '@tiptap/core' {
|
|
70
67
|
interface Commands<ReturnType> {
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
emoji: {
|
|
69
|
+
setEmoji: (emoji: {
|
|
70
|
+
name: string;
|
|
71
|
+
emoji: string;
|
|
72
|
+
}) => ReturnType;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -166,6 +166,15 @@ declare module '@tiptap/core' {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
|
|
169
|
+
declare module '@tiptap/core' {
|
|
170
|
+
interface Commands<ReturnType> {
|
|
171
|
+
katex: {
|
|
172
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
169
178
|
declare module '@tiptap/core' {
|
|
170
179
|
interface Commands<ReturnType> {
|
|
171
180
|
indent: {
|
|
@@ -182,15 +191,6 @@ declare module '@tiptap/core' {
|
|
|
182
191
|
}
|
|
183
192
|
|
|
184
193
|
|
|
185
|
-
declare module '@tiptap/core' {
|
|
186
|
-
interface Commands<ReturnType> {
|
|
187
|
-
katex: {
|
|
188
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
194
|
declare module '@tiptap/core' {
|
|
195
195
|
interface Commands<ReturnType> {
|
|
196
196
|
lineHeight: {
|
|
@@ -252,15 +252,14 @@ declare module '@tiptap/core' {
|
|
|
252
252
|
|
|
253
253
|
declare module '@tiptap/core' {
|
|
254
254
|
interface Commands<ReturnType> {
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Add an video
|
|
258
|
-
*/
|
|
259
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
255
|
+
twitter: {
|
|
260
256
|
/**
|
|
261
|
-
*
|
|
257
|
+
* Insert a tweet
|
|
258
|
+
* @param options The tweet attributes
|
|
259
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
262
260
|
*/
|
|
263
|
-
|
|
261
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
262
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
264
263
|
};
|
|
265
264
|
}
|
|
266
265
|
}
|
|
@@ -268,14 +267,15 @@ declare module '@tiptap/core' {
|
|
|
268
267
|
|
|
269
268
|
declare module '@tiptap/core' {
|
|
270
269
|
interface Commands<ReturnType> {
|
|
271
|
-
|
|
270
|
+
video: {
|
|
272
271
|
/**
|
|
273
|
-
*
|
|
274
|
-
* @param options The tweet attributes
|
|
275
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
272
|
+
* Add an video
|
|
276
273
|
*/
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
275
|
+
/**
|
|
276
|
+
* Update an video
|
|
277
|
+
*/
|
|
278
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
}
|
package/lib/Katex.js
CHANGED
|
@@ -4,9 +4,9 @@ import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
|
4
4
|
import { useState as T, useCallback as $, useEffect as v, useMemo as c } from "react";
|
|
5
5
|
import x from "katex";
|
|
6
6
|
import { HelpCircle as A } from "lucide-react";
|
|
7
|
-
import { O as S, P as L, m as P, A as C, n as H, L as I, B as M, Q as y } from "./RichTextEditor-
|
|
8
|
-
import { T as K } from "./textarea-
|
|
9
|
-
import { u as R } from "./index-
|
|
7
|
+
import { O as S, P as L, m as P, A as C, n as H, L as I, B as M, Q as y } from "./RichTextEditor-CrDGx-K7.js";
|
|
8
|
+
import { T as K } from "./textarea-06Uv95yx.js";
|
|
9
|
+
import { u as R } from "./index-CsK90iVd.js";
|
|
10
10
|
function V({ editor: t, ...e }) {
|
|
11
11
|
const { t: a } = R(), o = S(t, h.name, {
|
|
12
12
|
text: "",
|
package/lib/LineHeight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-ByRfqzMr.cjs"),g=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-ByRfqzMr.cjs"),g=require("./index-D_A0TBRA.cjs"),c=require("react/jsx-runtime"),L=require("react"),u=require("./RichTextEditor-CSA367l8.cjs");function T(e){return Number.parseFloat(e.replace("%",""))/100}function x(e){const{t}=g.useLocale(),[n,r]=L.useState("default");function o(i){i==="default"?e.editor.commands.unsetLineHeight():e.editor.commands.setLineHeight(i),r(i)}const d=L.useMemo(()=>{const s=e.editor.extensionManager.extensions.find(l=>l.name==="lineHeight").options.lineHeights.map(l=>({label:T(l),value:l}));return s.unshift({label:t("editor.default"),value:"default"}),s},[e]);return c.jsxs(u.DropdownMenu,{children:[c.jsx(u.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(u.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:e==null?void 0:e.disabled,icon:"LineHeight",tooltip:e==null?void 0:e.tooltip,children:c.jsx(u.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),c.jsx(u.DropdownMenuContent,{className:"richtext-min-w-24",children:d==null?void 0:d.map((i,h)=>c.jsx(u.DropdownMenuCheckboxItem,{checked:i.value===n,onClick:()=>o(i.value),children:i.label},`lineHeight-${h}`))})]})}const _=["paragraph","heading","list_item","todo_item"];function E(e,t){const{selection:n,doc:r}=e;if(!n||!r||!(n instanceof m.TextSelection||n instanceof m.AllSelection))return e;const{from:o,to:d}=n,i=[],h=t&&t!==g.DEFAULT_LINE_HEIGHT?t:null;if(r.nodesBetween(o,d,(s,l)=>{const a=s.type;return _.includes(a.name)?((s.attrs.lineHeight||null)!==h&&i.push({node:s,pos:l,nodeType:a}),a.name!=="list_item"&&a.name!=="todo_item"):!0}),i.length===0)return e;for(const s of i){const{node:l,pos:a,nodeType:f}=s;let{attrs:H}=l;H={...H,lineHeight:h},e=e.setNodeMarkup(a,f,H,l.marks)}return e}function b(e){return({state:t,dispatch:n})=>{const{selection:r}=t;let{tr:o}=t;return o=o.setSelection(r),o=E(o,e),o.docChanged?(n&&n(o),!0):!1}}const I=m.Extension.create({name:"lineHeight",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:g.DEFAULT_LINE_HEIGHT_LIST,defaultHeight:g.DEFAULT_LINE_HEIGHT,button({editor:t,t:n}){return{component:x,componentProps:{editor:t,tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight||this.options.defaultHeight,renderHTML:e=>e.lineHeight===this.options.defaultHeight||!e.lineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>b(e),unsetLineHeight:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"lineHeight"))}}});exports.DEFAULT_LINE_HEIGHT_LIST=g.DEFAULT_LINE_HEIGHT_LIST;exports.LineHeight=I;
|
package/lib/LineHeight.d.cts
CHANGED
|
@@ -124,11 +124,8 @@ declare module '@tiptap/core' {
|
|
|
124
124
|
|
|
125
125
|
declare module '@tiptap/core' {
|
|
126
126
|
interface Commands<ReturnType> {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
name: string;
|
|
130
|
-
emoji: string;
|
|
131
|
-
}) => ReturnType;
|
|
127
|
+
excalidraw: {
|
|
128
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
132
129
|
};
|
|
133
130
|
}
|
|
134
131
|
}
|
|
@@ -136,8 +133,11 @@ declare module '@tiptap/core' {
|
|
|
136
133
|
|
|
137
134
|
declare module '@tiptap/core' {
|
|
138
135
|
interface Commands<ReturnType> {
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
emoji: {
|
|
137
|
+
setEmoji: (emoji: {
|
|
138
|
+
name: string;
|
|
139
|
+
emoji: string;
|
|
140
|
+
}) => ReturnType;
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -234,6 +234,15 @@ declare module '@tiptap/core' {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
|
|
237
|
+
declare module '@tiptap/core' {
|
|
238
|
+
interface Commands<ReturnType> {
|
|
239
|
+
katex: {
|
|
240
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
237
246
|
declare module '@tiptap/core' {
|
|
238
247
|
interface Commands<ReturnType> {
|
|
239
248
|
indent: {
|
|
@@ -250,15 +259,6 @@ declare module '@tiptap/core' {
|
|
|
250
259
|
}
|
|
251
260
|
|
|
252
261
|
|
|
253
|
-
declare module '@tiptap/core' {
|
|
254
|
-
interface Commands<ReturnType> {
|
|
255
|
-
katex: {
|
|
256
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
262
|
declare module '@tiptap/core' {
|
|
263
263
|
interface Commands<ReturnType> {
|
|
264
264
|
lineHeight: {
|
|
@@ -320,15 +320,14 @@ declare module '@tiptap/core' {
|
|
|
320
320
|
|
|
321
321
|
declare module '@tiptap/core' {
|
|
322
322
|
interface Commands<ReturnType> {
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Add an video
|
|
326
|
-
*/
|
|
327
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
323
|
+
twitter: {
|
|
328
324
|
/**
|
|
329
|
-
*
|
|
325
|
+
* Insert a tweet
|
|
326
|
+
* @param options The tweet attributes
|
|
327
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
330
328
|
*/
|
|
331
|
-
|
|
329
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
330
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
332
331
|
};
|
|
333
332
|
}
|
|
334
333
|
}
|
|
@@ -336,14 +335,15 @@ declare module '@tiptap/core' {
|
|
|
336
335
|
|
|
337
336
|
declare module '@tiptap/core' {
|
|
338
337
|
interface Commands<ReturnType> {
|
|
339
|
-
|
|
338
|
+
video: {
|
|
340
339
|
/**
|
|
341
|
-
*
|
|
342
|
-
* @param options The tweet attributes
|
|
343
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
340
|
+
* Add an video
|
|
344
341
|
*/
|
|
345
|
-
|
|
346
|
-
|
|
342
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
|
+
/**
|
|
344
|
+
* Update an video
|
|
345
|
+
*/
|
|
346
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
}
|
package/lib/LineHeight.d.ts
CHANGED
|
@@ -124,11 +124,8 @@ declare module '@tiptap/core' {
|
|
|
124
124
|
|
|
125
125
|
declare module '@tiptap/core' {
|
|
126
126
|
interface Commands<ReturnType> {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
name: string;
|
|
130
|
-
emoji: string;
|
|
131
|
-
}) => ReturnType;
|
|
127
|
+
excalidraw: {
|
|
128
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
132
129
|
};
|
|
133
130
|
}
|
|
134
131
|
}
|
|
@@ -136,8 +133,11 @@ declare module '@tiptap/core' {
|
|
|
136
133
|
|
|
137
134
|
declare module '@tiptap/core' {
|
|
138
135
|
interface Commands<ReturnType> {
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
emoji: {
|
|
137
|
+
setEmoji: (emoji: {
|
|
138
|
+
name: string;
|
|
139
|
+
emoji: string;
|
|
140
|
+
}) => ReturnType;
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -234,6 +234,15 @@ declare module '@tiptap/core' {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
|
|
237
|
+
declare module '@tiptap/core' {
|
|
238
|
+
interface Commands<ReturnType> {
|
|
239
|
+
katex: {
|
|
240
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
237
246
|
declare module '@tiptap/core' {
|
|
238
247
|
interface Commands<ReturnType> {
|
|
239
248
|
indent: {
|
|
@@ -250,15 +259,6 @@ declare module '@tiptap/core' {
|
|
|
250
259
|
}
|
|
251
260
|
|
|
252
261
|
|
|
253
|
-
declare module '@tiptap/core' {
|
|
254
|
-
interface Commands<ReturnType> {
|
|
255
|
-
katex: {
|
|
256
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
262
|
declare module '@tiptap/core' {
|
|
263
263
|
interface Commands<ReturnType> {
|
|
264
264
|
lineHeight: {
|
|
@@ -320,15 +320,14 @@ declare module '@tiptap/core' {
|
|
|
320
320
|
|
|
321
321
|
declare module '@tiptap/core' {
|
|
322
322
|
interface Commands<ReturnType> {
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Add an video
|
|
326
|
-
*/
|
|
327
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
323
|
+
twitter: {
|
|
328
324
|
/**
|
|
329
|
-
*
|
|
325
|
+
* Insert a tweet
|
|
326
|
+
* @param options The tweet attributes
|
|
327
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
330
328
|
*/
|
|
331
|
-
|
|
329
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
330
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
332
331
|
};
|
|
333
332
|
}
|
|
334
333
|
}
|
|
@@ -336,14 +335,15 @@ declare module '@tiptap/core' {
|
|
|
336
335
|
|
|
337
336
|
declare module '@tiptap/core' {
|
|
338
337
|
interface Commands<ReturnType> {
|
|
339
|
-
|
|
338
|
+
video: {
|
|
340
339
|
/**
|
|
341
|
-
*
|
|
342
|
-
* @param options The tweet attributes
|
|
343
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
340
|
+
* Add an video
|
|
344
341
|
*/
|
|
345
|
-
|
|
346
|
-
|
|
342
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
343
|
+
/**
|
|
344
|
+
* Update an video
|
|
345
|
+
*/
|
|
346
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
}
|