add getNodeType

This commit is contained in:
Philipp Kühn
2020-04-22 00:09:31 +02:00
parent 023c16a4f5
commit 3d02da20ff
3 changed files with 17 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ export default class Heading extends Node {
commands(): CommandSpec {
return {
heading: next => attrs => {
this.editor.toggleBlockType(this.type, this.editor.schema.nodes.paragraph, attrs)
this.editor.toggleBlockType(this.name, 'paragraph', attrs)
next()
},
}