Skip to content

Instantly share code, notes, and snippets.

@AdrianoBiolchi
Last active February 28, 2018 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdrianoBiolchi/7ff3c481a35c1c88a8e124647da55420 to your computer and use it in GitHub Desktop.
Save AdrianoBiolchi/7ff3c481a35c1c88a8e124647da55420 to your computer and use it in GitHub Desktop.
<div class="form-group">
<textarea name="summernoteInput" id="summernote" class="summernote"></textarea>
<script>
$(document).ready(function() {
//initialize summernote
$('#summernote').summernote({
lang: 'pt-BR',
height: 300,
toolbar: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['picture', ['picture']],
['link', ['link']],
['video', ['video']],
['hr', ['hr']],
],
});
//set the content to summernote using `code` attribute.
$('.summernote').summernote('code', content);
});
</script>
</div>
@SapneshNaik
Copy link

$('.summernote').summernote('code', content); in this line How are you getting the content?. I'm sorry I can't see where you have initialized the content variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment