@fileverse-dev/ddoc 1.5.2 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -28,21 +28,25 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
28
28
 
29
29
  ## Properties
30
30
 
31
- | Property | Type | Description |
32
- | ---------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
33
- | `isPreviewMode` | `boolean` | Indicates whether the page is in preview mode or not. |
34
- | `handleImageUploadToIpfs` | `(file: File) => Promise<string>` | Required function to upload ddoc editor's image on IPFS |
35
- | `data` (optional) | `Data` | Optional property holding data related to the page. |
36
- | `enableCollaboration` (optional) | `boolean` | Optional property to enable collaboration |
37
- | `onCommentInteraction` (optional) | `(commentInfo: IEditSelectionData) => void` | Optional function that get's called whenever there is a mouse-over and click interaction on a comment |
38
- | `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc |
39
- | `onAutoSave` (optional) | `(flag:boolean) => void` | Function which expose the current editor state every 10 seconds |
40
- | `onTextSelection` (optional) | `(data: IEditorSelectionData) => void` | Function called when a text is selected on the editor |
41
- | `renderToolRightSection` (optional) | `({editor}) => JSX.Element` | Function that render the right section of the toolbar. it calls the function with the editor instance |
42
- | `renderToolLeftSection` (optional) | `({editor}) => JSX.Element` | Accept a react component |
43
- | `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor |
44
- | `walletAddress` (optional) | `string ` | Takes a wallet address |
45
- | `ref` (optional) | `any` | Gets editor instance |
31
+ | Property | Type | Description |
32
+ | ---------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
33
+ | `isPreviewMode` | `boolean` | Indicates whether the page is in preview mode or not. |
34
+ | `handleImageUploadToIpfs` | `(file: File) => Promise<string>` | Required function to upload ddoc editor's image on IPFS |
35
+ | `data` (optional) | `Data` | Optional property holding data related to the page. |
36
+ | `enableCollaboration` (optional) | `boolean` | Optional property to enable collaboration |
37
+ | `onCommentInteraction` (optional) | `(commentInfo: IEditSelectionData) => void` | Optional function that get's called whenever there is a mouse-over and click interaction on a comment |
38
+ | `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc |
39
+ | `onAutoSave` (optional) | `(flag:boolean) => void` | Function which expose the current seditor state every 10 seconds |
40
+ | `onTextSelection` (optional) | `(data: IEditorSelectionData) => void` | Function called when a text is selected on the editor |
41
+ | `renderToolRightSection` (optional) | `({editor}) => JSX.Element` | Function that render the right section of the toolbar. it calls the function with the editor instance |
42
+ | `renderToolLeftSection` (optional) | `({editor}) => JSX.Element` | Accept a react component |
43
+ | `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor |
44
+ | `walletAddress` (optional) | `string ` | Takes a wallet address |
45
+ | `ref` (optional) | `any` | Gets editor instance |
46
+ | `ensResolutionUrl` (optional) | `string` | Api Url for resolving ens names |
47
+ | `initialContent` (optional) | `JSONContent` | Initial content of the editor |
48
+ | `onChange` (optional) | `(changes: JSONContent) => void` | Optional function that gets triggered with the latest content of the editor on every change in the editor |
49
+ | `onCollaboratorChange` (optional) | `(collaborators?: IDocCollabUsers[] ) => void` | Optional function that gets triggered when a user joins or leave the doc during collaboration |
46
50
 
47
51
  ## Data Interface
48
52