Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap summernote拖放选项不起作用_Twitter Bootstrap_Google Chrome_Drag And Drop_Summernote_Disabled Input - Fatal编程技术网

Twitter bootstrap summernote拖放选项不起作用

Twitter bootstrap summernote拖放选项不起作用,twitter-bootstrap,google-chrome,drag-and-drop,summernote,disabled-input,Twitter Bootstrap,Google Chrome,Drag And Drop,Summernote,Disabled Input,我把summernote编辑器放在我的web应用程序中 我发现它仍然能够将图像拖放到编辑器区域。当然,我用下面的代码阻止了summernote的输入。(下面的方法在summernote官方网站上提供) 我还能试什么 仅供参考,我已经初始化了我的夏季笔记,如 var s_note = $('#${id}_summernote'); var summernote = s_note.summernote({ height : 200 , dialogs

我把summernote编辑器放在我的web应用程序中

我发现它仍然能够将图像拖放到编辑器区域。当然,我用下面的代码阻止了summernote的输入。(下面的方法在summernote官方网站上提供)

我还能试什么

仅供参考,我已经初始化了我的夏季笔记,如

    var s_note = $('#${id}_summernote');

    var summernote = s_note.summernote({
        height : 200
        , dialogsInBody : true
        , toolbar: [
            ['style', ['style']],
            ['font', ['bold', 'italic', 'underline', 'clear']],
            ['fontname', ['fontname']],
            ['color', ['color']],
            ['para', ['ul', 'ol', 'paragraph']],
            ['height', ['height']],
            ['table', ['table']],
            ['insert', ['link', 'picture', 'hr']],
            ['view', ['fullscreen', 'codeview']],
            ['help', ['help']]
        ]
        , callbacks : {
            onImageUpload : function(files){
                console.log(files);
                var img = document.createElement('img');
                img.src='http://summernote.org/img/icons/1200x630.png';
                uploadWYSIWYGFile(files);

                s_note.summernote('insertNode', img);
            }
            , onChange : function(){
                console.log(1);
                var richValue = s_note.summernote('code');
                valueHolder.val(richValue);
            } 
        }
    }); 

Summernote不会动态更新其选项。创建编辑器时,应传递
disableDragAndDrop
选项。例如

// 01. create editor with options.
$('#summernote').summernote({
  disableDragAndDrop:true,
  height: 200
});
// 02. then call disable API
$('#summernote').summernote('disable');
有关选项的更多详细信息


感谢dev的回答!
// 01. create editor with options.
$('#summernote').summernote({
  disableDragAndDrop:true,
  height: 200
});
// 02. then call disable API
$('#summernote').summernote('disable');