Does someone used tinymce.dom.Selection class in tinyMCE? I'm unsuccessfully trying to apply a function to dom.Selection.onBeforeSetContent or onSetContent. The documentation shows the following syntax:
event_callback(<tinymce.dom.Selection> ed, <Object> o)
There's no neat example of its implementation. I'm in a hurry and tend to give up.
What i have already tried so far is:
$('#tinyMce').tinymce({
...
setup: function(ed) {
ed.dom.Selection.onSetContent.add(fucntion(se,o){...});
}
});
which fails with "ed.dom is undefined". I also tried:
$('#tinyMce').tinymce({
...
init_instance_callback : "CustomInitInstance"
});
function CustomInitInstance(inst){
//inst.dom.Selection.on... fails with "inst.dom is undefined"
tinymce.dom.Selection.onBeforeSetContent.add(function(se,o){...}); // fails with "tinymce.dom.Selection.onBeforeSetContent is undefined"
}