jquery - How do I add click events to a tinyMCE 4 file_picker_callback window? -
i'm trying add jquery click event listeners custom file browser window file_picker_callback
i'm not having success.
i'm able add click events first popup window using:
setup : function(ed) { ed.on('click', function(e) { console.log('editor clicked'); }); }
my first window insert/edit image window that's built tinymce 4.2 however, not desired target. desired target window launched when click file browser button pictured below. when invoke file_picker_callback
, file browser icon (circled).
when click on file browser button, have second window appear i'll using file browser, this window want add events.
below code i'm using invoke file_picker_callback
...
init:
tinymce.init({ //... file_picker_callback: function (callback, value, meta) { imagefilepicker(callback, value, meta); } });
code second window:
var imagefilepicker = function (callback, value, meta) { tinymce.activeeditor.windowmanager.open({ title: 'image picker', url: '/images/getimages', width: 900, height: 550, onpostrender: function () { docrap(); }, buttons: [{ text: 'insert', onclick: function () { tinymce.activeeditor.windowmanager.close(); } }, { text: 'close', onclick: 'close' }], }, { oninsert: function (url) { callback(url); alert("derp"); }, }); };
my question
how add event handler second window?
Comments
Post a Comment