Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I package up Github's Atom editor for embedding on a webpage?

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?

like image 386
Cameron Avatar asked Jun 11 '14 23:06

Cameron


People also ask

How do I run a script package in Atom?

You can go settings, select packages and type atom-runner there if your browser can't open this link. To run your code do Alt + R if you're using Windows in Atom .

How do I use HTML Atom text editor?

In the browser menu bar, find the Open File option. Navigate to your HTML file and select Open. You can now view your HTML in the web browser. To make changes, simply modify the file in Atom, save your work, then refresh the web browser tab and see your updates!

How do I use Git and atom with GitHub service?

If you want to use Git and Atom with the GitHub service to keep your code in the cloud, you will need to sign up at GitHub and set up a repository. I recommend going through GitHub’s guide to learn how to set up a repository.

How do I edit code in Atom editor?

Since Atom Editor is integrated with GitHub Desktop, it opens up your entire repo as a “project,” where you can click files in the left window to open as new tabs to view and edit code, as shown in Figure 10.26. Open your index.html file and edit the title of your map, around line 22, then save your work.

How do I clone a GitHub repository in atom?

To clone a repository, open the GitHub panel while you have no project folders open in Atom and click "Clone an existing GitHub repository". In the dialog, paste the URL of a repository and click "Clone". The new project will be added to the Tree View. Alternately, run the GitHub: Clone command to open the Clone dialog any time.

How do I install atom on a Mac?

Installing Atom is as simple as downloading the package and running the installer. We’ll come back to integrating Atom later after we’ve installed Git and configured GitHub. Like Atom, Git has support for multiple platforms. On my Mac, I used homebrew to install Git. The command for this from the terminal is simply “brew install git”.


2 Answers

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.

like image 107
Christian J Avatar answered Oct 14 '22 04:10

Christian J


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

like image 20
ben Avatar answered Oct 14 '22 04:10

ben