Reputation: 581
The documentation is very good, and it gives a lot of examples for different settings, e.g.
https://quilljs.com/docs/api/#formatting
quill.format('color', 'red');
quill.format('align', 'right');
quill.format('size', 'large');
However, I can't seem to find a way to format these to be the default values? quill.format('size', 'normal') doesn't work, etc
I could parse the string for the delta and manually do it, but I was wondering why the API wouldn't be there for something straightforward like this.
Upvotes: 0
Views: 899
Reputation: 14767
This detail seems to be missing from the format
call but the answer is the same as the formatText
call: pass in false
as the value.
To avoid ambiguity in Quill there cannot be two ways to represent the same thing so you cannot have size: 'normal' since omitting the value would mean the same thing.
Upvotes: 2