I've built a File Picker that pops-open via the TINYMCE iframe (using the tinyMCE.activeEditor.windowManager.openUrl
call) and this works fine. I've then built a file uploader within this File Picker and I'm using "kartik-v/bootstrap-fileinput" to validate selected files. This works fine when I open my File Picker directly in a browser window but not via the TINYMCE iframe pop-up.
Not sure if this is a TINYMCE issue or a "kartik-v/bootstrap-fileinput" issue but the problem I face is that the validation process never initialises when loaded inside the TINYMCE iframe. I assume I need to make some type of callback to initialise "kartik-v/bootstrap-fileinput"? What's the best way to do this?
As a side note, "kartik-v/bootstrap-fileinput" can be initialised in two ways: directly as a jQuery reference to the file input or by adding class="file"
to the input. I'm doing the former, but when I add the class it does seem to load... but my settings and styles are ignored (with a variety of buttons displaying).
I also checked that it's not a Content Security Policy issue by adding the required external "kartik-v/bootstrap-fileinput" files to the appropriate CSP declarations.
Any help much appreciated.