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

查看:34
本文介绍了如何在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 源代码中找到许多有趣的实现zedapp/zed/tree/master/app/js/fs" rel="nofollow">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天全站免登陆