Documentation

insert_filter

This option allows you to alter the contents of the JSON that gets inserted into the editor or form field. You can for example change the url to something that matches your needs. See the example below on how to change the url of the inserted file.

Example of usage in TinyMCE

tinymce.init({
...,
moxiemanager_insert_filter: function(file) {
// Url is located both at the root level and the meta level
file.url += '?id=42';
file.meta.url = file.url;

// Override the size
file.size = file.size * 2;
}
});

Example of usage in standalone mode

moxman.browse({
...
insert_filter: function(file) {
// Url is located both at the root level and the meta level file.url += '?id=42'; file.meta.url = file.url; // Override the size file.size = file.size * 2;
}
});