-
Notifications
You must be signed in to change notification settings - Fork 107
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
Improve white space on terminal application #36
Comments
Interesting point @heowc I have never noticed that, but the implementation is really easy to get done. I have just planned it and, asap, I'll try to release that 👍 Regarding Hexo, I'll be very happy in seeing your lib 😃 |
Thanks a lot. 👍 |
@rafaelcamargo I guess you must add |
Well noticed @mostafaebrahimi! My strategy would basically be: What d'you think about this? |
@rafaelcamargo I think it's a better way. 1 - change function appendText(container, text){
container.innerText = text;
container.classList.add('terminal-response-plain-text')
} 3 - change function appendHtml(container, html){
container.appendChild(html);
container.classList.add('terminal-response-html-text')
} What do you think about these changes? |
Me too! I don't use |
@mostafaebrahimi The general idea would be exactly that. 👍 function appendText(container, text){
container.innerText = text;
addElementCssClass(container, 'terminal-response-plain-text');
}
function appendHtml(container, html){
container.appendChild(html);
addElementCssClass(container, 'terminal-response-html-text');
}
function addElementCssClass(element, cssClass){
element.classList.add(cssClass);
} |
@rafaelcamargo Great 💯 |
hello, @rafaelcamargo
Thanks for creating glorious-demo.
I used glorious-demo on my blog.
And I found a problem. There is no problem with
editor
type, butterminal
type does not represent white space.I used a temporary
<span style =' white-space: pre '> ... </ span>
to solve this problem. But I think there is a better way.example
result
+) I will make hexo tag library of glorious-demo. how about you?
The text was updated successfully, but these errors were encountered: