editcrafter
Version:
To use **EditCrafter** with Tailwind CSS, you need to set up Tailwind CSS in your project. Here's a step-by-step guide to help you integrate Tailwind CSS and customize your `tailwind.config.js` file for use with **EditCrafter**.
38 lines (37 loc) • 1.41 kB
TypeScript
import { Editor } from '@tiptap/react';
import { EditCrafterProps } from './EditCrafter';
type ShortcutKeyResult = {
symbol: string;
readable: string;
};
export type FileError = {
file: File | string;
reason: 'type' | 'size' | 'invalidBase64' | 'base64NotAllowed';
};
export type FileValidationOptions = {
allowedMimeTypes: string[];
maxFileSize?: number;
allowBase64: boolean;
};
type FileInput = File | {
src: string | File;
alt?: string;
title?: string;
};
export declare const isClient: () => boolean;
export declare const isServer: () => boolean;
export declare const isMacOS: () => boolean;
export declare const getShortcutKey: (key: string) => ShortcutKeyResult;
export declare const getShortcutKeys: (keys: string[]) => ShortcutKeyResult[];
export declare const getOutput: (editor: Editor, format: EditCrafterProps["output"]) => object | string;
export declare const isUrl: (text: string, options?: {
requireHostname: boolean;
allowBase64?: boolean;
}) => boolean;
export declare const sanitizeUrl: (url: string | null | undefined, options?: {
allowBase64?: boolean;
}) => string | undefined;
export declare const blobUrlToBase64: (blobUrl: string) => Promise<string>;
export declare const randomId: () => string;
export declare const filterFiles: <T extends FileInput>(files: T[], options: FileValidationOptions) => [T[], FileError[]];
export {};