Calling another JS library from TINYMCE iframe (tinyMCE.activeEditor.windowManager.openUrl) - Stack Overflow

I've built a File Picker that pops-open via the TINYMCE iframe (using the tinyMCE.activeEditor.win

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744442311a4574420.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信