When I copy paste some text from somewhere to a summernote text editor, it copies the style also. What I need is just the plain text. But what I'm getting is the text with a number of html tags.
When I copy
Lorem Ipsum is simply dummy text of the printing and typesetting industry
What I'm getting is
<strong style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;">Lorem Ipsum</strong><span style="font-family: Arial, Helvetica, sans; font-size: 11px; font-weight: normal; line-height: 14px; text-align: justify;"> is simply dummy text of the printing and typesetting industry.</span>
The code I'm using is
$('.summernote').summernote({
focus : true,
height: 250,
toolbar: []
});
Is there any option in summernote to disable this kind of behaviour ?
Summernote has an onPaste event, which can be implemented like so:
You can see an implementation of how someone used this to strip formatting here: https://github.com/summernote/summernote/issues/303#issuecomment-53713694