@fileverse-dev/ddoc 2.0.5 → 2.0.6-patch-2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +20 -19
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +35549 -30397
- package/dist/package/components/mobile-toolbar.d.ts +2 -1
- package/dist/package/components/secure-image.d.ts +6 -4
- package/dist/package/preview-ddoc-editor.d.ts +4 -0
- package/dist/package/types.d.ts +1 -0
- package/dist/package/utils/security.d.ts +2 -2
- package/dist/package/utils/upload-images.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
@@ -28,26 +28,27 @@ 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
|
-
| `
|
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 |
|
46
47
|
| `onChange` (optional) | `(changes: JSONContent) => void` | Optional function that gets triggered with the latest content of the editor on every change in the editor |
|
47
|
-
| `onCollaboratorChange` (optional) | `(collaborators?: IDocCollabUsers[] ) => void` | Optional function that gets triggered when a user join or leave the doc during collaboration
|
48
|
-
| `onError` (optional) | `(errorString: string) => void` | Function to call on error
|
49
|
-
| `setCharacterCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Character Count
|
50
|
-
| `setWordCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Word Count
|
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 |
|
51
52
|
|
52
53
|
## Data Interface
|
53
54
|
|
package/dist/index.d.ts
CHANGED