Reputation: 4386
Followed the simple tutorial from here
But cannot figure a way to add a 'save' button that would trigger an ajax event or whatever so i can process it and save the content to a file.
Any clues ?
Upvotes: 0
Views: 100
Reputation: 29996
What you'd want to to go here is get a handle to the text value of the editor in javascript and post that server side to save either as a file or in a db.
You can get the editor text value this way:
var editor = env.editor;
var value = editor.value;
One easy trick would be to copy that value to a hidden field so you could process it like you might any other form field.
Upvotes: 1