feat: add updateAttributes() command, deprecate updateNodeAttributes(), fix #254

This commit is contained in:
Philipp Kühn
2021-04-07 21:17:02 +02:00
parent e61b2a51ed
commit aac32b4df6
5 changed files with 73 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ export const TextAlign = Extension.create<TextAlignOptions>({
return false
}
return this.options.types.every(type => commands.updateNodeAttributes(type, { textAlign: alignment }))
return this.options.types.every(type => commands.updateAttributes(type, { textAlign: alignment }))
},
unsetTextAlign: () => ({ commands }) => {
return this.options.types.every(type => commands.resetNodeAttributes(type, 'textAlign'))