【问题标题】:How can I show a spin in summernote?如何在summernote中显示旋转?
【发布时间】:2014-10-11 16:04:42
【问题描述】:

我正在尝试显示一个旋转,而一张照片是使用 Summernote 上传的,但 Summernote 给我一个错误:未捕获的 TypeError:无法读取 null 的属性“书签”。 照片保存在我的电脑里,但summernote没有显示。

这是我的代码:

 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);
                    }
              });
          }

【问题讨论】:

  • 我刚刚解决了这个问题,而不是使用 bootbox 或普通模态,有必要使用类 note-image-dialog 模态。这个类在summernote-bs3.css里面。

标签: jquery summernote


【解决方案1】:

我刚刚解决了这个问题,而不是使用 bootbox 或普通模态,有必要使用类 note-image-dialog 模态。这个类在summernote-bs3.css里面

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-06
    • 2017-12-11
    • 1970-01-01
    • 2012-07-02
    • 1970-01-01
    • 2011-10-25
    • 2018-04-08
    相关资源
    最近更新 更多