@ctzhian/tiptap 1.8.0 → 1.8.1
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/dist/type/index.d.ts +4 -3
- package/package.json +1 -1
package/dist/type/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { PopoverOrigin, SxProps, Theme } from '@mui/material';
|
|
3
3
|
import { Editor, Extension } from '@tiptap/core';
|
|
4
4
|
import { YoutubeOptions } from '@tiptap/extension-youtube';
|
|
5
|
+
import { UseEditorOptions } from '@tiptap/react';
|
|
5
6
|
export type { Editor } from '@tiptap/react';
|
|
6
7
|
export interface MenuItem {
|
|
7
8
|
label?: React.ReactNode;
|
|
@@ -84,9 +85,7 @@ export type MentionExtensionProps = {
|
|
|
84
85
|
query: string;
|
|
85
86
|
}) => Promise<MentionItems>;
|
|
86
87
|
};
|
|
87
|
-
export type ModeType = 'rich-text' | 'markdown' | 'diff';
|
|
88
88
|
export type ExtensionRelativeProps = MentionExtensionProps & EditorFnProps & {
|
|
89
|
-
contentType?: ModeType;
|
|
90
89
|
limit?: number | null;
|
|
91
90
|
exclude?: string[];
|
|
92
91
|
extensions?: Extension[];
|
|
@@ -96,7 +95,9 @@ export type ExtensionRelativeProps = MentionExtensionProps & EditorFnProps & {
|
|
|
96
95
|
export type UseTiptapProps = {
|
|
97
96
|
onSave?: (editor: Editor) => void;
|
|
98
97
|
} & ExtensionRelativeProps;
|
|
99
|
-
export type GetExtensionsProps = ExtensionRelativeProps
|
|
98
|
+
export type GetExtensionsProps = ExtensionRelativeProps & {
|
|
99
|
+
contentType?: UseEditorOptions['contentType'];
|
|
100
|
+
};
|
|
100
101
|
export type UseTiptapReturn = {
|
|
101
102
|
editor: Editor;
|
|
102
103
|
getMarkdown: () => string;
|