Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You know, I'm usually very skeptical of web apps, but building a text editor in WebKit actually seems like a really good idea. Everything a browser should be good at — text display, scripting, styling — also applies to text editors. You don't really have to worry about complex UI, animation, or user input. You also get remote access almost for free.

What other text-centric apps can be made better by a browser framework? Maybe the terminal?



So why is every text editor I have ever seen embedded in a website an abomination?

> text display, scripting, styling

The only thing that really matters is scripting. Every serious editor has solved displaying text and styling since ages and those two points aren't even that important in programming languages. All you want is a syntax aware highlighting. Maybe underlines and a little bold here and there.

Scripting is the really hard part. There are many flavors, languages, APIs to chose from. Just because you now can script things in <hip-language-of-the-day>, the problem isn't solved. My editor uses a lisp dialect and I'm perfectly happy with it, not because of the language choice but the APIs and amount of integration.

One thing that is incredibly important for text editors is speed: something web engines are notoriously bad at.


> So why is every text editor I have ever seen embedded in a website an abomination?

Because most websites use contenteditable for their rich text editors, which is horrible to deal with. It's not standardized, it gives developers very little control, and its output and capabilities vary a lot from browser to browser.

Web rich text editors that don't suck - e.g. Google Docs - bypass the browser's support for rich text editing entirely. This makes them usable, but it also means everything has to be implemented from scratch, so the code is complex. AFAIK there are no general purpose rich text editors built like this that are open source or even licensable.

There are some pretty good non-contenteditable code editors, though. Presumably Atom will be built in this style.


  "Every serious editor has solved displaying text and styling since ages ago..."
Sure, but why reinvent the wheel? In this case, Github is leveraging a technology specifically optimized for text and styling. They don't have to maintain it, and they get a lot of cutting-edge optimizations for free. It also gives them the freedom to do some crazy things that would otherwise be very difficult — see Light Table.

  "...and those two points aren't even that important in programming languages."
I disagree. Efficient text display and presentation in a text editor are very important, at least for me. Not that scripting is any less important, but it looks like Github has that front covered as well. (Then again, I've never been a heavy vim or emacs user. I guess I'm what you might call a "filthy casual".)

  "One thing that is incredibly important for text editors is speed: something web engines are notoriously bad at."
I was under the impression that web engines are really good at text when there's not a lot of other crazy nonsense going on. Guess we'll see!

  "So why is every text editor I have ever seen embedded in a website an abomination?"
My guess is going (partially) native and using Node.js will make the experience a whole lot better.


HTML's not good at windows, apps, doesn't have any sort of concept of a widget and has the kind of layout rules you'd have a tough time beating if you were sitting there trying to be deliberately malicious to future programmers.

It's not a good idea, but given the abysmal state that desktop apps seem to be in at the moment[1], it's probably the least bad idea.

[1] Been about 5 years since I did a desktop app, but if anything they look to be getting worse. WPF, flop. Flex, flop. GTK+ looks poo. If I had to do a cross platform desktop app, I wouldn't even know where to start.


I agree with you, but I don't think most of those things are really vital for a great text editor. For the most part, it's just a giant window with your text in it, maybe a sidebar or two. Most of the magic happens under the hood. That's why I think this is a good idea.

Dunno about cross-platform app development, but Cocoa on OSX is pretty nice. QT isn't bad either, from what I've tried.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: