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

[PRO]: Using AI resets text styles #5027

Open
2 tasks done
schnubor opened this issue Apr 3, 2024 · 3 comments
Open
2 tasks done

[PRO]: Using AI resets text styles #5027

schnubor opened this issue Apr 3, 2024 · 3 comments
Assignees
Labels
Category: Pro The issue or pull request is related to the pro packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@schnubor
Copy link

schnubor commented Apr 3, 2024

Which packages did you experience the bug in?

extension-ai

What Tiptap version are you using?

2.2.4

What’s the bug you are facing?

Hey,

I was wondering if it's somehow possible to keep the active font size after certain AI operations are applied to the selected text? Here's an example I recorded in the official template:

CleanShot.2024-03-28.at.23.37.35.mp4

Is this a bug or just missing functionality of the extension? Any other way to keep the font size (and potentially any other text styles)? I originally created this issue in the template repo, but I think it might be a more general thing.

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

I understand that it's difficult to keep text styles on individual words/characters within the selection since they get completely replaced. However, keeping text styles (font size, bold, etc.) that are applied to the entire selection or paragraph would be great.

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@schnubor schnubor added Category: Pro The issue or pull request is related to the pro packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Apr 3, 2024
@github-project-automation github-project-automation bot moved this to Triage open in Tiptap Apr 3, 2024
@yordandev
Copy link

I cannot watch your video but we are experiencing the same issue when streaming is set to true. If set to false, it respects the formatting but it takes forever.

@nperez0111
Copy link

We are working on some updates to the ai extension, I will see if we can get this fixed as well

@nperez0111
Copy link

So after looking into it more I've narrowed it down to insertContentAt where if what is supplied is a node, it will replace the whole node, which does not maintain the marks. I don't see an obvious solution to this, but will keep it in mind as we go.
If the content that is generated is just text, then it will preserve marks just fine.

The reason that this does not work in streaming mode is that we try to apply the "aiMark" which then ends up removing previously applied marks.

@nperez0111 nperez0111 self-assigned this Jun 4, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in Tiptap: Issues Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Pro The issue or pull request is related to the pro packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
Status: Needs Triage
Status: Triage open
Development

No branches or pull requests

3 participants