diff --git a/packages/extension-text-align/src/text-align.ts b/packages/extension-text-align/src/text-align.ts index d18202fd..93730520 100644 --- a/packages/extension-text-align/src/text-align.ts +++ b/packages/extension-text-align/src/text-align.ts @@ -60,10 +60,10 @@ export const TextAlign = Extension.create({ return false } - return this.options.types.every(type => commands.updateAttributes(type, { textAlign: alignment })) + return this.options.types.some(type => commands.updateAttributes(type, { textAlign: alignment })) }, unsetTextAlign: () => ({ commands }) => { - return this.options.types.every(type => commands.resetAttributes(type, 'textAlign')) + return this.options.types.some(type => commands.resetAttributes(type, 'textAlign')) }, } },