@firecms/core
Version:
Awesome Firebase/Firestore-based headless open-source CMS
31 lines (30 loc) • 1.22 kB
TypeScript
import React from "react";
import { type JSONContent } from "./components";
import { EditorAIController } from "./types";
export type CustomEditorComponent = {
name: string;
component: React.FC;
};
export interface MarkdownEditorConfig {
html?: boolean;
transformPastedText?: boolean;
}
export type FireCMSEditorTextSize = "sm" | "base" | "lg";
export type FireCMSEditorProps = {
content?: JSONContent | string;
onMarkdownContentChange?: (content: string) => void;
onJsonContentChange?: (content: JSONContent | null) => void;
onHtmlContentChange?: (content: string) => void;
handleImageUpload: (file: File) => Promise<string>;
version?: number;
textSize?: FireCMSEditorTextSize;
highlight?: {
from: number;
to: number;
};
aiController?: EditorAIController;
customComponents?: CustomEditorComponent[];
disabled?: boolean;
markdownConfig?: MarkdownEditorConfig;
};
export declare const FireCMSEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, disabled, markdownConfig }: FireCMSEditorProps) => import("react/jsx-runtime").JSX.Element;