import { Editor, JSONContent } from '@tiptap/react';
import { handleMarkdownContent } from '../extensions/mardown-paste-handler';
import { IpfsImageUploadResponse } from '../types';

import * as Y from 'yjs';
export declare const useHeadlessEditor: (props?: {
    optionalExtensions?: string[];
}) => {
    setContent: (initialContent: string | string[] | JSONContent, editor: Editor, ydoc: Y.Doc) => void;
    getEditor: () => {
        editor: Editor;
        ydoc: Y.Doc;
    };
    getYjsConvertor: () => {
        convertJSONContentToYjsEncodedString: (content: JSONContent) => string;
        cleanup: () => void;
    };
    downloadContentAsMd: (content: string | string[] | JSONContent, title: string) => Promise<void>;
    downloadContentAsHtml: (content: string | string[] | JSONContent, title: string) => Promise<void>;
    downloadContentAsTxt: (content: string | string[] | JSONContent, title: string) => Promise<void>;
    mergeYjsUpdates: (contents: string[]) => string;
    handleMarkdownContent: typeof handleMarkdownContent;
    getYjsContentFromMarkdown: (file: File, ipfsImageUploadFn: (file: File) => Promise<IpfsImageUploadResponse>) => Promise<string | null>;
    getYjsContentFromDocx: (file: File, ipfsImageUploadFn: (file: File) => Promise<IpfsImageUploadResponse>) => Promise<string | null>;
};
