@@ -44,8 +44,8 @@ Include the Following code in the <code>head</code> area of your HTML page.
44
44
{% highlight html %}
45
45
<!-- include libraries(jQuery, bootstrap) -->
46
46
<link href =" {{ site.bootstrap_css }} " rel =" stylesheet " >
47
- <script src =" {{ site.jquery_js }} " ></script >
48
- <script src =" {{ site.bootstrap_js }} " ></script >
47
+ <script src =" {{ site.jquery_js }} " ></script >
48
+ <script src =" {{ site.bootstrap_js }} " ></script >
49
49
50
50
<!-- include summernote css/js -->
51
51
<link href =" {{ site.summernote_css }} " rel =" stylesheet " >
@@ -99,8 +99,8 @@ You can also test running example. Save below code as `index.html` and open it w
99
99
<meta charset =" UTF-8 " >
100
100
<title >Summernote </title >
101
101
<link href =" {{ site.bootstrap_css }} " rel =" stylesheet " >
102
- <script src =" {{ site.jquery_js }} " ></script >
103
- <script src =" {{ site.bootstrap_js }} " ></script >
102
+ <script src =" {{ site.jquery_js }} " ></script >
103
+ <script src =" {{ site.bootstrap_js }} " ></script >
104
104
<link href =" {{ site.summernote_css }} " rel =" stylesheet " >
105
105
<script src =" {{ site.summernote_js }} " ></script >
106
106
</head >
@@ -119,63 +119,36 @@ You can also test running example. Save below code as `index.html` and open it w
119
119
120
120
### For bootstrap 4
121
121
122
- You can also use Summernote with Bootstrap 4 using ` summernote-bs4.js ` and ` summernote-bs4.css ` . This is also beta version, as Bootstrap 4 is in beta. Below is a code example using bootstrap 4.
122
+ You can also use Summernote with Bootstrap 4 using ` summernote-bs4.js ` and ` summernote-bs4.css ` .
123
123
124
- <iframe src =" /bs4.html " width =" 100% " height =" 200 " frameborder =" 0 " ></iframe >
124
+ <iframe id =" bs4-frame " width =" 100% " height =" 200 " frameborder =" 0 " >
125
+ {% include bs4.html %}
126
+ </iframe >
127
+ <script >
128
+ var bs4_frame = document .querySelector (' #bs4-frame' );
129
+ bs4_frame .contentDocument .write (bs4_frame .innerHTML );
130
+ bs4_frame .innerHTML = ' ' ;
131
+ </script >
125
132
126
133
{% highlight html %}
127
- <! DOCTYPE html>
128
- <html lang =" en " >
129
- <head >
130
- <meta charset="UTF-8">
131
- <title>bootstrap4</title>
132
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
133
- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
134
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
135
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
136
- <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-bs4.css" rel="stylesheet">
137
- <script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-bs4.js"></script>
138
- </head >
139
- <body >
140
- <div id="summernote"></div>
141
- <script>
142
- $('#summernote').summernote({
143
- placeholder: 'Hello bootstrap 4',
144
- tabsize: 2,
145
- height: 100
146
- });
147
- </script>
148
- </body >
149
- </html >
134
+ {% include bs4.html %}
150
135
{% endhighlight %}
151
136
152
137
### Without Bootstrap
153
138
154
- You can use Summernote without Bootstrap using ` summernote-lite.js ` and ` summernote-lite.css ` . The Lite version is currently in Beta. Please report bugs so we can improve it. Below is a code example using summernote lite.
139
+ You can use Summernote without Bootstrap using ` summernote-lite.js ` and ` summernote-lite.css ` .
155
140
156
- <iframe src =" /lite.html " width =" 100% " height =" 200 " frameborder =" 0 " ></iframe >
141
+ <iframe id =" lite-frame " width =" 100% " height =" 200 " frameborder =" 0 " >
142
+ {% include lite.html %}
143
+ </iframe >
144
+ <script >
145
+ var lite_frame = document .querySelector (' #lite-frame' );
146
+ lite_frame .contentDocument .write (lite_frame .innerHTML );
147
+ lite_frame .innerHTML = ' ' ;
148
+ </script >
157
149
158
150
{% highlight html %}
159
- <! DOCTYPE html>
160
- <html lang =" en " >
161
- <head >
162
- <meta charset="UTF-8">
163
- <title>Summernote Lite</title>
164
- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
165
- <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-lite.css" rel="stylesheet">
166
- <script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote-lite.js"></script>
167
- </head >
168
- <body >
169
- <div id="summernote"></div>
170
- <script>
171
- $('#summernote').summernote({
172
- placeholder: 'Hello stand alone ui',
173
- tabsize: 2,
174
- height: 100
175
- });
176
- </script>
177
- </body >
178
- </html >
151
+ {% include lite.html %}
179
152
{% endhighlight %}
180
153
181
154
## Basic API
@@ -261,9 +234,9 @@ for more detail api: [deep dive with api](/deep-dive/#api)
261
234
Include libraries with lang file. eg) <code >summernote-ko-KR.js</code >.
262
235
263
236
{% highlight html %}
264
- <link href =" {{ site.bootstrap_css }} " rel =" stylesheet " >
265
- <script src =" {{ site.jquery_js }} " ></script >
266
- <script src =" {{ site.bootstrap_js }} " ></script >
237
+ <link href =" {{ site.bootstrap_css }} " rel =" stylesheet " >
238
+ <script src =" {{ site.jquery_js }} " ></script >
239
+ <script src =" {{ site.bootstrap_js }} " ></script >
267
240
268
241
<link href =" summernote.css " rel =" stylesheet " >
269
242
<script src =" summernote.min.js " ></script >
0 commit comments