improve resetNodeAttributes command

This commit is contained in:
Philipp Kühn
2020-11-18 15:18:30 +01:00
parent 4a78318a74
commit e9602626b7
6 changed files with 48 additions and 16 deletions

View File

@@ -48,7 +48,7 @@ const TextAlign = Extension.create({
* Unset the text align attribute
*/
unsetTextAlign: (): Command => ({ commands }) => {
return this.options.types.every(type => commands.updateNodeAttributes(type, { textAlign: null }))
return this.options.types.every(type => commands.resetNodeAttributes(type, 'textAlign'))
},
}
},