如何在ace编辑器中保存或编辑javascript文件 [英] How to save or edit javascript files in ace editor

查看:575
本文介绍了如何在ace编辑器中保存或编辑javascript文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Ace编辑器来保存和编辑javascript文件
,文档中尚不清楚如何做。

I want to use the Ace editor to save and edit javascript files it's not clear in the documentation how to do that.

推荐答案

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.

这篇关于如何在ace编辑器中保存或编辑javascript文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆