4 ms·
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 sc
by pmr_ 13y ago
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.
- archagon 13y ago"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.
- bct 13y ago> 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.