contenido
Version:
Contenido is a library with a set of tools to help you create your own rich text editor on top of draft-js without thinking about how to handle things.
22 lines (19 loc) • 505 B
text/typescript
// Types
import type { DraftEntityMutability } from 'draft-js';
// Custom Types
import type {
AudioAttributes,
FileAttributes,
ImageAttributes,
VideoAttributes,
} from '../attributes';
export type AtomicWrapperProps = {
mutability: DraftEntityMutability;
entityKey: string;
[key: string]: any;
} & (
| ({ blockType: 'audio' } & AudioAttributes)
| ({ blockType: 'file' } & FileAttributes)
| ({ blockType: 'image' } & ImageAttributes)
| ({ blockType: 'video' } & VideoAttributes)
);