Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
show/hide summernote toolbar
function summernoteLoad() {
var $summernoteTextAreas = $('[data-control="summernote"]');
//cargar summernote
$summernoteTextAreas.summernote({
onImageUpload: summernoteOnImageUpload,
onkeyup: function() {
syncSummernoteTextArea($summernoteTextAreas);
validate(false);
},
onblur: function() {
syncSummernoteTextArea($summernoteTextAreas);
validate(false);
}
});
//mostrar summernote toolbar on demand
var $summernotes = $('[data-control="summernote-container"]');
$summernotes.find('.note-toolbar').hide();
$summernotes.each(function(idx, element) {
var $snote = $(element);
$snote.on('focus', '.note-editable', function(e) {
if($snote.find('.note-toolbar').hasClass('active')) {
//ya está desplegado
} else {
$summernotes.find('.note-toolbar')
.removeClass('active')
.slideUp();
$snote.find('.note-toolbar')
.addClass('active')
.slideDown();
}
});
});
}
@ndmuratsahin

This comment has been minimized.

Copy link

@ndmuratsahin ndmuratsahin commented Nov 23, 2018

You can use it ,if you want to hide the toolbar:
$('#summernote').summernote({
toolbar: []
});

@catsincars

This comment has been minimized.

Copy link

@catsincars catsincars commented Mar 12, 2019

Thank You. Examples should have provided this

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