mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-22 16:17:50 +08:00
17 lines
620 B
TypeScript
17 lines
620 B
TypeScript
|
import { Extensions } from '../types'
|
||
|
import { Extension } from '../Extension'
|
||
|
import { NodeExtension } from '../Node'
|
||
|
// import { MarkExtension } from '../Node'
|
||
|
|
||
|
export default function splitExtensions(extensions: Extensions) {
|
||
|
const baseExtensions = extensions.filter(extension => extension.type === 'extension') as Extension[]
|
||
|
const nodeExtensions = extensions.filter(extension => extension.type === 'node') as NodeExtension[]
|
||
|
// const markExtensions = extensions.filter(extension => extension.type === 'mark') as MarkExtension[]
|
||
|
|
||
|
return {
|
||
|
baseExtensions,
|
||
|
nodeExtensions,
|
||
|
// markExtensions,
|
||
|
}
|
||
|
}
|