Created
December 18, 2017 18:45
-
-
Save andreloty/931d80540f2acff69058d00f3b03e56b to your computer and use it in GitHub Desktop.
summernote clear format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cleanText = $('#summernote').data().summernote.code() | |
.replace(/<\/p>/gi, "\n") | |
.replace(/<br\/?>/gi, "\n") | |
.replace(/<\/?[^>]+(>|$)/g, "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment