Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
summernote example
<!DOCTYPE html>
<meta charset="UTF-8">
<link rel="stylesheet" href="//">
<link rel="stylesheet" href="//">
<link rel="stylesheet" href="components/summernote/dist/summernote.css" />
<div class="summernote container">
<div id="summernote" class="span12">
<p>Adipisicing natus accusamus necessitatibus fuga accusamus aliquam sapiente numquam labore. Eaque impedit libero impedit quibusdam laboriosam. Hic explicabo minima sit eius vitae voluptates. Sit officia veniam accusamus suscipit pariatur alias.</p>
<div class="summernote container">
<button id="edit" class="btn btn-primary">Edit</button>
<button id="save" class="btn btn-primary">Save</button>
<script src="//"></script>
<script src="//"></script>
<script src="components/summernote/dist/summernote.js"></script>
<script src="components/summernote/lang/summernote-de-DE.js"></script>
$('#edit').on('click', function() {
height: '300px',
width: '600px',
focus: true,
lang: 'de-DE',
oninit: function() {
console.log('Summernote is launched');
onenter: function(e) {
console.log('Enter/Return key pressed');
onfocus: function(e) {
console.log('Editable area is focused');
onblur: function(e) {
console.log('Editable area loses focus');
onkeyup: function(e) {
console.log('Key is released:', e.keyCode);
onkeydown: function(e) {
console.log('Key is pressed:', e.keyCode);
//onImageUpload: function(files, editor, welEditable) {
// console.log('image upload:', files, editor, welEditable);
toolbar: [
//['style', ['style']], // no style button
['style', ['bold', 'italic', 'underline', 'clear']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['picture', ['picture']],
//['insert', ['picture', 'link']], // no insert buttons
//['table', ['table']], // no table button
//['help', ['help']] //no help button
$('#save').on('click', function() {
var aHTML = $('#summernote').code(); //save HTML If you need(aHTML: array).

This comment has been minimized.

Copy link

@omerayan omerayan commented Jan 27, 2021


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