@fileverse-dev/ddoc 1.2.3 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -28,17 +28,16 @@ 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
- | `togglePreviewMode`| `(flag: boolean) => void` | Function to toggle preview mode with a boolean flag. |
35
- | `onPublish` | `(data: Data) => void` | Function to handle publishing of the page. |
36
- | `data` (optional) | `Data` | Optional property holding data related to the page. |
37
- | `enableCollaboration` (optional) | `boolean` | Optional property to enable collaboration
38
- | `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc |
39
- | `toggleCollaboration` (optional) | `(flag: boolean) => void` | Function to toggle collaboration mode with a boolean flag |
40
- | `onAutoSave` (optional) | `(flag:boolean) => void` | Function which expose the current editor state every 10 seconds |
41
- | `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor
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
+ | `toggleCollaboration` (optional) | `(flag: boolean) => void` | Function to toggle collaboration mode with a boolean flag |
38
+ | `onAutoSave` (optional) | `(flag:boolean) => void` | Function which expose the current editor state every 10 seconds |
39
+ | `renderToolRightSection` (optional) | `({editor, pluginMetaData}) => JSX.Element` | Function that render the right section of the toolbar. it calls the function with the editor instance and the pluginMedata |
40
+ | `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor |
42
41
 
43
42
  ## Data Interface
44
43
 
@@ -46,10 +45,10 @@ The `Data` interface defines the structure of the data object that can be passed
46
45
 
47
46
  ### Properties
48
47
 
49
- | Property | Type | Description |
50
- |-------------------|------------------|------------------------------------------------|
51
- | `metaData` | `PluginMetaData` | Contains metadata related to the plugin. |
52
- | `editorJSONData` | `JSONContent` | Contains JSON data for the editor content. |
48
+ | Property | Type | Description |
49
+ | ---------------- | ---------------- | ------------------------------------------ |
50
+ | `metaData` | `PluginMetaData` | Contains metadata related to the plugin. |
51
+ | `editorJSONData` | `JSONContent` | Contains JSON data for the editor content. |
53
52
 
54
53
  ## PluginMetaData Interface
55
54
 
@@ -57,9 +56,9 @@ The `PluginMetaData` interface defines the structure of the metadata related to
57
56
 
58
57
  ### Properties
59
58
 
60
- | Property | Type | Description |
61
- |-------------------|-------------|-------------------------------------------------- |
62
- | `plugin` | `Plugin` | Contains information about the plugin title. |
59
+ | Property | Type | Description |
60
+ | -------- | -------- | -------------------------------------------- |
61
+ | `plugin` | `Plugin` | Contains information about the plugin title. |
63
62
 
64
63
  ## Plugin Interface
65
64
 
@@ -67,14 +66,13 @@ The `Plugin` interface defines the structure of the plugin information.
67
66
 
68
67
  ### Properties
69
68
 
70
- | Property | Type | Description |
71
- |------------|------------------|-------------------------------------------------------|
72
- | `title` | `string \| null` | Title of the plugin (can be `null`). |
73
-
69
+ | Property | Type | Description |
70
+ | -------- | ---------------- | ------------------------------------ |
71
+ | `title` | `string \| null` | Title of the plugin (can be `null`). |
74
72
 
75
73
  ### Steps to run this example locally
76
74
 
77
75
  - `npm i`
78
76
  - `npm run dev`
79
77
 
80
- It will open up a vite server, that will have the Ddoc Editor
78
+ It will open up a vite server, that will have the Ddoc Editor