rename some vars

This commit is contained in:
Philipp Kühn
2020-04-10 22:07:27 +02:00
parent 4932488942
commit bd4fe7e5e3
7 changed files with 22 additions and 22 deletions

View File

@@ -15,7 +15,7 @@ export default abstract class Extension {
public abstract name: string
public type = 'extension'
public extensionType = 'extension'
public created() {}

View File

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

View File

@@ -7,11 +7,11 @@ export default abstract class Mark extends Extension {
super(options)
}
public type = 'mark'
public extensionType = 'mark'
abstract schema(): MarkSpec
get schemaType() {
get type() {
return this.editor.schema.marks[this.name]
}

View File

@@ -7,13 +7,13 @@ export default abstract class Node extends Extension {
super(options)
}
public type = 'node'
public extensionType = 'node'
public topNode = false
abstract schema(): NodeSpec
get schemaType() {
get type() {
return this.editor.schema.nodes[this.name]
}