2020-09-03 22:22:08 +08:00
|
|
|
import { Schema } from 'prosemirror-model'
|
2020-09-04 17:59:09 +08:00
|
|
|
import { Extensions } from '../types'
|
2020-09-04 18:10:35 +08:00
|
|
|
import getTopNodeFromExtensions from './getTopNodeFromExtensions'
|
|
|
|
import getNodesFromExtensions from './getNodesFromExtensions'
|
|
|
|
import getMarksFromExtensions from './getMarksFromExtensions'
|
2020-09-03 22:22:08 +08:00
|
|
|
|
2020-09-04 17:59:09 +08:00
|
|
|
export default function getSchema(extensions: Extensions): Schema {
|
2020-09-03 22:22:08 +08:00
|
|
|
return new Schema({
|
|
|
|
topNode: getTopNodeFromExtensions(extensions),
|
|
|
|
nodes: getNodesFromExtensions(extensions),
|
|
|
|
marks: getMarksFromExtensions(extensions),
|
|
|
|
})
|
|
|
|
}
|