-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding to font whitelist has no effect #1166
Comments
Does this example do what you need? @jhchen is there an easier way to add fonts? |
Yes, it works. |
Here's a full example: http://quilljs.com/playground/#custom-fonts |
@jhchen I don’t understand that example. Where do you place that CSS? Should I also create |
Place the CSS wherever you want. |
@jhchen awesome editor but... why it's necessary to rewrite all the toolbar buttons and selects as html when you just need to set some custom fonts families or fonts sizes, wouldn't be easy to just allow something like :
|
You can configure the toolbar as an array... https://quilljs.com/docs/modules/toolbar/#container |
@jhchen I've seen this before, but am talking about when you add custom fonts family or custom fonts sizes, if you use the toolbar as an array you won't be able to specify custom font sizes (like 12, 11, 12, 14, 16, 18...), and you will be obligated to use something like |
No you can pass in |
@jhchen thank you for your explanation, it would be useful to add a note about that to the documentation, I didn't know that we can just use css to replace labels, when I saw the labels 'Normal' before I thought it's a bug and it's not possible to add sizes as array... now I understand better. Here is how to do in case someone wants to go this way :
|
I used this method, also from stack overflow , |
I am trying to add additional fonts to the font drop down list using whitelist mentioned in the documentation, however new fonts are not adding to the drop down list, i am using folloing code:
var fontAttributor = Quill.import("attributors/class/font");
fontAttributor.whitelist = [
'sofia', 'slabo', 'roboto', 'inconsolata'
];
Quill.register(fontAttributor, true);
Code Pen: http://codepen.io/Cyrus80/pen/ENLRxg
Not sure what I am doing wrong, could you please advise.
Thank you,
The text was updated successfully, but these errors were encountered: