Skip to content

[✨ FEATURE] Add newspaces to chat input #2579

@enarroied

Description

@enarroied

πŸ” Feature Description

Hi!

When I create a chat element with;

tgb.chat("{messages}", users="{users}", sender_id="{users[0]}", on_action=chat)

It creates a chat interface. But the input field doesn't accept newlines, even if I add \n, the screen would print the \n. Even if I copy-paste a text with a newline into the chat input, it transforms them into spaces.

It would be nice to be able to add newlines (either from copy-pasted text or from a ctrl + enter command). This would make chatting a way better experience.

πŸ“œ Code of Conduct

  • I have checked the existing issues to avoid duplicates.
  • I am willing to work on this issue (optional)

βœ… Acceptance Criteria

  • A working demo or example code (if applicable) is provided.
  • Integration tests demonstrate the new functionality.
  • Any new code is covered by unit tests.
  • Code coverage remains at least 90%.
  • Related documentation updates and release notes are created.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions