@fileverse-dev/ddoc 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -28,28 +28,46 @@ 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
48
  | `onCollaboratorChange` (optional) | `(collaborators?: IDocCollabUsers[] ) => void` | Optional function that gets triggered when a user join or leave the doc during collaboration |
49
49
  | `onError` (optional) | `(errorString: string) => void` | Function to call on error |
50
50
  | `setCharacterCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Character Count |
51
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 |
52
+ | `scrollPosition`(optional) | `number` | User cursor position to scroll to on intitalising the content of the editor
53
+ | `enableIndexeddbSync` (optional) | `boolean` | Indicates when to use yjs-indexeddb provider
54
+ | `ddocId` (optional) | `string` | custom ID for the document (this has to be provided to enable yjs-indexeddb provider) |
55
+ | `editorCanvasClassNames`(optional) | `string` | Optional. Extra className for editor-canvas |
56
+ | `selectedTags` (optional) | `TagType[]` | Array of currently selected tags |
57
+ | `setSelectedTags` (optional) | `React.Dispatch<SetStateAction<TagType[]>>` | Function to update selected tags |
58
+ | `zoomLevel` (required) | `string` | Current zoom level of the editor |
59
+ | `setZoomLevel` (required) | `React.Dispatch<SetStateAction<string>>` | Function to update zoom level |
60
+ | `isNavbarVisible` (required) | `boolean` | Controls visibility of the navbar |
61
+ | `setIsNavbarVisible` (required) | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle navbar visibility |
62
+ | `renderNavbar` (optional) | `({ editor: JSONContent }) => JSX.Element` | Function to render custom navbar content |
63
+ | `disableBottomToolbar` (optional) | `boolean` | When true, disables the bottom toolbar |
64
+ | `isPresentationMode` (optional) | `boolean` | Controls if editor is in presentation mode |
65
+ | `setIsPresentationMode` (optional) | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle presentation mode |
66
+ | `onInlineComment` (optional) | `() => void` | Callback function when inline comment is added |
67
+ | `onMarkdownExport` (optional) | `() => void` | Callback function for markdown export |
68
+ | `onMarkdownImport` (optional) | `() => void` | Callback function for markdown import |
69
+ | `sharedSlidesLink` (optional) | `string` | Link for shared slides in presentation mode |
70
+ | `documentName` (optional) | `string` | Name of the document |
53
71
 
54
72
  ## Data Interface
55
73