@fileverse-dev/ddoc 2.1.0-patch-2 → 2.1.0-patch-4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +22 -21
- package/dist/index.es.js +16142 -16000
- package/dist/package/components/presentation-mode/presentation-mode.d.ts +4 -1
- package/dist/package/types.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
@@ -28,28 +28,29 @@ 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
|
-
| `data` (optional) | `Data` | Optional property holding data related to the page.
|
35
|
-
| `enableCollaboration` (optional) | `boolean` | Optional property to enable collaboration
|
36
|
-
| `onCommentInteraction` (optional) | `(commentInfo: IEditSelectionData) => void` | Optional function that get's called whenever there is a mouse-over and click interaction on a comment
|
37
|
-
| `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc
|
38
|
-
| `onTextSelection` (optional) | `(data: IEditorSelectionData) => void` | Function called when a text is selected on the editor
|
39
|
-
| `renderToolRightSection` (optional) | `({editor}) => JSX.Element` | Function that render the right section of the toolbar. it calls the function with the editor instance
|
40
|
-
| `renderToolLeftSection` (optional) | `({editor}) => JSX.Element` | Accept a react component
|
41
|
-
| `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor
|
42
|
-
| `walletAddress` (optional) | `string ` | Takes a wallet address
|
43
|
-
| `ref` (optional) | `any` | Gets editor instance
|
44
|
-
| `ensResolutionUrl` (optional) | `string` | Api Url for resolving ens names
|
45
|
-
| `secureImageUploadUrl` (optional) | `string` | Api Url for secure image upload
|
46
|
-
| `initialContent` (optional) | `JSONContent` | Initial content of the editor
|
31
|
+
| Property | Type | Description |
|
32
|
+
| ---------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
33
|
+
| `isPreviewMode` | `boolean` | Indicates whether the page is in preview mode or not. |
|
34
|
+
| `data` (optional) | `Data` | Optional property holding data related to the page. |
|
35
|
+
| `enableCollaboration` (optional) | `boolean` | Optional property to enable collaboration |
|
36
|
+
| `onCommentInteraction` (optional) | `(commentInfo: IEditSelectionData) => void` | Optional function that get's called whenever there is a mouse-over and click interaction on a comment |
|
37
|
+
| `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc |
|
38
|
+
| `onTextSelection` (optional) | `(data: IEditorSelectionData) => void` | Function called when a text is selected on the editor |
|
39
|
+
| `renderToolRightSection` (optional) | `({editor}) => JSX.Element` | Function that render the right section of the toolbar. it calls the function with the editor instance |
|
40
|
+
| `renderToolLeftSection` (optional) | `({editor}) => JSX.Element` | Accept a react component |
|
41
|
+
| `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor |
|
42
|
+
| `walletAddress` (optional) | `string ` | Takes a wallet address |
|
43
|
+
| `ref` (optional) | `any` | Gets editor instance |
|
44
|
+
| `ensResolutionUrl` (optional) | `string` | Api Url for resolving ens names |
|
45
|
+
| `secureImageUploadUrl` (optional) | `string` | Api Url for secure image upload |
|
46
|
+
| `initialContent` (optional) | `JSONContent` | Initial content of the editor |
|
47
47
|
| `onChange` (optional) | `(changes: JSONContent) => void` | Optional function that gets triggered with the latest content of the editor on every change in the editor |
|
48
|
-
| `onCollaboratorChange` (optional) | `(collaborators?: IDocCollabUsers[] ) => void` | Optional function that gets triggered when a user join or leave the doc during collaboration
|
49
|
-
| `onError` (optional) | `(errorString: string) => void` | Function to call on error
|
50
|
-
| `setCharacterCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Character Count
|
51
|
-
| `setWordCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Word Count
|
52
|
-
| `scrollPosition`(optional
|
48
|
+
| `onCollaboratorChange` (optional) | `(collaborators?: IDocCollabUsers[] ) => void` | Optional function that gets triggered when a user join or leave the doc during collaboration |
|
49
|
+
| `onError` (optional) | `(errorString: string) => void` | Function to call on error |
|
50
|
+
| `setCharacterCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Character Count |
|
51
|
+
| `setWordCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Word Count |
|
52
|
+
| `scrollPosition`(optional) | `number` | User cursor position to scroll to on intitalising the content of the editor |
|
53
|
+
| `customHeight`(optional) | `string` | Optional. Custom Height for editor canvas when zoomLevel is 200% |
|
53
54
|
|
54
55
|
## Data Interface
|
55
56
|
|