refactoring

This commit is contained in:
Philipp Kühn
2020-03-28 23:54:49 +01:00
parent 1431bc73b3
commit 4d7658f183
5 changed files with 21 additions and 30 deletions

View File

@@ -27,14 +27,14 @@ export default class ExtensionManager {
get nodes(): any {
return collect(this.extensions)
.where('type', 'node')
.mapWithKeys((extension: any) => [extension.name, extension.schema])
.mapWithKeys((extension: any) => [extension.name, extension.schema()])
.all()
}
get marks(): any {
return collect(this.extensions)
.where('type', 'mark')
.mapWithKeys((extension: any) => [extension.name, extension.schema])
.mapWithKeys((extension: any) => [extension.name, extension.schema()])
.all()
}

View File

@@ -10,23 +10,8 @@ export default abstract class Node extends Extension {
public topNode = false
// get type() {
// return 'node'
// }
// get view(): any {
// return null
// }
// get schema(): any {
// return null
// }
public abstract schema: any
// public abstract plugins?: any
// command() {
// return () => {}
// }
schema(): any {
return null
}
}