react-terminal-component icon indicating copy to clipboard operation
react-terminal-component copied to clipboard

Does not render new line with "\n" in text

Open singhsaubhik opened this issue 5 years ago • 1 comments

It does not render new line with "\n" in text. let say text is "Hi this is a\n test text". Then this should be rendered like: $ Hi this is a $ test text

but it is rendering: $ Hi this is atest text

singhsaubhik avatar Dec 08 '19 07:12 singhsaubhik

The library is built using <input> for input, which will never render multiline. You either need to change the source code to generate a <textarea> or use some DOM replacement to swap out <input> with a <textarea>. I did the latter and the classes still work.

I would suggest the author add a multiline prop which generates a textarea instead of input

Alec-Alameddine avatar Jul 26 '22 06:07 Alec-Alameddine