[英]How do I package up Github's Atom editor for embedding on a webpage?
Github recently released their Atom editor open-source. Github最近发布了他们的Atom编辑器开源。 Since it's all written in JavaScript, it should be relatively easy to embed.
因为它都是用JavaScript编写的,所以它应该相对容易嵌入。 Unfortunately it doesn't look like it runs anywhere except in node and the custom version of Chromium they bundle with Atom releases.
不幸的是,除了在节点和Chromium的自定义版本中它们与Atom版本捆绑在一起之外,它看起来不像任何地方。
Does anyone know how I would go about packaging Atom up for the browser? 有谁知道如何为浏览器打包Atom? Has anyone already attempted this?
有没有人尝试过这个?
The problem with this is that the JavaScript environment in the browser and the one in nodejs differ. 这个问题是浏览器中的JavaScript环境和nodejs中的JavaScript环境不同。 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.
例如,在浏览器中,您无法访问nodejs可以执行的本地文件系统以及atom.io使用的文件系统。 For embedding atom you'd mainly have to find all these differences and work around them (eg reading files from a socket).
对于嵌入原子,你主要必须找到所有这些差异并解决它们(例如从套接字中读取文件)。
See also: 也可以看看:
https://github.com/atom/atom/issues/3451#issuecomment-54510710 https://github.com/atom/atom/issues/3451#issuecomment-54510710
https://atom.io/packages/web-view https://atom.io/packages/web-view
Atom.io is an editor that you download, and you can not embed it in a webpage. Atom.io是您下载的编辑器,您无法将其嵌入网页中。 I think what you are looking for is something like Prose.io .
我认为你所寻找的东西就像Prose.io 。 You can sign in with Github and edit files in your repository.
您可以使用Github登录并编辑存储库中的文件。 Unfortunately, Prose's interface is different than other editors.
不幸的是,Prose的界面与其他编辑不同。 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).
该项目是开源的,它旨在管理GitHub页面 (在GitHub仓库上托管的小型静态网站)。 I am not sure how well it will integrate with what you are doing, but I hope that gives you a good starting point.
我不确定它将如何与你正在做的事情融为一体,但我希望这能为你提供一个良好的起点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.