mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 14:59:27 +08:00
fix: make TextAlign defaultAlignment setting work as expected
This commit is contained in:
parent
343ce756a8
commit
b76a53872b
@ -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}` }
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user