1

好吧,这听起来可能是有线的,但是否有机会因为括号是所有 HTML CSS JS 代码编辑器。我试图查看核心,但发生的事情太多了。所以如果有人已经发现了。请分享。

提前致谢

4

1 回答 1

2

There's no turnkey solution, but the pieces are there if you want to build an online code editor based on Brackets:

Update: There's now a Brackets in-browser documentation page that includes all this info plus far more detail.

  • The FileSystem backend is pluggable, so you can replace the local disk IO with a layer that talks to your server (or talks to the Dropbox API, etc.). But you need to define that backend storage mechanism based on your webapp's specific needs.
  • The in-browser-filesystem branch includes a dummy FileSystem backend and stubs out the remaining desktop-app-specific functionality. So you can checkout this branch and point any simple localhost server at it to run the main "index.html" in browser. (That branch is a bit old, however - it doesn't have all the latest Brackets features).
  • Then you can swap in your real storage backend (from the first bullet) in place of the dummy layer. You may also want to build signin/auth infrastucture, etc.
  • Some Brackets features are disabled in-browser, including Live Preview and Extension Manager. We haven't yet thought through how things like that would work in-browser. But all the core code-editing features are there.
  • The in-browser branch may also have some bugs & layout glitches on non-WebKit browsers.

Some people have already used Brackets as the basis to build a web-based code editor, so there may be an opportunity to collaborate with them or reuse their code. Examples include:

于 2014-06-13T21:17:28.653 回答