I use bootstrap framework for navbar and now I wanna use summernote WYSIWYG HTML editor.
If I import bootstrap.min.js
script, navbar dropdown menu works perfectly, but dropdown in summernote not (color choose etc.).
If I remove this script, summernote works, but navbar dropdown not. I also remove jquery.min.js
and create own script for add class open to dropdown-toggle because with jquery.min.js
summernote don't appear.
Any solution for navbar and summernote dropdown function?
Solution : The dropdown should be toggled via data attributes or using javascript. In the above program, we have forgotten to add a data attribute so the dropdown is not working. So add data-bs-toggle="dropdown" to toggle the dropdown.
You can customize it with popover. air option. $('#summernote'). summernote({ popover: { air: [ ['color', ['color']], ['font', ['bold', 'underline', 'clear']] ] } });
Basic Dropdown To open the dropdown menu, use a button or a link with a class of . dropdown-toggle and the data-toggle="dropdown" attribute. Add the . dropdown-menu class to a <div> element to actually build the dropdown menu.
Try this:
$("#yourid").summernote();
$('.dropdown-toggle').dropdown();
Check to see that jQuery and Bootstrap are only being loaded once
try that, i think you could be able to solve it by css
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #333;
white-space: nowrap;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With