@fileverse-dev/ddoc 2.1.0-yjs-patch-6 → 2.1.0-yjs-patch-7

Sign up to get free protection for your applications and to get access to all the features.
@@ -64,6 +64,8 @@ export interface DdocProps {
64
64
  onMarkdownImport?: () => void;
65
65
  sharedSlidesLink?: string;
66
66
  documentName?: string;
67
+ onInvalidContentError?: (e: unknown) => void;
68
+ ignoreCorruptedData?: boolean;
67
69
  }
68
70
  export interface IEditorSelectionData {
69
71
  from: number;
@@ -1,7 +1,7 @@
1
1
  import { DdocProps } from './types';
2
2
 
3
3
  import * as Y from 'yjs';
4
- export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, ddocId, enableIndexeddbSync, unFocused, zoomLevel, }: Partial<DdocProps>) => {
4
+ export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, }: Partial<DdocProps>) => {
5
5
  editor: import('@tiptap/core').Editor | null;
6
6
  isContentLoading: boolean;
7
7
  ref: import('react').RefObject<HTMLDivElement>;
@@ -0,0 +1,9 @@
1
+ import { JSONContent } from '@tiptap/core';
2
+
3
+ type SanitizeContentProps = {
4
+ data: JSONContent;
5
+ ignoreCorruptedData?: boolean;
6
+ onInvalidContentError?: (e: unknown) => void;
7
+ };
8
+ export declare const sanitizeContent: ({ data, ignoreCorruptedData, onInvalidContentError, }: SanitizeContentProps) => JSONContent;
9
+ export {};