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?
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?
Share Improve this question edited Apr 13, 2016 at 16:44 Richard Slater 6,3684 gold badges56 silver badges82 bronze badges asked Jun 11, 2014 at 23:20 CameronCameron 6511 gold badge7 silver badges18 bronze badges 2- 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 acplish? – Jeff Commented Dec 20, 2014 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 Commented Dec 20, 2014 at 23:17
2 Answers
Reset to default 1Atom.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.
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./atom/atom/issues/3451#issuement-54510710
https://atom.io/packages/web-view
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744597907a4583000.html
评论列表(0条)