change isActive
This commit is contained in:
13
packages/core/src/utils/getSchemaTypeByName.ts
Normal file
13
packages/core/src/utils/getSchemaTypeByName.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user