Files
penx/custom-types.ts
2024-11-20 07:26:12 +08:00

23 lines
439 B
TypeScript

import { BaseEditor } from 'slate'
import { HistoryEditor } from 'slate-history'
import { ReactEditor } from 'slate-react'
export type CustomEditor = BaseEditor &
ReactEditor &
HistoryEditor & {
elementMaps: any
onKeyDownFns: any
}
declare module 'slate' {
interface CustomTypes {
Editor: CustomEditor
Element: {
type?: any
id?: string
nodeType?: string
listStyleType?: string
}
}
}