【问题标题】:can not dropdown when summernote on the boostrap modal引导模式上的summernote时无法下拉
【发布时间】:2016-11-05 21:00:08
【问题描述】:
我在bootstrap modal上使用summernote。但是当点击工具栏上的下拉项时,下拉菜单没有显示在正确的位置,甚至没有退出下拉DOM。我给你看下图:
enter image description here
我在summernote github问题列表和stackoverflow中搜索了很长时间。我尝试添加“dialogsInBody:true”,但没有工作。任何人都可以帮助我解决这个问题。谢谢!
【问题讨论】:
标签:
html
css
twitter-bootstrap
summernote
【解决方案1】:
使用 $('.dropdown-toggle').dropdown();
【解决方案2】:
试试这个。在这里工作正常。
callbacks: {
onInit: function() {
//when inside a modal, re-link the dropdown
var thisNote = $(this);
if(thisNote.closest('.modal').length>0){
thisNote.next().find('.dropdown-toggle').dropdown();
}
}
}