Documentation for exact format options to pass into new Quill()?
See original GitHub issueI’m having trouble finding the exact options to pass into a given format to whitelist, when initializing the first Quill() object.
For example, I know that one would pass into the constructor format options like this:
... = new Quill('#editor', { formats: { script: ..., size: ..., list: .... } })
but what exactly are the individual options that can be passed into each format? Like if the option was color, would we pass in a list of colors in hex values or plain English text (like ‘red’, ‘green’, ‘violet’, etc.)?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
API - Quill Rich Text Editor
Quill is a free, open source WYSIWYG editor built for the modern web. Completely customize it for any need with its modular architecture...
Read more >Build a WYSIWYG text editor using Quill - LogRocket Blog
By the end of this tutorial, you will have a fully functional text editor with text formatting options and full access to the...
Read more >Using Quill to Build a WYSIWYG Editor [Step-by-Step Tutorial]
Learn to evaluate the best WYSIWYG Editor and then set up and customize ... With Quill, you can easily format text, add images...
Read more >@peergrade/react-quill - npm
The Quill rich-text editor as a React component.. Latest version: ... you can pass the object through new Delta() again to un-taint it....
Read more >How do I programatically set QuillJS format settings to "normal ...
This detail seems to be missing from the format call but the answer is the same as the formatText call: pass in false...
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
It is a pretty gross oversight in the documentation to not even show an example of this. I had to spend a while with the interactive playground to figure it out. The short answer is that formats is just an array that whitelists the various strings shown on the Formats page. Example:
This will preserve those formats when pasting in content, but will strip out others (e.g. link, background, etc).
I think this is still an issue. The documentation is of the “finish drawing the owl” variety. I haven’t been able to remove styling from the whitelist. For instance, if I want to prevent people from styling text as “bold”.