Code editors are surprisingly complex, it's not about simply putting lines on the screen. A good exercise in understanding the complexity is writing a simple syntax highlighting code viewer with native controls (not HTML) and see how much memory/CPU cycles your implementation uses for a 2MB file.
Tons of optimization needs to happen - for example, as far as I know very little information about lines that aren't visible is kept in memory in Visual Studio - so called "virtual lines." I'm sure other more mature code editors have this type of optimization as well. From a native perspective this type of optimization isn't a complete nightmare to implement (although it's hard if you consider code folding), however, imagine trying to do it in HTML. The browser is still going too do all the reflow etc. for the lines that aren't even visible, eating up CPU cycles and memory.
Even merely syntax highlighting is a problem. If you make one edit the entire file might be re-lexed: once again you need a unique solution for editors ("progressive lexing").