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

feature: send multiline messages #44

Open
EndasUP1 opened this issue May 31, 2022 · 3 comments
Open

feature: send multiline messages #44

EndasUP1 opened this issue May 31, 2022 · 3 comments
Labels
Feature: New Issues and PRs related to new features.

Comments

@EndasUP1
Copy link

In default discord you can just Shift + Enter to go into new line, but here can't. Any other way to do it?

@DarkGuy10
Copy link
Owner

@Endass That's because the botclient uses an <input> tag whereas discord originally uses a content-editable div for input.
You can't shift+enter in inputs, but making a proper working content-editable is a real pain.

Any other way to do it?

Sadly, there isn't any yet. I intend to replace the input tag with a content-editable div in future. It's even in our to-do!

@lazuee
Copy link

lazuee commented Jun 2, 2022

@Endass That's because the botclient uses an <input> tag whereas discord originally uses a content-editable div for input. You can't shift+enter in inputs, but making a proper working content-editable is a real pain.

Any other way to do it?

Sadly, there isn't any yet. I intend to replace the input tag with a content-editable div in future. It's even in our to-do!

This might be useful
https://www.reddit.com/r/reactjs/comments/q3qcc9/anyone_ever_tried_creating_a_text_input_similar/

@DarkGuy10
Copy link
Owner

This might be useful https://www.reddit.com/r/reactjs/comments/q3qcc9/anyone_ever_tried_creating_a_text_input_similar/

That's oddly specific. Anyways, as you can read in the comments, managing content-editable divs in react is painful, especially with the cursor jumping back to the beginning after each render. There are Slate.js and other libs for this sole purpose, but thanks for the lead!

@DarkGuy10 DarkGuy10 changed the title Can't go to new line feature: send multiline messages Jun 3, 2022
@DarkGuy10 DarkGuy10 added the Feature: New Issues and PRs related to new features. label Jun 3, 2022
@DarkGuy10 DarkGuy10 moved this to Todo in Spearhead Jun 5, 2023
@DarkGuy10 DarkGuy10 removed this from Spearhead Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: New Issues and PRs related to new features.
Projects
None yet
Development

No branches or pull requests

3 participants