Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with TextAlign not inheriting defaultOptions of types #1430

Closed
acidjazz opened this issue Jun 8, 2021 · 5 comments
Closed

Bug with TextAlign not inheriting defaultOptions of types #1430

acidjazz opened this issue Jun 8, 2021 · 5 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@acidjazz
Copy link

acidjazz commented Jun 8, 2021

I'm not sure why this an issue but text alignment has never worked for us in v2, I finally did some messing with the extension and got it to work by specifying the types:

TextAlign.configure({
  types: ['paragraph', 'heading'],
})

I saw these were already in the defaultOptions so I don't know why this fixes our issue, are the options somehow dynamically decided?

@acidjazz acidjazz added Type: Bug The issue or pullrequest is related to a bug v2 labels Jun 8, 2021
@philippkuehn
Copy link
Contributor

Can you create a reproducable demo please because text align is working fine here: https://www.tiptap.dev/api/extensions/text-align/#textalign

@sh-winter
Copy link

您能否创建一个可重现的演示,因为文本对齐在这里工作正常:https : //www.tiptap.dev/api/extensions/text-align/#textalign

In this example, heading can adjust the alignment normally, but paragraph can't

@hanspagel
Copy link
Contributor

@philippkuehn Tests fail too. ✌️

@philippkuehn
Copy link
Contributor

@sh-winter @hanspagel oh no. but this bug was introduced by this fix yesterday ddb9a4b

@philippkuehn
Copy link
Contributor

There are no default types for TextAlign extension anymore. You have to configure them by yourself. Usually something like:

TextAlign.configure({
  types: ['heading', 'paragraph'],
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

4 participants