firefox - tinymce upload NS_ERROR_FAILURE -


i'm trying add image uploads in tinymce editor blog. i've tried few things , solution found i've got furthest here.

with soultion, on firefox (haven't tried other browsers need firefox work) i'm getting ns_error_failure in console when select file upload.

this code have. html ejs (shouldn't affect functionality)

<form class="form-group" method="post" action="<%= adminpage == 'new post' ? '/admin/newpost' : '' %>"> <input type="hidden" name="_csrf" value="<%= csrftoken %>"> <input class="form-control" name="title" placeholder="title" required> <br> <textarea name="content" id="editor" rows="20"></textarea> <button type="submit" class="btn btn-danger">submit post</button> 

tinymce initialisation

<script src="/tinymce/tinymce.min.js"></script> <script>tinymce.init({         selector: '#editor',         plugins: [             "advlist autolink lists link image charmap print preview hr anchor pagebreak",             "searchreplace wordcount visualblocks visualchars code fullscreen",             "insertdatetime media nonbreaking save table contextmenu directionality",             "emoticons template paste textcolor colorpicker textpattern"         ],         toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",         toolbar2: "print preview media | forecolor backcolor emoticons",         file_browser_callback: function(field_name, url, type, win) {             $('#upload').click();         }     }); </script> 

i appreciate help.

i found issue, firefox wasn't allowing form post in popup, i've changed target iframe intead.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -