且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在ace编辑器中保存或编辑javascript文件

更新时间:2023-02-04 18:57:49

Ace编辑器只是编辑器的UI部分。可以这样认为:就像一个文本区域,但是很酷!

要处理文件,您需要某种类型的服务器来读取和保存文件,然后会将文本发送到Ace所在的网页。 (您也可以使用html5文件系统api,但这仅适用于chrome)。

您可以在 Zed 源代码位于 https:// github上。 com / zedapp / zed / tree / master / app / js / fs ,它是基于Ace的代码编辑器。

Ace editor is only the UI part of the editor. Think of it as: like a textarea but cool!.
To deal with files you need some kind of server that will read and save the files and will send the text to the webpage where Ace lives. (You can also use html5 filesystem api, but that only works on chrome).
You can find many interesting implementations of this in Zed source code at https://github.com/zedapp/zed/tree/master/app/js/fs, which is a code editor based on Ace.