TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Scratchpad.io - a real-time HTML and CSS editor

298 pointsby brycecolquittover 12 years ago

45 comments

arscanover 12 years ago
Its a little thing, but i like how you literally don't need to click on any buttons to save / create a new one / etc. I also like how you can create your own customized path to help you remember the link... just type in a new path and start editing, and you now can share that custom URI.<p>I think its important to create as little friction to usage as possible, and you've done that.
评论 #4934076 未加载
评论 #4934094 未加载
bluetideproover 12 years ago
The first thing that I loved about this, that drives me crazy on other real-time online editors, is that pressing "tab" actually creates a tabbed space, and doesn't change the active textarea. Nice job!<p>Any plan on open sourcing the code to do the real-time editing? I would love to use this real-time editing concept in a project I'm working on.
评论 #4933724 未加载
mericover 12 years ago
Looks like you've made sure any recursion only goes one deep? (Awesome)<p><a href="http://scratchpad.io/5mqq98D51P" rel="nofollow">http://scratchpad.io/5mqq98D51P</a><p>Every change forces a reload on the iframe. I wonder if there's a way to prevent that.<p><pre><code> &#60;html&#62; &#60;body&#62; &#60;h1&#62;Heading&#60;/h1&#62; &#60;iframe width="640" height="480" src="http://scratchpad.io/5mqq98D51P"&#62; &#60;/iframe&#62; &#60;/body&#62; &#60;/html&#62;</code></pre>
评论 #4936380 未加载
dergachevover 12 years ago
Thats awesome. Also looking at the source, I discovered it's using keymaster.js and firebase.js, which are new to me. And the implementation of scratchpad.io is very simple and elegant. The design is beautiful, and the code (in scratchpad.js) is so simple that it makes for a good tutorial on using firebase and ace.js.<p>In fact, if anyone else is interested in forking the code and experimenting with it, feel free to fork my plunk and go to town:<p><a href="http://plnkr.co/edit/49fOC5Mq3bcBysKfdPor?p=preview" rel="nofollow">http://plnkr.co/edit/49fOC5Mq3bcBysKfdPor?p=preview</a><p>(Hope you appreciate the irony of forking scratchpad.io via Plunker. Also, it'd be wicked if Plunker could automatically "fork" html webpages, pull in all the required resources and/or updating path references).
rjvirover 12 years ago
For a first time coder, being able to see your page change live is very helpful in getting to learn HTML and CSS. This is an amazing complement to the book you are writing - nice work Nathan!
gaileesover 12 years ago
Finally....they had something close to this on codecademy, but this is exactly what I need when trying out new stuff!
评论 #4933662 未加载
geuisover 12 years ago
Ok, this editor rocks. Nice use of Ace.js.<p>One of my biggest frustrations with jsfiddle is the crappy coding area (not to mention the default selection of Mootools among others).
评论 #4933747 未加载
pxlpshrover 12 years ago
This is really great, especially as a compliment to the learning tools coming to market.<p>For front-end designers looking for a similar effect within your own text editor and browser window, I can not live without the CodeKit app now. It does a similar real-time effect each time the template files are saved. Also supports less, js debugging/minification, and other production processes.<p><a href="http://incident57.com/codekit/" rel="nofollow">http://incident57.com/codekit/</a>
robotover 12 years ago
Slightly off topic: You use "enough to be dangerous" with a positive meaning, as in enough to make a real difference in the world, while Alexander Pope quote you use is probably negative: "A little learning is a dangerous thing." as in, someone who knows little can do more harm than good.
评论 #4934020 未加载
overshardover 12 years ago
I don't wanna down a nice looking project, very well done on the interface but, another one? There are already like 7+ of these I don't really see the need to produce another one especially one that is HTML+CSS only when many of the others feature JavaScript and more.<p>What features do you provide that say, <a href="http://jsfiddle.net/" rel="nofollow">http://jsfiddle.net/</a>, <a href="http://cssdesk.com/" rel="nofollow">http://cssdesk.com/</a>, <a href="http://dabblet.com/" rel="nofollow">http://dabblet.com/</a>, <a href="http://rendera.heroku.com/" rel="nofollow">http://rendera.heroku.com/</a>, doesn't? (Just the first 4 items that came up in a Google search, the list could go on...)
评论 #4933843 未加载
评论 #4933950 未加载
评论 #4933847 未加载
jakozaurover 12 years ago
Have the realtime plus: <a href="http://jsfiddle.net/" rel="nofollow">http://jsfiddle.net/</a> And you will rock!<p>Right now, you are just awesome ;).
评论 #4933745 未加载
randylubinover 12 years ago
This is perfect - love the immediate feedback for my own prototyping.<p>Could probably use the multi-user sync for front-end technical interviews.
评论 #4933694 未加载
mahmoudimusover 12 years ago
Oh man this is incredible - I want to find a way to embed this into Emacs, this is so useful.
评论 #4934311 未加载
mixmastamykover 12 years ago
Great work. (love things that are "clean")<p><pre><code> Press ⌘ + i to toggle fullscreen view </code></pre> I don't have this key and suspect a lot of others don't either. ;)
评论 #4934167 未加载
danielfriedmanover 12 years ago
This is awesome! I constantly look for live editors but haven't found a good one for front-end. I tried Adobe Brackets, Firebug (for in-window editing) but all had their complexities and constraints. Scrathpad.io is by far the most intuitive and best one for HTML and CSS out there!
评论 #4933755 未加载
quartertoover 12 years ago
Not to detract from what is a pretty cool project, and I hope OP had fun making it, but: <a href="http://codepen.io" rel="nofollow">http://codepen.io</a> is this and quite a bit more. It supports HTML+JS+CSS as well as e.g. Jade, SASS and CoffeeScript- if that's what floats your boat- and some nice social features, like featured pens and saving to Gists.<p>Other commenters have pointed out a myriad of similar such services. I'm surprised Codepen hasn't come up already.<p>@brycecolquitt, you are obviously very talented, and I look forward to whatever you come up with in the future. I just hope it's not in a space as hotly contested as this.
评论 #4933999 未加载
评论 #4934454 未加载
评论 #4934053 未加载
mattlongover 12 years ago
Very nice. Love the responsiveness and good use of (OS-aware?) keyboard shortcuts.<p>Bug: (Chrome Version 23.0.1271.97 on OSX)<p>Expand the side panel and select a document from the RECENT list. The editor area doesn't update completely; the text loads, but there are only line numbers up to the length of the previously viewed document and it's impossible to move the cursor below the last line number (<a href="http://i.imgur.com/h9nMh.png" rel="nofollow">http://i.imgur.com/h9nMh.png</a>).<p>EDIT: Correction, the line numbering is correct, the problem is with the line-height in the editor.
评论 #4934725 未加载
scott_karanaover 12 years ago
Absolutely amazing. A couple things that bother me, and they might just be from Ace.js:<p>When typing text into a &#60;p&#62; or an &#60;h1&#62; for example, if I type "I'm", I get the smart double quote feature, and end up typing:<p>I'm going to the zoo'<p>Likewise, if I go back into the stream of some text in a &#60;p&#62;, and want to wrap it in a span, if I click at the start of it and type &#60;span id="foo"&#62;, I get another span on the other side of my cursor, pushing the existing text over.<p>Otherwise, utterly fantastic tool. Trying to use it for real work already :)
评论 #4935726 未加载
sachleenover 12 years ago
Pretty nice, I'll probably be using this for debugging and examples.<p>Bug:<p>Open the about panel by clicking the icon in top left (three horizontal bars). Close the panel by clicking the same icon.<p>Maximize the preview window by clicking the arrow in the top right of the edit panel. Click the arrow to view the code panel again.<p>The about panel pops out as well and the arrow button covers the show/hide about (three horizontal bars) button. Expected behavior: it should return to the view that I had before maximizing.
评论 #4933939 未加载
kurtfunaiover 12 years ago
Thank you for this! I'm in the process of teaching my brother HTML/CSS, and this is the perfect tool for when he is not sitting next to me.
dmorover 12 years ago
I would love to be able to work in realtime (a la Etherpad) with someone else - would take pairing to a whole new level. Also, style management could quickly get messy - I know you are trying to keep the UI as simple as possible, but I would love to be able to quickly toggle between HTML and CSS on different tabs (instead of scrolling).
gbadmanover 12 years ago
Nicely done on Scratchpad. The interface seems to be the right combination of simple and intuitive. It would be great to see the source code as many others have said.<p>I'm particularly curious as to how you've done the collaborative bit given that you don't have explicit control over the order of operations of edits.
mrmirzover 12 years ago
I would assume realtime editing will be supported by the browser developer tools fairly soon.
tomasienover 12 years ago
Cool! I'm going to use it for debugging.<p>Quick thing: I have a page quickramen.com/test/test that has links that navigate around the page. If you click those now, it loads the code again in another mini-window and doesn't go anywhere.<p>JUST a bug to be aware of if you're keeping a log!
edwinyzhover 12 years ago
I'm building a similar one (it also allows you to inspect html elements like using Firebug or Webkit's Dev tools), and it's a native Windows app (and really fast one!) <a href="http://liveditor.com" rel="nofollow">http://liveditor.com</a>
Aardwolfover 12 years ago
"Press ⌘ + i to toggle fullscreen view"<p>What is this thing, I don't have such a key on my computer?
评论 #4937079 未加载
ph0rcyasover 12 years ago
How is this different from codemirror? Codemirror's preview utility easily handles this (and much more versatile in other ways):<p><pre><code> http://codemirror.net/ http://codemirror.net/demo/preview.html</code></pre>
ams6110over 12 years ago
Nice work and all, but what's wrong with a local .html file your favorite text editor, and a browser? I've been doing that for <i>years</i> to play around with html, css, and js.
评论 #4934111 未加载
JimmaDaRustlaover 12 years ago
I use Livejs for the same effect, but this is much smoother obviously since it can trigger on key press rather than polling the resource constantly from the web page.
stuaxoover 12 years ago
Seems very slow in firefox, can't keep up with my typing and missed the characters inbetween.<p>Not sure if it's supposed to just say 'Loading...' at the top the whole time either..
aleemover 12 years ago
Sinatra.io does something similar, also built on Firbase. I believe their code is on github if anyone is interested in implementation.
评论 #4936311 未加载
chaseleeover 12 years ago
Really nice execution on this. So simple and just what I'd want if I was just starting to learn how to code. Bravo.
joebeeteeover 12 years ago
Beautiful. Love the fact that out of habit I pressed Cmd+D to delete the line and it worked :) Nice work
ewolfeover 12 years ago
What would it take to implement javascript? Is it merely trivial, or was it left out for security?
hybrid11over 12 years ago
Really cool, kinda like brackets.io, but online!<p>Is there anyway to make the text editor pane resizeable?
评论 #4934764 未加载
iamhenryover 12 years ago
Will you be able to make new projects and make them private?
gaileesover 12 years ago
It'd be great if the command tip wasn't only for Mac btw
评论 #4933668 未加载
zapt02over 12 years ago
Very impressive. Love the dark color scheme.<p>LESS/SASS possible? :)
评论 #4934804 未加载
schpetover 12 years ago
dear scratchpad: <a href="http://scratchpad.io/j2la3taRYW#fullscreen" rel="nofollow">http://scratchpad.io/j2la3taRYW#fullscreen</a>
评论 #4934209 未加载
path411over 12 years ago
Would like the option to import a url to edit.
anuaittover 12 years ago
it will be great if we can pick some templates like bootstrap and start coding right away from the application.
kineover 12 years ago
This is really cool. Nice work
pjrvsover 12 years ago
i wish i could adjust the width of the code section. otherwise it's pretty neat.
matt_over 12 years ago
Get this added to repl.it
orlandobover 12 years ago
very cool!