我已经使用“图像属性”插件(https://github.com/DiemenDesign/summernote-image-attributes)在Summernote中添加了一个弹出框,以允许我编辑图像的大小-效果很好,但它破坏了表的弹出框以添加新列等。>
是否可能有多个弹出框?如果是这样,我如何定义表弹出窗口,因为我假设它需要在弹出窗口中隐式定义?
例如,这会修改标准的图片弹出框,但是表格弹出框不再显示:
$('.pageseditor').summernote({
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear','undo','redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']]
],
popover: {
image: [
['custom', ['imageAttributes']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']]
]
},
lang: 'en-US', // Change to your chosen language
imageAttributes:{
icon:'<i class="note-icon-pencil"/>',
removeEmpty:false, // true = remove attributes | false = leave empty if present
disableUpload: true // true = don't display Upload Options | Display Upload Options
},
callbacks: {
onImageUpload: function(image) {
uploadSNImage(image[0]);
}
}
});
下面正确显示了表格的弹出窗口:
$('.pageseditor').summernote({
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear','undo','redo']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']]
],
callbacks: {
onImageUpload: function(image) {
uploadSNImage(image[0]);
}
}
});
我尝试修改弹出框以包含表,因此它看起来像:
popover: {
image: [
['custom', ['imageAttributes']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']]
],
table: []
},
但是我认为它需要在任何地方都找不到引用的表选项。