Closed onnosilaban closed 8 years ago
You may find this useful - this example: https://gist.github.com/neokoenig/0112bf45d481283c8f9d takes the gridmanager contents and submits it via a form rather than ajax. I'm afraid I can't help you with the server side aspect as there's simply too many things to cover
I came upon a better method to do the above. In my save function I get the gridmaster data this way now:
// We need the canvas in edit more
if ($('.gm-edit-mode.btn-danger').length == 0)
$('.gm-edit-mode').trigger('click');
// now grab the content (use .html or .text) and store it where I can get it after the post.
var t = $('<div>' + $('#mycanvas'').find('textarea').text() + '</div>').find('#gm-canvas');
if (t.length == 0)
t = $('<div>' + $('#mycanvas'').find('textarea').text() + '</div>');
$('#mycontent').val($('<div/>').text(t.html().trim()).html());
// Get out of edit mode now (so the user does not see the source before the post)
$('.gm-edit-mode').trigger('click');
hi masters, i'm a newbie, this is looks like a great script, but i don't have any idea to save it, is there any body can help me please?