I'm using TinyMCE in a Filemaker file. I'd like to save changes when typing, or if formatting is applied, or for example, a list is applied or an image inserted. No matter what the changes.
I want to call a function in my init script, when changes are made... BUT ... I don't want it to be too frantic, because it slows down Filemaker too much.
I found this snippet which works very well for typing, because of it managing the keyup timeout. However, it doesn't work for other changes, e.g. adding formatting. I have it set to run a function further down, which triggers a Filemaker script (saveTEMP).
var keypupTimer
tinymce.init({
selector: '#GSNotes',
setup : function(ed) {
ed.on('keyup', function (e) {
clearTimeout(keypupTimer);
keypupTimer = setTimeout( saveTEMP, 1000);
});
},
Questions:
1/ How can I adapt it to cater to edits other than typing/keyboard?
2/ Is this the best method for me to use? Would something like BLUR be better?
Many thanks for any help/pointers