change isActive

This commit is contained in:
Philipp Kühn
2020-03-31 12:53:52 +02:00
parent 13cb03f93b
commit 6f3d3901ce
3 changed files with 27 additions and 29 deletions

View File

@@ -0,0 +1,13 @@
import { Schema } from 'prosemirror-model'
export default function getSchemaTypeByName(name: string, schema: Schema) {
if (schema.nodes[name]) {
return 'node'
}
if (schema.marks[name]) {
return 'mark'
}
return null
}