fix: make TextAlign defaultAlignment setting work as expected

This commit is contained in:
Joe 2022-11-27 01:25:07 -05:00
parent 343ce756a8
commit b76a53872b

View File

@ -41,10 +41,6 @@ export const TextAlign = Extension.create<TextAlignOptions>({
default: this.options.defaultAlignment,
parseHTML: element => element.style.textAlign || this.options.defaultAlignment,
renderHTML: attributes => {
if (attributes.textAlign === this.options.defaultAlignment) {
return {}
}
return { style: `text-align: ${attributes.textAlign}` }
},
},