Skip to content

Commit

Permalink
Fix JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Nov 18, 2023
1 parent 4221a87 commit 03f7260
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Summernote.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ private function getScript(): string

return <<<JS
$('#$this->id').summernote($config);
$('button.note-btn.btn-light.btn-sm.dropdown-toggle').removeAttr('data-toggle');
$('button.note-btn.btn-light.btn-sm.dropdown-toggle').attr('data-bs-toggle', 'dropdown');
if ($('button.note-btn.btn-light.btn-sm.dropdown-toggle').attr('data-toggle') !== undefined) {
$('button.note-btn.btn-light.btn-sm.dropdown-toggle').removeAttr('data-toggle');
}
if ($('button.note-btn.btn-light.btn-sm.dropdown-toggle').attr('data-bs-toggle') === undefined) {
$('button.note-btn.btn-light.btn-sm.dropdown-toggle').attr('data-bs-toggle', 'dropdown');
}
JS;
}

Expand Down

0 comments on commit 03f7260

Please sign in to comment.