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

No Line Breaks When Pasting #6

Open
mudgen opened this issue May 5, 2020 · 4 comments
Open

No Line Breaks When Pasting #6

mudgen opened this issue May 5, 2020 · 4 comments

Comments

@mudgen
Copy link

mudgen commented May 5, 2020

When I paste the contents of code into a misbehave component the resulting code is displayed in single line instead of many lines the code was copied from.

Is there any way to show the line breaks of code that has has been pasted in?

@orbitbot
Copy link
Owner

@mudgen Sorry for the slow reaction speed! only just saw this.

Hmm, would have to debug a bit, what browser / OS are you using? Any particular snippet to reproduce with? Where are you copying from?

By default, this seems to work for me, if I f.e. am copying in the text I have just written in this box to the demo implementations linked from the README. 🤔

@mudgen
Copy link
Author

mudgen commented May 20, 2020

I have this problem when when I copy code from vs-code and paste it into the demo.

@orbitbot
Copy link
Owner

Ok, interesting. I have managed to reproduce that case, though for some reason it seems to not be much of an issue if the text snippet is copied elsewhere inbetween. I'll try to get around to it at some point, but unfortunately mental bandwidth for this isn't hugely available, so if you're depending on this don't expect a too much progress in the short term as I don't immediately have an idea of what's going on.

That being said, it might be interesting to check the content of the clipboard before the paste with the clipboard api, or then attach something different as a store instance to see what's getting passed in. There might well be some kind of implementation detail somewhere, but it's kind of curious that I haven't been able to reproduce it with a handful of other apps.

@mudgen
Copy link
Author

mudgen commented May 22, 2020

Yes. @orbitbot Thanks so much for looking into this.

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

2 participants