Summernote Wysiwyg editor demo

1501   06 October 2019

Using Following Script You can initiate Summernote

$('#summernote').summernote({
        placeholder: 'Hello bootstrap 4',
        tabsize: 2,
    codemirror: { // codemirror options
    theme: 'monokai'
  }
});

Callbacks:

ex-oninit, onenter, onfocus, onblur, onkeyup, onkeydown, onpaste 

// onInit callback
$('#summernote').summernote({
  callbacks: {
    onInit: function() {
      console.log('Summernote is launched');
    }
  }
});

// summernote.init
$('#summernote').on('summernote.init', function() {
  console.log('Summernote is launched');
});
// General callback
$('#summernote').summernote({
  callbacks: {
    yourCallback: function() {
      console.log('Summernote is launched');
    }
  }
});

// summernote.init
$('#summernote').on('summernote.yourCallback', function() {
  console.log('Summernote is launched');
});

Get Code from Editor

$('#summernote').summernote("code");
View More

Related Elements