jquery - How can I show a spin in summernote? -
i trying show spin, while photo upload summernote, summernote throw me error: uncaught typeerror: cannot read property 'bookmark' of null. photo save in computer, summernote doesn't show.
this mi code:
var awaitingpopup = '<div class="text-right"><img src="${pagecontext.request.contextpath}/resources/img/spinner.gif" width="50px"/></><br /><br />'; var edit = function() { $('.text').summernote({focus: true,height: 1000, onimageupload: function(files, editor, weleditable) { sendfile(files[0], editor, weleditable); } }); }; function sendfile(file, editor, weleditable) { var processdialog=bootbox.dialog({ message: awaitingpopup, title: 'subiendo y guardando las fotos...' }); var data = new formdata(); data.append("file", file); $.ajax({ data: data, type: "post", url: "${pagecontext.request.contextpath}/addimageblog.html/8", cache: false, contenttype: false, processdata: false, success: function(url) { processdialog.modal('hide'); alert(url); editor.insertimage(weleditable, url); }, error: function(data){ alert("failure"+data); } }); }
i have resolve issue, instead of use bootbox or normal modal, necessary use of class note-image-dialog modal. class inside of summernote-bs3.css
Comments
Post a Comment