19

Github recently released their Atom editor open-source. Since it's all written in JavaScript, it should be relatively easy to embed. Unfortunately it doesn't look like it runs anywhere except in node and the custom version of Chromium they bundle with Atom releases.

Does anyone know how I would go about packaging Atom up for the browser? Has anyone already attempted this?

Richard Slater
  • 6,063
  • 4
  • 47
  • 79
Cameron
  • 621
  • 1
  • 5
  • 18
  • Why do you want to do this? Atom is built using a framework called Atom Shell -- which allows you to write cross-platform desktop apps in html/css/js. Atom shell is based on node and chromium which are probably pretty tightly coupled to that app and are necessary for things like accessing the filesystem. I don't think that just because atom is written in js that you can abstract away node and throw it in the browser. Why don't you tell us a little more about what you're trying to accomplish? – Jeff Dec 20 '14 at 17:51
  • I don't actually have this need anymore, but my original goal was to embed the text editor portion on a webpage. I wanted to be able to edit source code in the browser. There are a bunch of tools already for this (Ace, CodeMirror, etc), but they all fall short in one way or another for my use case. – Cameron Dec 20 '14 at 23:17

2 Answers2

1

The problem with this is that the JavaScript environment in the browser and the one in nodejs differ. For example in a browser you can not access the local filesystem which it was nodejs can do and which atom.io makes use of. For embedding atom you'd mainly have to find all these differences and work around them (e.g. reading files from a socket).

See also:

https://github.com/atom/atom/issues/3451#issuecomment-54510710

https://atom.io/packages/web-view

ben
  • 4,697
  • 4
  • 24
  • 51
1

Atom.io is an editor that you download, and you can not embed it in a webpage. I think what you are looking for is something like Prose.io. You can sign in with Github and edit files in your repository. Unfortunately, Prose's interface is different than other editors. I am not sure how cleanly it will embed, but it looks like the best place to start. The project is open source, and it was designed to manage GitHub Pages (small static websites hosted on a GitHub repo). I am not sure how well it will integrate with what you are doing, but I hope that gives you a good starting point.

Christian Juth
  • 2,035
  • 1
  • 16
  • 32