Closed emeryowa closed 6 months ago
I think this has something to do with font
being a reserved keyword for Quill. Is that possible? This GH issue mentions a similar issue https://github.com/quilljs/quill/issues/1008#issuecomment-250389449
If I change the class prefix to font-size
it seems to work fine.
But I'm still not sure if it is possible to allow font
as class prefix somehow
Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide :pray:
I have a requirement to implement custom classes when setting the font-size in Quill. As you probably know Quill has the option to set a small, large and huge font size by default and it will set the classes
ql-size-small
,ql-size-large
,ql-size-huge
respectively on the selected text.I configured Quill to use font sizes
xsmall
,small
,medium
,large
andxlarge
. This works. I also configured Quill to use a custom class. My requirements is for Quill to set the classfont-small
instead ofql-size-small
. I can make Quill to set the custom class correctly when selected from the dropdown, but I run into an issue when Quill initializes the editor with an HTML string containing the custom class: the custom class is removed. If I configure any class that starts withql-
it works apparently, but not with custom class starting withfont-
. Should I configure it somewhere to allow or trust my custom class?FYI: I original posted this on
ngx-quill
repo, but was asked to submit the issue hereSteps for Reproduction
Expected behavior: The editor's content should contain
<span class="font-large"></span>
from its initial valueActual behavior:
<span class="font-large"></span>
is removedPlatforms:
Chrome Version 84.0.4147.105 (Official Build) (64-bit) on MacOS 10.15.4
Version:
1.3.7