fix: fix a bug where setting text align isn’t working when heading extension is not added
This commit is contained in:
@@ -60,10 +60,10 @@ export const TextAlign = Extension.create<TextAlignOptions>({
|
||||
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'))
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user