Reputation: 1029
I'm trying to delete some features from summernote editor toolbar. But when I write following code to customize it,
$('.summernote').summernote({
toolbar: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
it gives given below error in console (developer tools) and toolbar disappears (because of error).
Uncaught TypeError: b[t[1][u]] is not a function
Upvotes: 0
Views: 1849
Reputation: 3339
I had the same problem!Mine was because of the simple ' . I changed it to " "
$('#summernote').summernote({
toolbar: [
["style", ["bold", "italic", "underline", "clear"]]
["font", ["strikethrough", "superscript", "subscript"]]
["fontsize", ["fontsize"]]
["color", ["color"]]
["para", ["ul", "ol", "paragraph"]]
["height", ["height"]]
]
});
and it works like a charm!!
Upvotes: 0
Reputation: 6818
Yeah looks like you're using a different version of summernote. Upgrade to the latest and it should work: (example) https://jsfiddle.net/ggfk1h3x/
jquery/1.9.1
bootstrap/3.3.6
summernote/0.8.1
Upvotes: 1