mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
chore: remove old custom types
This commit is contained in:
parent
d2d2a85efc
commit
3a397dd994
@ -1,27 +0,0 @@
|
|||||||
// This example is for an Editor with `ReactEditor` and `HistoryEditor`
|
|
||||||
import { BaseEditor, BaseRange } from 'slate'
|
|
||||||
import { HistoryEditor } from 'slate-history'
|
|
||||||
|
|
||||||
export type CustomEditor = BaseEditor & HistoryEditor
|
|
||||||
|
|
||||||
export type CustomElement = {
|
|
||||||
type?: string
|
|
||||||
children: CustomText[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomRange = {
|
|
||||||
isCaret?: boolean
|
|
||||||
} & BaseRange
|
|
||||||
|
|
||||||
export type FormattedText = { text: string; bold?: boolean }
|
|
||||||
|
|
||||||
export type CustomText = FormattedText
|
|
||||||
|
|
||||||
declare module 'slate' {
|
|
||||||
interface CustomTypes {
|
|
||||||
Editor: CustomEditor
|
|
||||||
Element: CustomElement
|
|
||||||
Text: CustomText
|
|
||||||
Range: CustomRange
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user