Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

summernote

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

summernote

Super simple WYSIWYG editor

  • 0.9.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
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 09 Oct 2024

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