@fileverse-dev/ddoc 1.3.4 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +14 -15
- package/dist/index.es.js +3418 -3454
- package/dist/index.umd.js +33 -33
- package/dist/packages/ddoc/ddoc-editor.d.ts +1 -1
- package/dist/packages/ddoc/extensions/d-block/dblock.d.ts +0 -6
- package/dist/packages/ddoc/types.d.ts +0 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -28,18 +28,18 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
|
|
28
28
|
|
29
29
|
## Properties
|
30
30
|
|
31
|
-
| Property | Type
|
32
|
-
| ---------------------------------------------- |
|
33
|
-
| `isPreviewMode` | `boolean`
|
34
|
-
| `data` (optional) | `Data`
|
35
|
-
| `enableCollaboration` (optional) | `boolean`
|
36
|
-
| `collaborationId` (optional) | `string`
|
37
|
-
| `
|
38
|
-
| `onAutoSave` (optional) | `(flag:boolean) => void` | Function which expose the current editor state every 10 seconds |
|
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
|
+
| `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc |
|
37
|
+
| `onAutoSave` (optional) | `(flag:boolean) => void` | Function which expose the current editor state every 10 seconds |
|
39
38
|
| `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)
|
41
|
-
| `username` (required when using collaboration) | `boolean`
|
42
|
-
| `ensProviderUrl`
|
39
|
+
| `renderToolLeftSection` (optional) | `({editor}) => JSX.Element` | Accept a react component |
|
40
|
+
| `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor |
|
41
|
+
| `ensProviderUrl` | `string` | Takes a url |
|
42
|
+
| `ref` (optional) | `any` | Gets editor instance |
|
43
43
|
|
44
44
|
## Data Interface
|
45
45
|
|
@@ -47,10 +47,9 @@ The `Data` interface defines the structure of the data object that can be passed
|
|
47
47
|
|
48
48
|
### Properties
|
49
49
|
|
50
|
-
| Property | Type
|
51
|
-
| ---------------- |
|
52
|
-
| `editorJSONData` | `JSONContent`
|
53
|
-
|
50
|
+
| Property | Type | Description |
|
51
|
+
| ---------------- | ------------- | ------------------------------------------ |
|
52
|
+
| `editorJSONData` | `JSONContent` | Contains JSON data for the editor content. |
|
54
53
|
|
55
54
|
### Steps to run this example locally
|
56
55
|
|