Documentation

API / Edit

This method enables you to edit images or text files directly by passing in a public path to a file.

Parameters

NameDescription
path Public path to the file to edit. For example: /files/images/image.jpg
onopen Fires after the dialog has been opened. Can be used to produce a custom throbber.
onsave Callback that gets executed when an image or text file is saved.

Example

moxman.edit({
path: '/files/images/image.jpg',
onsave: function(args) {
console.log(args.file);
}
});