mui-tiptap
Version:
A Material-UI (MUI) styled WYSIWYG rich text editor, using Tiptap
28 lines (27 loc) • 1.14 kB
TypeScript
import { type SxProps } from "@mui/material/styles";
import type { NodeViewProps } from "@tiptap/core";
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
import type ResizableImage from "./ResizableImage";
import { type ResizableImageComponentClasses } from "./ResizableImageComponent.classes";
interface ImageNodeAttributes extends Record<string, unknown> {
src: string;
alt?: string | null;
title?: string | null;
}
interface ResizableImageNodeAttributes extends ImageNodeAttributes {
width: string | number | null;
aspectRatio: string | null;
}
interface ResizableImageNode extends ProseMirrorNode {
attrs: ResizableImageNodeAttributes;
}
export interface ResizableImageComponentProps extends NodeViewProps {
node: ResizableImageNode;
extension: typeof ResizableImage;
/** Override or extend existing styles. */
classes?: Partial<ResizableImageComponentClasses>;
/** Provide custom styles. */
sx?: SxProps;
}
declare function ResizableImageComponent(inProps: ResizableImageComponentProps): import("react/jsx-runtime").JSX.Element;
export default ResizableImageComponent;