Comments (8)
As for the scroll to bottom thing, I thought I had already implemented that feature but as it seems it got lost somewhere. The terminal is definitely intended to scroll to bottom after input. Your idea of being able to toggle it is cool too, will consider adding it.
The command callback idea is really nifty and something I should have considered initially, it’s passed by me completely. I’ll consider adding that too.
from react-console-emulator.
Pushed my proposed changes in accordance with this request in f2d2525. You can check out the proposed new command callback system and automatic scrolling there.
I believe this is the best of both worlds: Automatic scroll per default that can be disabled if scrolling at a later time is desired. Manual scrolling is also easy to do via the command callback, as all you need to do is to get the root element and set element.scrollTop = element.scrollHeight
.
from react-console-emulator.
Also added live demo at https://linuswillner.me/react-console-emulator/ now.
from react-console-emulator.
@linuswillner I have a problem trying it on my machine in my project, can you please publish this as alpha to npm? Or you can just merge it, from what I had a look at a code it should work. I'll notify you if it's not sufficient.
from react-console-emulator.
Just published version 1.7.0 to NPM. Feel free to try it out and reopen this if any issues arise 😄
from react-console-emulator.
With 1.7.0, I get this error, I thought it was a linking issue of mine when I tried to use it from a forked repo, but now I get it from prod. as well.
Edit: I can't re-open @linuswillner
from react-console-emulator.
Good grief, why did I not think of that... Yeah of course, it makes total sense now. It’s an issue with the build flow that is only affected by the package. I’ll fix that tomorrow, sorry about this.
I can’t issue a fix at this very moment, but a temporary fix is to obtain the utils
folder from this repository and place it in the directory one level above lib/Terminal.js
(As the error says) if you need to make changes quickly. Otherwise you can wait until tomorrow when I can issue a proper fix.
Sorry about the inconvenience once again.
from react-console-emulator.
Moving this conversation to #39.
from react-console-emulator.
Related Issues (20)
- Make a maxOutput prop? HOT 1
- Live demo leads to a 404 page HOT 5
- Duplicate welcomeMessage HOT 2
- Add option to render spaces for stringified objects
- Live output.
- Prompt/input styling is only applied to the latest prompt/input HOT 2
- passThroughCommand like prop HOT 3
- Support for confirmation lines? HOT 2
- Possibility of catch all command? HOT 2
- Is there a way to display the text information that has been passed on? HOT 2
- Dual Input & Output terminals HOT 4
- "ReactHotLoader" occurrences in published package HOT 6
- Feature request: Command completion HOT 2
- [object Object] when dangerMode={true} HOT 8
- pushToStdout function changes the state inplace
- Is it possible to simulate typing? HOT 1
- Query regarding support for react native. HOT 1
- Wrap input instead instead of horizontal scrolling HOT 1
- Is it possible to enter text in console manually from server without typing a command? HOT 1
- dangerMode echos the custom label as [Object, object]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-console-emulator.