Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to add Summernote Editor in webpage ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In this article, we will know about the Summernote Editor & its usage along with will understand its implementation through the example. The Summernote Editor is a free & open-source super simple WYSIWYG editor based on Bootstrap & jQuery. It is a JavaScript library that can be useful to build the WYSIWYG editors online. It is maintained under MIT license by a large community. It is easy to use & contains many customizable options. It can easily be implemented in any framework like React, Django, Angular, etc.



  • Lightweight Rich Text Editor
  • Easy installation
  • Easy integration with any framework
  • Simple UI
  • Lots of customization available.
  • Free & Open-source
  • Interactive WYSIWYG editing

There are 2 ways to use the Summernote Editor on our web page:

  • Using the downloaded precompiled and minified versions of CSS and JavaScript files from their official site.
  • Using the available CDN links for summernote CSS & js, jQuery, and Bootstrap.

We can use either of the methods to build the static site with the text editor and the content.


  • First, download the minified precompiled version of Summernote from the official website.
  • Extract it & place it in the current working folder.
  • Create an index.html file & declare the Bootstrap & jQuery links inside the <head> tag.
  • After completing these steps, the project structure will look like the following image.

Import the Summernote:

  • First, let us import the Bootstrap from CDNs in the index.html file. All the following codes should be placed inside the Head Tags.

<!– Include libraries(jQuery, bootstrap) –>
<link href=”” rel=”stylesheet”/>
<script src=””></script>
<script src=””></script>

  • Next import the summernote CSS and JS files.

<link href=”/src/summernote-0.8.18-dist/summernote-bs4.min.css” rel=”stylesheet”/>
<script src=”/src/summernote-0.8.18-dist/summernote-bs4.min.js”></script>

  • Now in the <body> tag, initialize the summernote editor.

<div id=”myeditor”></div>

$(document).ready(function() {
        placeholder: "Write your content here",
        height: 200,

Now, our Text Editor has been initialized.

Example: This example illustrates the use of the Summernote Editor to build & facilitate the editor in the web pages.


<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" 
          content="width=device-width, initial-scale=1.0" />
    <title>GeeksforGeeks Editor</title>
    <link href=
          rel="stylesheet" />
    <script src=
    <script src=
    <link rel="stylesheet" 
          href="/src/summernote-0.8.18-dist/summernote-bs4.min.css" />
    <script src="/src/summernote-0.8.18-dist/summernote-bs4.min.js"></script>
    <link rel="stylesheet" 
          href="/src/summernote-0.8.18-dist/summernote.css" />
    <script src="/src/summernote-0.8.18-dist/summernote.js"></script>
    <h1>GeeksforGeeks Editor</h1>
    <div id="myeditor"></div>
    <button type="button" 
            class="btn btn-success" 
            onclick="showContent()"> Show 
    <div id="myContent" class="container"></div>
    $(document).ready(function() {
            placeholder: "Write your content here",
            height: 200,
    function showContent() {
        document.getElementById("myContent").innerHTML = 


Supported Browsers:

  • Google Chrome
  • Firefox
  • Microsoft Edge
  • Internet Explorer
  • Opera
  • Safari


My Personal Notes arrow_drop_up
Last Updated : 02 Nov, 2021
Like Article
Save Article
Similar Reads
Related Tutorials