Reputation: 152
I am having trouble using the fontsize feature of Summernote. It seems to work best in Chrome- but even then I must type the text first, highlight it, then select the fontsize I want from the Summernote Text Editor to change it. Other browsers don't seem to work at all.
I thought this might be caused by some class that's overwriting the font-size so I tried using the Developer Tool in IE to undo any suspect classes and then try changing the font again, but with no luck. I have also searched all over the internet and found very little which leads me to believe it must be something wrong with my particular installation of Summernote. Moreover, I can't seem to find a demo of Summernote anywhere online- which would be helpful in determining if this is just a 'me' issue or part of a much larger problem.
Any help is very much appreciated
<textarea class="loneTextArea" style="width: 400px; height: 60px;"></textarea>
How I instantiate Summernote:
$(document).ready(function () {
$('.loneTextArea').summernote({
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['codeview', ['codeview']]
],
height: 60,
width: 400,
});
});
Upvotes: 3
Views: 3281
Reputation: 21
try this:
$(document).ready(function () {
$('.loneTextArea').summernote({
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['codeview', ['codeview']]
],
fontSizes: [ '12', '16', '18', '24'], //here set the font size options you want
height: 60,
width: 400,
});
});
OR, try this:
$('.loneTextArea').summernote('fontSize', 20);
Upvotes: 2