.terminal {
--animation: terminal-glow;
--color: green;
}
.terminal {
--animation: terminal-glow;
--color: rgba(0, 255, 0, 1);
--error-color: rgba(255, 0, 0, 1);
}
.terminal-error {
--color: var(--error-color);
}
.terminal span[data-text] {
text-shadow: 1px 1px 5px var(--color);
}
I'm having trouble following this guide for Prism syntax highlighting https://github.com/jcubic/jquery.terminal/wiki/Formatting-and-Syntax-Highlighting
I've included required css/js files
I'm only seeing bolding of token characters. No Python syntax highlighting
$.terminal.syntax('python')
Hey Jakub. I'm getting a null error with no throw response when trying to 'cat' and folder instead of a file.
-> {"version":"1.1","method":"is_image","params":["0b172c7adcd3eed789d772c46ee947634f52e0563ed17dbaa3e6a07365114fdc5a2b","/x01"],"id":11}
fs.js:26 <- {"jsonrpc":"2.0","result":false,"id":11,"error":null}
fs.js:26 -> {"version":"1.1","method":"readFile","params":["0b172c7adcd3eed789d772c46ee947634f52e0563ed17dbaa3e6a07365114fdc5a2b","/x01"],"id":12}
fs.js:26 <- {"jsonrpc":"2.0","result":"","id":12,"error":null}
DevTools failed to load SourceMap: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.preload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.postload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for https://cdnjs.cloudflare.com/ajax/libs/less.js/3.11.3/less.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
Instead of printing 'invalid file' invalid input it just skips a line and returns to the prompt.
Hi @jcubic,
A question about terminal mousewheel
callback. You can set it to a function that returns true/false like so:
terminal.option('mousewheel', function (e) {
return someCheck(e) ? true : false;
});
A while ago it used to be that if true
is returned - the terminal will handle the even as usual (i.e. scroll).
But if false
is returned - the terminal won't do anything with the event and let it propagate to other consumers who might be interested in handling this even.
Now I see that in the case of returning false
the terminal doesn't process the event, but it also seems to prevent all other consumers from receiving this event.
I wonder if this was an intentional change and the way it works now is expected?
false
the event is not propagated to other listeners? This is an example when it causes a problem: https://clcalc.net/#eyJjIjpbIjIrMiIsInNpbihwaSkiLCJiYXNlNjRFbmNvZGUodG9VdGY4KFwiSGVsbG/CoHdvcmxkXCIpKSIsIjEwISIsIiNmZjAwMDDCoCvCoCMwMGZmMDAiLCIxMMKgQcKgKsKgMTEwwqBWwqAqwqAxwqBkYXnCoHRvwqBrV2giLCIyXjMyIiwicGxvdDJkKHheMyzCoHgswqBbLTUswqA1XSkiLCJwbG90MmQoeF4yLMKgeCzCoFstNSzCoDVdKSJdLCJ2IjoiMSJ9 - on this page you normally can scroll terminal with the mouse wheel, but when the mouse pointer is over one of the graphs I want graph to be zoomed instead. You can see in that case page is not scrolling (which is correct) but the graph is not zooming either, because it appears like the terminal prevents it from receiving mousewheel
events.
$(document).on({ 'mousewheel': function (e) { zoomGraph(e); } }, '.graphs-css-selector');
The only thing you can try is to add zoom to terminal mousewheel not calling it outside
This is what I was going to use as a workaround, but I just did a quick test of your suggestion to use e.preventDefault(); return true;
and it seems to work just fine. This approach seems much better to me, as it doesn't tie terminal to the plot library. Thank you for the suggestion!
hello [[@;;;;http://placekitten.com/200/140]] world
<span><img><span>
that you can style with css to make image float.
term.echo('hello [[@;;;;http://placekitten.com/200/140]] world', {
finalize: function(div) {
div.addClass('float-image');
}
});
.float-image img, .float-image span { float: left; }