Skip to content

Commit 80cd7e5

Browse files
author
Dennis Suitters
committed
Add BS5 info
Add home page BS5 Support information. Add bs5.html example page on Getting Started Page.
1 parent 562ff52 commit 80cd7e5

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

00-getting-started.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ You can also test running example. Save below code as `index.html` and open it w
118118

119119
{% include ad-doc.html %}
120120

121-
### For bootstrap 4
121+
### For Bootstrap 4
122122

123123
You can also use Summernote with Bootstrap 4 using `summernote-bs4.js` and `summernote-bs4.css`.
124124

@@ -135,7 +135,24 @@ bs4_frame.innerHTML = '';
135135
{% include bs4.html %}
136136
{% endhighlight %}
137137

138-
### Without Bootstrap
138+
### For bootstrap 5
139+
140+
You can also use Summernote with Bootstrap 5 using `summernote-bs5.js` and `summernote-bs5.css`.
141+
142+
<iframe id="bs5-frame" width="100%" height="200" frameborder="0">
143+
{% include bs5.html %}
144+
</iframe>
145+
<script>
146+
var bs5_frame = document.querySelector('#bs5-frame');
147+
bs4_frame.contentDocument.write(bs4_frame.innerHTML);
148+
bs4_frame.innerHTML = '';
149+
</script>
150+
151+
{% highlight html %}
152+
{% include bs5.html %}
153+
{% endhighlight %}
154+
155+
### Without Bootstrap (lite)
139156

140157
You can use Summernote without Bootstrap using `summernote-lite.js` and `summernote-lite.css`.
141158

_includes/bs5.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<html lang="en">
2+
<head>
3+
<meta charset="UTF-8">
4+
<title>Summernote with Bootstrap 5</title>
5+
<!-- include libraries(jQuery, bootstrap) -->
6+
<script type="text/javascript" src="//code.jquery.com/jquery-3.6.0.min.js"></script>
7+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" />
8+
<script type="text/javascript" src="cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
9+
10+
<!-- include summernote css/js-->
11+
<link href="summernote-bs5.css" rel="stylesheet">
12+
<script src="summernote-bs5.js"></script>
13+
14+
</head>
15+
<body>
16+
<div id="summernote"></div>
17+
<script>
18+
$('#summernote').summernote({
19+
placeholder: 'Hello Bootstrap 5',
20+
tabsize: 2,
21+
height: 100
22+
});
23+
</script>
24+
</body>
25+
</html>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h3 class="card-title">Integration</h3>
7171
<div class="col-sm-5 summary-section">
7272
<h3>Features</h3>
7373
<ul style="list-style:none;padding:0;">
74-
<li>Supports Bootstrap 3.x.x to 4.x.x</li>
74+
<li>Supports Bootstrap 3.x.x to 5.x.x</li>
7575
<li>Lightweight (js+css: 100Kb)</li>
7676
<li>Smart User Interaction</li>
7777
<li>Works in all Major Browsers:

0 commit comments

Comments
 (0)