简体   繁体   English

如何打包Github的Atom编辑器以嵌入网页?

[英]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.

相关问题 如何在atom包中设置断点? - How do I set a breakpoint inside of atom's package? 将PageDown编辑器嵌入到网页中时,如何阻止它进行实时转换? - When embedding PageDown editor in my webpage, how I can I stop it from doing conversion in real time? 如何使用 Atom 文本编辑器向空网页添加形状? - How to add shapes to an empty webpage using Atom text editor? 如何在Github的Atom编辑器中包含更多JavaScript? - How to include more JavaScript inside Atom editor by Github? 如何修复 Atom 编辑器中的“运行 JSHint 包时出错” - How to fix “Error running JSHint Package” in Atom Editor 如何在当前工作目录中为Atom软件包创建新文件? - How do i create a new file in the current working directory for an atom package? 如何让 JavaScript 显示在编辑器中? - How do I get JavaScript to show up in an editor? 如何将“默认打开程序”设置为Atom的文件中的可见编辑器徽标图标作为预览? - How to make visible editor logo icon as a preview in files with “default open program” set up to Atom? 如何在响应中使用github api获取github用户信息? - How do I get the github user info to show up using github api in react? 我正在尝试在网页上动态上下移动元素。 我怎么做? - I'm trying to dynamically move elements up and down on my webpage. How do I do that?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM