When a package requires formats or blots to be registered before the module itself, use a full registration path in the name field.
- Use the prefix
blots/ to register a Quill blot. These are not added to the module options. - Use the prefix
modules/ to register a Quill module. Its options will be passed to Quill as modules.{name}.
If you are using the formats option in your editor configuration, ensure you include the name of the custom blot to allow it to be rendered in the editor contents.
import { Mention, MentionBlot } from 'quill-mention'
const modules = [
{
name: 'blots/mention',
module: MentionBlot,
},
{
name: 'modules/mention',
module: Mention,
options: {
mentionDenotationChars: ['@'],
source: (searchTerm, renderList) => {
renderList([], searchTerm)
},
},
},
]
// To allow the blot in the editor contents:
const options = {
formats: ['bold', 'italic', 'mention'],
}