Socket
Socket
Sign inDemoInstall

summernote

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

summernote

Super simple WYSIWYG editor


Version published
Weekly downloads
107K
decreased by-2.7%
Maintainers
1
Weekly downloads
 
Created

What is summernote?

Summernote is a JavaScript library that provides a WYSIWYG (What You See Is What You Get) editor. It allows users to create and edit content with a rich text editor that includes various formatting options, image and video embedding, and more.

What are summernote's main functionalities?

Basic Text Formatting

This code initializes Summernote on a textarea element, enabling basic text formatting options like bold, italic, underline, and more.

<script>
  $(document).ready(function() {
    $('#summernote').summernote();
  });
</script>
<textarea id="summernote"></textarea>

Image Upload

This code demonstrates how to handle image uploads in Summernote by providing a custom callback function for the onImageUpload event.

<script>
  $(document).ready(function() {
    $('#summernote').summernote({
      callbacks: {
        onImageUpload: function(files) {
          // Custom image upload logic
        }
      }
    });
  });
</script>
<textarea id="summernote"></textarea>

Video Embedding

Summernote allows users to embed videos directly into the editor. This is done through the toolbar options available in the initialized editor.

<script>
  $(document).ready(function() {
    $('#summernote').summernote();
  });
</script>
<textarea id="summernote"></textarea>

Custom Toolbar

This code shows how to customize the toolbar in Summernote by specifying the buttons and their groups.

<script>
  $(document).ready(function() {
    $('#summernote').summernote({
      toolbar: [
        ['style', ['bold', 'italic', 'underline', 'clear']],
        ['font', ['strikethrough', 'superscript', 'subscript']],
        ['fontsize', ['fontsize']],
        ['color', ['color']],
        ['para', ['ul', 'ol', 'paragraph']],
        ['height', ['height']]
      ]
    });
  });
</script>
<textarea id="summernote"></textarea>

Other packages similar to summernote

Keywords

FAQs

Package last updated on 24 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc