Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 793 Bytes

File metadata and controls

53 lines (46 loc) · 793 Bytes

Summernote Paste Plain Text

Plugin for Summernote that removes HTML tags from pasted content.

Installation

Insert the JS file after Summernote files:

<script src="summernote-pasteplaintext.js"></script>

Configuration

Per default this plugin will remove all HTML tags when you paste content into Summernote, except those that are specified in allowTags:

$('textarea.summernote').summernote({
    allowTags: ['a', 'b', 'br', 'em', 'p', 'strong'],
});

The default list of allowed HTML tags:

  • a
  • abbr
  • acronym
  • b
  • bdi
  • bdo
  • big
  • br
  • cite
  • code
  • del
  • dfn
  • em
  • i
  • ins
  • mark
  • p
  • q
  • s
  • small
  • strong
  • sub
  • sup
  • time
  • u
  • tt
  • var
  • wbr

Changelog

1.0.0

  • Published to GitHub and npm