Thursday, May 23, 2024
 Popular · Latest · Hot · Upcoming
126
rated 0 times [  132] [ 6]  / answers: 1 / hits: 24054  / 7 Years ago, thu, july 6, 2017, 12:00:00

I'm using last version summernote library. How i can set default font size and font?
I'm trying like this, but its not working:



 $('.text-editor').summernote({
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'superscript', 'subscript', 'strikethrough', 'clear']],
['fontname', ['fontname']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['codeview']]
],
fontsize: '16'
});


https://jsfiddle.net/dtgr5q29/142/


More From » summernote

 Answers
28

A possible solution to this is to apply directly the font-size style to the editor div using jQuery



$('.active-textcontainer').summernote({
toolbar: [
['style', ['bold', 'italic', 'underline']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']]
],
height:150
});

$('.note-editable').css('font-size','18px');


More .. How to set font-size in summernote?



Thanks


[#57201] Monday, July 3, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ervindouglasm

Total Points: 451
Total Questions: 103
Total Answers: 102

Location: Turkmenistan
Member since Thu, Dec 1, 2022
2 Years ago
ervindouglasm questions
Tue, Jul 20, 21, 00:00, 3 Years ago
Wed, Jan 6, 21, 00:00, 3 Years ago
Fri, Nov 13, 20, 00:00, 4 Years ago
Tue, Oct 6, 20, 00:00, 4 Years ago
Tue, Aug 25, 20, 00:00, 4 Years ago
;