ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
26.65k stars 2.23k forks source link

[Bug]: Text align is applied to a single paragraph only #5254

Closed svilen-ivanov-kubit closed 2 months ago

svilen-ivanov-kubit commented 2 months ago

Affected Packages

core, extension-text-align

Version(s)

2.5.0-beta.4

Bug Description

If you select several paragraphs and apply an alignment, only one paragraph is updated. Here is an example from https://tiptap.dev/docs/editor/api/extensions/text-align

https://github.com/ueberdosis/tiptap/assets/92510182/387b6c8b-eb92-4e69-9d55-52038d20295b

See how first paragraph never aligns.

The problem is not reproducible with 2.4.0. I was able to track the problem to a recent change of the updateAttributes command: https://github.com/ueberdosis/tiptap/pull/5154

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

All paragraphs should align.

Additional Context (Optional)

No response

Dependency Updates

nperez0111 commented 2 months ago

I've reverted this change for now. I could not spend the time at the moment to fix the original bug

nperez0111 commented 2 months ago

Ok, releeasing that with https://github.com/ueberdosis/tiptap/releases/tag/v2.5.0-beta.5