1

Topic: How do I add click events to a tinyMCE 4 file_picker_callback window?

I'm trying to add jquery events to my file_picker_callback window but I'm not having success.

I understand you use this in your main initializer to target your pop-up dialog:

setup : function(ed) {
      ed.on('click', function(e) {
          console.log('Editor was clicked');
      });
   }

But the file_picker_callback window pops up from a pop up. So I tried the following:

 tinymce.activeEditor.windowManager.open({
        //... other init stuff
        setup : function(ed) {
          ed.on('click', function(e) {
              console.log('Editor was clicked');
        });
      }
   };

Which doesn't work...

My question is, how do I add jquery events to this second popup window?

stack overflow:

http://stackoverflow.com/questions/31464112/how-do-i-add-click-events-to-a-tinymce-4-file-picker-callback-window

2

Re: How do I add click events to a tinyMCE 4 file_picker_callback window?

Why would you want to add a "click" listener to your editor if you want a listener to some item (which one by the way?) in your file picker dialog? Remember: The dialogs will cover the editor to prevent mouse events from reaching the editor itself while the dialog is open!

Greetings from Germany,

Felix Riesterer.
-- I am neither Moxiecode nor Ephox! --

3

Re: How do I add click events to a tinyMCE 4 file_picker_callback window?

I was a bit confusing in my OP, my apologies. As stated in my opening sentence:

"I'm trying to add jquery events to my file_picker_callback window"

Not the editor, I know the code I provided targets the editor, I've got a dialogue window popping up where I'd like to build a file browser. I can't do that if I can't target the window with jquery. I'd like to know how to add click events to that dialog window.

Sent from my iPhone.