So I have the editor mostly setup for inlineMode.
Here's what my implementation code currently looks like:
<article class="post editable" data-save-id="post-mission_statement">
$('.editable').editable({
inlineMode: true,
saveURL: 'http://www.unicon.church/admin/save.php',
saveRequestType: 'POST',
autosave: true,
autosaveInterval: 2500
});
$(".editable").on('editable.beforeSave', function (e, editor, data) {
// HOW THE HECK do I figure out what the data-save-id is?!?!
console.log(e);
// I want to do
// editor.option('saveParams', { postId: $(parentDiv).data('saveId') });
// but due to lack of examples and proper documentation, I don't even know if that is right.
});
How do I pass the context of the edit box (the post-mission_statement
) to Froala and then to the AJAX request, so PHP can figure out the proper primary key to store the data?