Custom font sizes problem
See original GitHub issueHi,
I’m trying to add custom font sizes to the editor by using customOptions but somehow the editor doesn’t show the proper labels and the inline style is not applied.
Here is my config (modules and customOptions) from the component.ts:
this.customOptions = [{
import: 'attributors/style/size',
whitelist: ['10', '16', '22', '36', '48', '72', '144']
}];
this.quillModules = {
toolbar: [
[{ 'size': [false, '10', '16', '22', '36', '48', '72', '144'] }],
['bold', 'italic', 'underline', 'strike'],
[{ 'color': [] }, { 'background': [] }],
[{ 'align': [false, 'center', 'right', 'justify'] }],
[{ 'indent': '-1' }, { 'indent': '+1' }],
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
]
};
The view - component.html:
<quill-editor *ngIf="isInEditMode"
[(ngModel)]="content"
[modules]="quillModules"
[customOptions]="customOptions"
(onEditorCreated)="setFocus($event)">
</quill-editor>
How it is manifested:

What is generated (from the dev tools):

Can you take a look and possibly guide to right direction? Maybe I’m missing something.
Thank you.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Font size problem when working with different Window Menus
I have settings to custom scaling at 125% and ease of access make text bigger. Windows menus come up at different sizes like...
Read more >Font Size Problems? Check Here First! - Codecademy
In the search box type in font. Click enter. Click on the Custom bar and select a smaller font size. Hope this helps...
Read more >Custom Font Sizing in Xcode 6 Size Classes not working ...
Fast fix: 1) Set fonts as System for size classes. Label attributes inspector. 2) Subclass UILabel and override "layoutSubviews" method like:
Read more >font-size - CSS: Cascading Style Sheets - MDN Web Docs
The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length>...
Read more >Solved: Inconsistent Font Sizing on Custom Template - 388444
My font sizes are showing up on my bosses phone inconsistently. I have triple checked that they are all Georgia font 12. How...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i think you need to create a custom toolbar with the correct labels and values or create the mandatory css-classes for each size:
https://stackoverflow.com/questions/38623716/how-to-add-custom-font-sizes-to-quilljs-editor
Yeah this works! I would like to add that, in order to see the current selection in the dropdown, you need to add additional selectors, like this:
Thank you!