edit: don't use ACE unless you are a javascript expert. I found this alternative that does exactly what i want:
https://github.com/Codiad/Codiad.git
---end edit---
http://ace.c9.io/
This is an editor. It can be embedded. I have done that. Its nice. But it's useless right now.
I have been looking, on and off, for a week for an example that shows how to OPEN and SAVE a file.
This example does not exist as far as i can tell. The documentation just assumes that you are going to copy and paste words into the editor, then copy and paste them out and save them some other way. They don't mention saving or loading AT ALL.
Does anyone explain how to do this like im a 5 year old? I just want to open an existing file on the server, then using POST or whatever, save the file to the server.
editor.html
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor {
margin: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<pre id="editor">
apparently this is where the text goes,..
How do i get it here without statically writing it,.. and how do i save the changes?
</pre>
<script src="js/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/twilight");
editor.getSession().setMode("ace/mode/sh");
</script>
</body>
</html>