Installation
Requires HTML5 doctype
Bootstrap uses certain HTML elements and CSS properties which require HTML5 doctype. Include <!DOCTYPE html>
in the beginning of all your projects.
<!DOCTYPE html>
<html lang="en">
...
</html>
Include js/css
Summernote uses the Open Source libraries jQuery and Bootstrap, if you are using the Boostrap 3 or 4 versions of Summernote, or just jQuery if you use the Lite version of Summernote. Include the Following code in the head
area of your HTML page.
<!-- include libraries(jQuery, bootstrap) -->
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js"></script>
<!-- include summernote css/js -->
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.css" rel="stylesheet">
<script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.12/summernote.js"></script>
Don’t forget to change the file’s path if you downloaded summernote in a different folders.
You can however, and a lot of developers do these days, is include the stylesheet’s within the head
are of your page, and include the Javascript at the bottom of your page, but before the closing body
tag.
Fontawesome dependancy
After v0.8.0, You don’t have to include fontawesome for displaying Summernote’s icons. But You can still use fontawesome for your custom icons. For more details, please visit custom buttons section.
Embed
Summernote can be used with or without a form
.
To use without a form
, we suggest using a div
in the body
; this element will then be used where you want the Summernote editor to be rendered within your page.
<div id="summernote">Hello Summernote</div>
To use within a form
, is pretty