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

[Question] Multiline input textbox #1182

Closed
Stardox opened this issue Oct 1, 2018 · 3 comments
Closed

[Question] Multiline input textbox #1182

Stardox opened this issue Oct 1, 2018 · 3 comments

Comments

@Stardox
Copy link

Stardox commented Oct 1, 2018

Is it possible to enable the multiline support / text wrap of the textbox (wc-shellinput)? If so is it possible out-of-the box, for example via a setting / WebChat parameter?

After a short research I found following issue, however it seems that it has been abandoned long time ago.

I have tried to replace the input itself with textarea element (after the initialization and rendering of the chat), however even though I achieved the multiline, it was no longer possible to send the messages anymore.

@rosskyl
Copy link
Contributor

rosskyl commented Oct 4, 2018

I just did this by doing a custom build of BotChat.js. You just need to change Shell.tsx to use a textarea on line 155 and then change the events to be types of React.KeyboardEvent<HtmlTextAreaElement>. Then you build it and use that instead of linking to the cdn's BotChat.js.

@compulim
Copy link
Contributor

compulim commented Oct 5, 2018

Stay tuned. It is coming in Web Chat v4.

@Stardox
Copy link
Author

Stardox commented Oct 5, 2018

Thanks both of you for the responses!

In the meantime I have managed to workaround it by hiding the original wc-shellinput and rendering my own TextArea element in its place. Next up, I have hooked up my own event listener on the send button which will move the text from my own TextArea into the original wc-shellinput React component. Not the pretties approach, but will do for now. :-)

Closing my question.

@Stardox Stardox closed this as completed Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants