@fileverse-dev/ddoc 1.3.2 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +1346 -1317
- package/dist/index.umd.js +30 -30
- package/dist/packages/ddoc/ddoc-editor.d.ts +1 -1
- package/dist/packages/ddoc/types.d.ts +2 -1
- package/dist/packages/ddoc/use-ddoc-editor.d.ts +1 -1
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
1
|
import { DdocProps } from './types';
|
2
2
|
|
3
|
-
declare const DdocEditor: ({ isPreviewMode,
|
3
|
+
declare const DdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, username, onAutoSave, renderToolRightSection, renderToolLeftSection, ensProviderUrl, onChange }: DdocProps) => import("react/jsx-runtime").JSX.Element;
|
4
4
|
export default DdocEditor;
|
@@ -7,7 +7,7 @@ export interface DdocProps {
|
|
7
7
|
collaborationId?: string;
|
8
8
|
isPreviewMode: boolean;
|
9
9
|
toggleCollaboration?: (flag: boolean) => void;
|
10
|
-
|
10
|
+
initialContent?: JSONContent | null;
|
11
11
|
onAutoSave?: (data: Data) => void;
|
12
12
|
ensProviderUrl?: string;
|
13
13
|
username?: string | null;
|
@@ -17,6 +17,7 @@ export interface DdocProps {
|
|
17
17
|
renderToolRightSection?: ({ editor }: {
|
18
18
|
editor: JSONContent;
|
19
19
|
}) => JSX.Element;
|
20
|
+
onChange?: (changes: Data['editorJSONData']) => void;
|
20
21
|
}
|
21
22
|
export interface Data {
|
22
23
|
editorJSONData: JSONContent;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DdocProps } from './types';
|
2
2
|
|
3
|
-
export declare const useDdocEditor: ({ isPreviewMode,
|
3
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, ensProviderUrl, username, onAutoSave, onChange }: DdocProps) => {
|
4
4
|
editor: import('@tiptap/react').Editor | null;
|
5
5
|
focusEditor: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
6
6
|
ref: import('react').RefObject<HTMLDivElement>;
|