Fix typo in text-serializers-from-schema function
This commit is contained in:
committed by
Dominik
parent
155955c9a9
commit
819622c202
@@ -0,0 +1,9 @@
|
||||
import { Schema } from 'prosemirror-model'
|
||||
import { TextSerializer } from '../types'
|
||||
|
||||
export function getTextSerializersFromSchema(schema: Schema): Record<string, TextSerializer> {
|
||||
return Object.fromEntries(Object
|
||||
.entries(schema.nodes)
|
||||
.filter(([, node]) => node.spec.toText)
|
||||
.map(([name, node]) => [name, node.spec.toText]))
|
||||
}
|
||||
Reference in New Issue
Block a user