5 ms·
Sure. A live preview window is a web preview window that is attached to another window (or buffer I suppose). The live preview window is basically a web brows
by blissofbeing 15y ago
Sure.
A live preview window is a web preview window that is attached to another window (or buffer I suppose).
The live preview window is basically a web browser window that auto-updates on each keypress from the attached editor window.
Espresso and Chocolat have this functionality, but it looks like these editors simply refresh the whole page on every keypress. This constant refreshing causes a flicker on each keypress and makes me turn it off because I don't like the constant flickering.
Livereload is similar because it refreshes the entire browser window on every file save. Its not instant so its not an ideal solution for me.
TM1 seems to only update that text that is updated, no flickering, possibly through some iframe injection technique, I find the iframe injection technique[1] much easier on the eyes because there isn't a page flicker on each keypress.
So, on to make some plugins... :)
[1]http://net.tutsplus.com/tutorials/html-css-techniques/how-to-inject-custom-html-and-css-into-an-iframe/ http://net.tutsplus.com/tutorials/html-css-techniques/how-to...
- aerique 15y agoThanks!
- nyellin 15y agoIt refreshes the whole page, but Emacs has http://www.emacswiki.org/emacs/MozRepl http://www.emacswiki.org/emacs/MozRepl
- themanr 15y agoI've found that http://livejs.com/ http://livejs.com/ works pretty well.
- alextgordon 15y agoI looked into doing this for Chocolat a50, but I couldn't figure out how to do it. It's clearly possible to update a single resource without doing a full reload, because the Web Inspector does it. The iframe idea is interesting. I'm not sure why it would be any less flickery, since it seems equivalent to what we do now: get the -mainFrame and call -loadHTMLString:baseURL: on it.
- blissofbeing 15y agoI don't know much obj-c (yet), so I'm not sure how similar you say Chocolat is to the iframe injection solution, but you can see it in action here: http://jsbin.com/#javascript,html,live http://jsbin.com/#javascript,html,live There is no flickering. If you could implement this into Chocolat I would use it everyday :)