chatscope / chatscope/chat-ui-kit-react

Pasting from clipboard replaces text already present in MessageInput

Open
#35 6 comments 1 reaction 1 assignee Claimed by @supersnager View on GitHub
enhancement question
Dominant language
JavaScript
Stars
1.8k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

Hey @supersnager

Got one more, pasting text into that already contains text, replaces it..
If you do concatenation magic via setState, then there is no way to paste in the middle of the string.

Steps:
1. copy text from elsewhere
2. type anything in MessageInput
3. paste copied text
Actual: written text gets replaced
Desired: text from clipboard is added after cursor position.

Sandbox here https://codesandbox.io/s/unruffled-booth-de3wb.

Is there a way to have a paste like we get with plain html input ?

Thank you.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.