summernote-ext-highlight icon indicating copy to clipboard operation
summernote-ext-highlight copied to clipboard

summernote method doesnt exist

Open pipiscrew opened this issue 8 years ago • 1 comments

when click the preview button I getting : image

looking through https://github.com/summernote/summernote/blob/develop/examples/textarea.html line26 - $('.summernote').summernote('code')

your example code : $('.preview-btn').click(function () { $('#preview-box').html($('.summernote').code()); $('.summernote').code(''); prettyPrint(); }); modified code : $('.preview-btn').click(function () { $('#preview-box').html($('.summernote').summernote('code')); $('.summernote').val(''); prettyPrint(); }); working, is buggy when inserting HTML code...

pipiscrew avatar Mar 26 '16 12:03 pipiscrew

@pipiscrew please use

$('#summernote').summernote('code');

heyanlong avatar May 10 '17 05:05 heyanlong