{"_id":"@deevotechvn/quill-mention","_rev":"3-ef6e3008b8c451027e7ed1c02e60f476","name":"@deevotechvn/quill-mention","dist-tags":{"latest":"3.1.3"},"versions":{"3.1.0":{"name":"@deevotechvn/quill-mention","version":"3.1.0","description":"@mentions for the Quill rich text editor","homepage":"https://quill-mention.com/","main":"dist/quill.mention.csj.js","module":"dist/quill.mention.esm.js","repository":{"type":"git","url":"git+https://github.com/DeevotechVN/quill-mention.git"},"author":{"name":"Fredrik Sundqvist","email":"fsundqvist@gmail.com"},"license":"MIT","dependencies":{"quill":"^1.3.7"},"devDependencies":{"@ava/babel":"^2.0.0","@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@rollup/plugin-babel":"^5.3.0","ava":"^3.15.0","concurrently":"^6.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","prettier":"2.4.1","rollup":"^2.58.3","rollup-plugin-local-resolve":"^1.0.7","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2","serve":"^12.0.1"},"scripts":{"start":"concurrently \"rollup -c -w\" \"serve docs\"","build":"rollup -c","test":"ava"},"ava":{"require":["@babel/register"]},"keywords":["quill","mentions","autocomplete","mention"],"gitHead":"18d5ec76408fd78d22321ca351c4ded8229a07f9","bugs":{"url":"https://github.com/DeevotechVN/quill-mention/issues"},"_id":"@deevotechvn/quill-mention@3.1.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-1vThgP4RsGUHZOgf12XqWahWMCkVEWLEDzZGQHCdp1bCcbeYcRNB72A9ACAfhrPZwbORrHs6WWTZtgZX6P9PsA==","shasum":"189df6367562b3f447bdee48746a0c0c5c954950","tarball":"https://registry.npmjs.org/@deevotechvn/quill-mention/-/quill-mention-3.1.0.tgz","fileCount":8,"unpackedSize":90933,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCme4UymE0xv23LCZiJhYh5TO62VnL0XSyvHjZj/YUYOgIgI0CVNtUwiC+mq4Ex2bcUgvkrnWAmNJHA/EbMiHfN5NA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZnDXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFvw//cP/smpNOd5ATT+MIuAbEDHkHGB/g3wfdAuULb8FJq6DyKEVk\r\nD/mAI1cgKHlmgURtHKzIXBbjefXJSSZ4ynCHWtqDIsIH+swGx89Zrj2veUH8\r\nGzcHZ0pjqUO6Tf6hrYybtvSxy1d+gh9WbZm98p7Lhh81n9uvZYmiX3LEVWQS\r\nduJg8zAdYMBNjlVU/iopTir1XLJkM7fKQwIlTGWA4RbLaqVy8lgGY7aWyavl\r\nxdP+Zxv5CsESvEwElVYxwrVWe8eQzisDUcG6ZPNNa0VjvYR6hJOuGzrcx8Lg\r\neiLJIkial4vQpClmbaZf9iITl6wmZ0RqT73KjgmYTfnSTqB1kMF7PUrvzJXG\r\nFFhqQj2ygxQyYuUC5kcLnl0+VsQS/ak/55Q6+h4SKKxQVICJl1JlOz2TzuRY\r\n9dyQWIwIi5dvaaqjP+kVv3/FZYy9N+6tsjB70nnh5r2fas6YCtaEHb80wzdT\r\nrfSRZXb+XiwIcp32smSCuE4wZ0P8A5h0Pbz+Ou4ZajiOZA7uue5oetTlgQ7Z\r\nIeV27s+QE8Luabd9fRpqTTeoWSF/1rVZSh5tNvgzcMKeprKKEC399gQ7h5QX\r\nuwCGIqJAr0AWmtD5VsR0DWlbnE16rm3XaDfoa0JF2tfMe9BGrA+0xKJwo24p\r\ndQIcXP4K+OV7OCH1AURHed+wl9447GSqNMM=\r\n=Q9Wv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"},"directories":{},"maintainers":[{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-mention_3.1.0_1650880727701_0.23862673272262747"},"_hasShrinkwrap":false},"3.1.1":{"name":"@deevotechvn/quill-mention","version":"3.1.1","description":"@mentions for the Quill rich text editor","homepage":"https://quill-mention.com/","main":"dist/quill.mention.csj.js","module":"dist/quill.mention.esm.js","repository":{"type":"git","url":"git+https://github.com/DeevotechVN/quill-mention.git"},"author":{"name":"Fredrik Sundqvist","email":"fsundqvist@gmail.com"},"license":"MIT","dependencies":{"quill":"^1.3.7"},"devDependencies":{"@ava/babel":"^2.0.0","@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@rollup/plugin-babel":"^5.3.0","ava":"^3.15.0","concurrently":"^6.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","prettier":"2.4.1","rollup":"^2.58.3","rollup-plugin-local-resolve":"^1.0.7","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2","serve":"^12.0.1"},"scripts":{"start":"concurrently \"rollup -c -w\" \"serve docs\"","build":"rollup -c","test":"ava"},"ava":{"require":["@babel/register"]},"keywords":["quill","mentions","autocomplete","mention"],"gitHead":"a2696f9e26e213fbbf5b1688755abf130525423d","bugs":{"url":"https://github.com/DeevotechVN/quill-mention/issues"},"_id":"@deevotechvn/quill-mention@3.1.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-NLd1zZ9zYPTUEY90O4qfQKfdtZ05ji02AzXcK/UcLdrzz4LlGO+jjarZhwFNtMroE17CwexEdC+xGQREkwmZeQ==","shasum":"ef04912994831925fe103828eb8c9bcdfc804cf8","tarball":"https://registry.npmjs.org/@deevotechvn/quill-mention/-/quill-mention-3.1.1.tgz","fileCount":8,"unpackedSize":91053,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF6uOfBNirtX3+kurJ24Sxf5MYYKVuhYAnUAAvZwjz+1AiEA/p4CIFdT+Wdiil2dDlcKZtr4NHoZzCAcvWsxF0c89uM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZnh1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo06w/+N2Diw7NBL+NAjmLJjSXh17C62zeP3zsDiHqzitahAnnd1xMb\r\nnWO0/i33lLMZY5FxRsxMDym/PIDlP6OBnMwWCnPgCp8Z6yeNMZV3w8lGS3ON\r\n2z/93homG3Y2gdUpUlI0yX8WhwN0pnPGukQOl5RW5Z2IIubdAVP0QNsJ3Q/s\r\n/LTdw/asBvi1u29pvCTmHrJiNkEanIwS1zyhQ76OfqxP4ST3DIUROjfqqhWx\r\nukO6iRsSE3BZG2/5pU8uJBIwEkkzx/1lNPEcDR3o0Yf3EiGuxcJslFq/XCUW\r\nqBW8bwBhoYx4iO97vvkZhi3kpNYCnXbbcbvhlL1vOfDpuneqSfWi5Q86Lp2J\r\nVJ+nn46WqtgnNOXoGM5/+JVake4oKIGrcWptHw8vg5yMcSwmUrgVo2HOMB6l\r\ndVHv7bS12pe3qbZX8I1PGnt0/QiLv97OqWw3dqFhjFGBKWs+2pyBbuNnnaza\r\nOzXfu5SBqu+Ozkha8Be5JRHXl3eMWKjqKaMaG3DYYJ0PoK4fnAkrdbz/J1uV\r\npFvasUaHWdK2HN871yqoxyXoQDypxwG7dkjK6quxWC1xykNrKPklIs6/7J5f\r\nHTnMdRvITacLMcVeDNqyiq0oFtQDGrgUwww8QRpmsQ4MO0ELq18hJD0DYfCi\r\nSzesCIVc+M0BNMXnLInVUlYmLJjJHtsQWx8=\r\n=YBpq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"},"directories":{},"maintainers":[{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-mention_3.1.1_1650882677327_0.5326716230916309"},"_hasShrinkwrap":false},"3.1.2":{"name":"@deevotechvn/quill-mention","version":"3.1.2","description":"@mentions for the Quill rich text editor","homepage":"https://quill-mention.com/","main":"dist/quill.mention.min.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/DeevotechVN/quill-mention.git"},"author":{"name":"Fredrik Sundqvist","email":"fsundqvist@gmail.com"},"license":"MIT","dependencies":{"quill":"^1.3.7"},"devDependencies":{"@ava/babel":"^2.0.0","@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@rollup/plugin-babel":"^5.3.0","ava":"^3.15.0","concurrently":"^6.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","prettier":"2.4.1","rollup":"^2.58.3","rollup-plugin-local-resolve":"^1.0.7","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2","serve":"^12.0.1"},"scripts":{"start":"concurrently \"rollup -c -w\" \"serve docs\"","build":"rollup -c","test":"ava"},"ava":{"require":["@babel/register"]},"keywords":["quill","mentions","autocomplete","mention"],"gitHead":"5c62815595e59d02bdc9079f9317151af3cd9347","bugs":{"url":"https://github.com/DeevotechVN/quill-mention/issues"},"_id":"@deevotechvn/quill-mention@3.1.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-fXylLNuVhJHkUXziNYZDYzk9roPh4BhKL2yIm7/BBztzUSOam0znNVvQa7ZmieWobMlOLmjtbF9Ihu+iwJSmmQ==","shasum":"a0e8f424f76e4d60506229d70ad395751d52d268","tarball":"https://registry.npmjs.org/@deevotechvn/quill-mention/-/quill-mention-3.1.2.tgz","fileCount":8,"unpackedSize":128594,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUIUW21FXvwGREJzNDBx1jtZeGyWcTG1HZCCgnVA9O4QIhALgE3FOSC311iC5GYl19Icf/YUfilEy9II7QgyZjd97A"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZpBnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmry0A/+OVluKdP46qg6zI/9EbESQATQPqHk/22oSTQWCy8AF1Fz8tPH\r\nxT4SzbDLx+ZJ6ZH6Vlfid9NfBFHC+iOJij7aZImMLXCcZKiR4/gotrTT2k0v\r\nHo+hNsgi+1mupDCS3MRU9lszLKwhzDtDrKlbHsdzjd3I6gP2olheukIjUIre\r\n9lmj1VGESEKO5AMpEgt+55fPlFAxhvTG0gg2+74/w1Ip5fLYOfPd9/SWF7jh\r\nTXWWS+++TkZRzkGZvaAaR81+4Z0o5KK0fdf3Z0L1iX4o8BYgMxvBdYizP6JG\r\nZGd3aJE07/oOXXihNB2wWy62MHcio8NFiSemdbNtJ1aUvt3NDaWM336+K9cB\r\nrNu66uyKruqdn8d1W6bZ+JfpW7ZFyk5ncjkgyHZraHmCbaepy+uDgaDJ5anP\r\nRZn2Buyt3uBMX6GRY+Km4+P5om98pFo+b+Is+uFZjySqna5GLQ6FbmUz7Tsi\r\nBhEN9070vsVnxlp/ssGN82QleTE58wdmYn4qnG/TLvN7hY2v6zxM9GRt/lg5\r\noYiCgPT3tJronBuGJHnT1ks03Dstc/3COQWummLAW+jy4PXM5U8AqQPDisTH\r\nahoodB7AxtuVJokldJ5HHEqp9jyL+FjyhNJc7hCTqUgcNmtJZWobQ6iOuCT1\r\nFukKrBHk4VTfqoViAGHOZyvKOANZwbRkqLM=\r\n=NS3G\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"},"directories":{},"maintainers":[{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-mention_3.1.2_1650888806870_0.2531961988047886"},"_hasShrinkwrap":false},"3.1.3":{"name":"@deevotechvn/quill-mention","version":"3.1.3","description":"@mentions for the Quill rich text editor","homepage":"https://quill-mention.com/","main":"dist/quill.mention.min.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/DeevotechVN/quill-mention.git"},"author":{"name":"Fredrik Sundqvist","email":"fsundqvist@gmail.com"},"license":"MIT","dependencies":{"quill":"^1.3.7"},"devDependencies":{"@ava/babel":"^2.0.0","@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/register":"^7.10.1","@rollup/plugin-babel":"^5.3.0","ava":"^3.15.0","concurrently":"^6.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","prettier":"2.4.1","rollup":"^2.58.3","rollup-plugin-local-resolve":"^1.0.7","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2","serve":"^12.0.1"},"scripts":{"start":"concurrently \"rollup -c -w\" \"serve docs\"","build":"rollup -c","test":"ava"},"ava":{"require":["@babel/register"]},"keywords":["quill","mentions","autocomplete","mention"],"gitHead":"1ecb192784551c39e0f09280185c9cb6488a29a4","bugs":{"url":"https://github.com/DeevotechVN/quill-mention/issues"},"_id":"@deevotechvn/quill-mention@3.1.3","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-c0VYgDKz9YraP+XiHj2n731oWohRkXlRCyCNYkj2MsVR+EClTuMwNWndrP7qc2tsNXbjf1VK20WDgH2MWqRucQ==","shasum":"c8942fe6e5a48c51fbaef508512e2d949a981157","tarball":"https://registry.npmjs.org/@deevotechvn/quill-mention/-/quill-mention-3.1.3.tgz","fileCount":8,"unpackedSize":138412,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXW43mYSNvGrmkHdxcoeblcJpzoPxKyR4Hvy1DYcFQbwIhANL/jgCzNw/0J72diyZ7x9skZjjnXZIyv6W+qKBO+vCf"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZpMuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnDQ//aLSMfgvV+oaBupwr1Z0BvTPVMhWP9PCbr8MFRhiB1SjsyJjN\r\nq6+ayUIbxuldOGS3HI7v9aWScRCqcUIsXbhqxvSXKsJk/z7yo/h/4TZ3a2wv\r\n7QlNTIH/Uwyliklq57H0UEm2zDhPrwk+6ZE535ialekvthrIzOuJ1wfr+F3C\r\n9jjzVVzlkjIpZ+tZb4hbmanSszygCyeUVQ56JXA9OcSqH82niSiuz3mqc2Xj\r\nEzdW9xwkj8vw5DDbALebkS9eVOivvMi1VdzyqtLRVLbLjM6qHkVoX/NUxMYN\r\nAi2Wppe1N3LyCTDqzyNO4PbrtPa0OxjtAcqXgwf9ldiU1Ml9bSn1yeNASHoY\r\n0/qg9vtY+t/LJuq3QaRnQ+lXwIbZz2F2lmFKENGskF7DCFJ/WqzJ9c/fWZr8\r\nBbU+iTlw9JucHAWhPwTaxryIXgPxrTWC0Vq9bRhWHklA0+AQLrnv4kSrzRvR\r\nzKjt1R7tKftCntzcN6ab/N6HDy3K4e53aFEf99FiKKaAc36RWW+PetxTlSgZ\r\nRbn3FVZw1W8Y2P3iNHzZdUJVPNArwfQ7o/vQmanDcdrIg6XSOmius+efMdEr\r\nIrou/bV/CXR5zrzw8yz4AUqIJV7RPe7AO1nu60m0iaaHGmztW1/5BLGcyy1C\r\nheiMLQbqSW+cX8sP5u5QMOEbQcJE3gI7PME=\r\n=fYSe\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"},"directories":{},"maintainers":[{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quill-mention_3.1.3_1650889518089_0.8876942357266859"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-25T09:58:47.644Z","3.1.0":"2022-04-25T09:58:47.842Z","modified":"2022-04-25T12:25:18.334Z","3.1.1":"2022-04-25T10:31:17.504Z","3.1.2":"2022-04-25T12:13:27.006Z","3.1.3":"2022-04-25T12:25:18.246Z"},"maintainers":[{"name":"nthduy.deevotech","email":"duynguyen@deevotech.com"}],"description":"@mentions for the Quill rich text editor","homepage":"https://quill-mention.com/","keywords":["quill","mentions","autocomplete","mention"],"repository":{"type":"git","url":"git+https://github.com/DeevotechVN/quill-mention.git"},"author":{"name":"Fredrik Sundqvist","email":"fsundqvist@gmail.com"},"bugs":{"url":"https://github.com/DeevotechVN/quill-mention/issues"},"license":"MIT","readme":"![Quill Mention](docs/static/quill-mention.png \"Quill Mention\")\n\n# Quill Mention\n\n[![npm version](https://badge.fury.io/js/quill-mention.svg)](https://badge.fury.io/js/quill-mention)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nQuill Mention is a module to provide @mentions or #hashtag functionality for the [Quill](https://quilljs.com/) rich text editor.\n\n## Demo\n\nhttps://quill-mention.com/\n\n![Mention Demo GIF](docs/static/mention.gif \"Mention Demo GIF\")\n\n## Getting Started\n\n### Install\n\nInstall with npm:\n\n```bash\nnpm i @deevotechvn/quill-mention\n```\n\nInstall with [Yarn](https://yarnpkg.com/en/):\n\n```bash\nyarn add @deevotechvn/quill-mention\n```\n\n### Import package\n\n```javascript\nimport { MentionBlot, Mention } from \"@deevotech/quill-mention\";\n// or\nconst { MentionBlot, Mention } = require(\"@deevotechvn/quill-mention\");\n```\n\nYou will need to register the module\n\n```javascript\nQuill.register(MentionBlot);\nQuill.register(\"modules/mention\", Mention);\n```\n\nNow you only need to pass quill-mention config to quill.\n\n### Example\n\n```javascript\nimport \"quill-mention\";\n\nconst atValues = [\n  { id: 1, value: \"Fredrik Sundqvist\" },\n  { id: 2, value: \"Patrik Sjölin\" },\n];\nconst hashValues = [\n  { id: 3, value: \"Fredrik Sundqvist 2\" },\n  { id: 4, value: \"Patrik Sjölin 2\" },\n];\nconst quill = new Quill(\"#editor\", {\n  modules: {\n    mention: {\n      allowedChars: /^[A-Za-z\\sÅÄÖåäö]*$/,\n      mentionDenotationChars: [\"@\", \"#\"],\n      source: function (searchTerm, renderList, mentionChar) {\n        let values;\n\n        if (mentionChar === \"@\") {\n          values = atValues;\n        } else {\n          values = hashValues;\n        }\n\n        if (searchTerm.length === 0) {\n          renderList(values, searchTerm);\n        } else {\n          const matches = [];\n          for (let i = 0; i < values.length; i++)\n            if (\n              ~values[i].value.toLowerCase().indexOf(searchTerm.toLowerCase())\n            )\n              matches.push(values[i]);\n          renderList(matches, searchTerm);\n        }\n      },\n    },\n  },\n});\n```\n\n### Hover and Click Example\n\n```javascript\nwindow.addEventListener(\n  \"mention-hovered\",\n  (event) => {\n    console.log(\"hovered: \", event);\n  },\n  false\n);\nwindow.addEventListener(\n  \"mention-clicked\",\n  (event) => {\n    console.log(\"hovered: \", event);\n  },\n  false\n);\n```\n\n### Async example\n\n```javascript\nasync function suggestPeople(searchTerm) {\n  const allPeople = [\n    {\n      id: 1,\n      value: \"Fredrik Sundqvist\",\n    },\n    {\n      id: 2,\n      value: \"Patrik Sjölin\",\n    },\n  ];\n  return allPeople.filter((person) => person.value.includes(searchTerm));\n}\n\nconst quill = new Quill(\"#editor\", {\n  modules: {\n    mention: {\n      allowedChars: /^[A-Za-z\\sÅÄÖåäö]*$/,\n      mentionDenotationChars: [\"@\", \"#\"],\n      source: async function (searchTerm, renderList) {\n        const matchedPeople = await suggestPeople(searchTerm);\n        renderList(matchedPeople);\n      },\n    },\n  },\n});\n```\n\n**Note**: if you whitelist quill formats via [\"formats\" option](https://quilljs.com/docs/configuration/#formats),\nyou need to add the mention format (default: \"mention\") there. Another way quill-mention won't work.\nHere's an example with whitelisted formats:\n\n```javascript\nconst quill = new Quill(\"#editor\", {\n  formats: [\"bold\", \"italic\", \"mention\"],\n  // note \"mention\" format above\n  modules: {\n    mention: {\n      allowedChars: /^[A-Za-z\\sÅÄÖåäö]*$/,\n      mentionDenotationChars: [\"@\", \"#\"],\n      source: function (searchTerm, renderList, mentionChar) {\n        // some source implementation\n      },\n    },\n  },\n});\n```\n\n### Settings\n\n| Property                                      | Default                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| --------------------------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |\n| `source(searchTerm, renderList, mentionChar)` | `null`                                                           | Required callback function to handle the search term and connect it to a data source for matches. The data source can be a local source or an AJAX request. The callback should call `renderList(matches, searchTerm);` with matches of JSON Objects in an array to show the result for the user. The JSON Objects should have `id` and `value` but can also have other values to be used in `renderItem` for custom display.                                                       |\n| `renderItem(item, searchTerm)`                | `function`                                                       | A function that gives you control over how matches from source are displayed. You can use this function to highlight the search term or change the design with custom HTML.                                                                                                                                                                                                                                                                                                         |\n| `allowedChars`                                | `[a-zA-Z0-9_]` (or `function`)                                   | Allowed characters in search term triggering a search request using regular expressions. Can be a function that takes the denotationChar and returns a regex.                                                                                                                                                                                                                                                                                                                       |\n| `minChars`                                    | `0`                                                              | Minimum number of characters after the @ symbol triggering a search request                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `maxChars`                                    | `31`                                                             | Maximum number of characters after the @ symbol triggering a search request                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `offsetTop`                                   | `2`                                                              | Additional top offset of the mention container position                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| `offsetLeft`                                  | `0`                                                              | Additional left offset of the mention container position                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| `mentionDenotationChars`                      | `[\"@\"]`                                                          | Specifies which characters will cause the mention autocomplete to open                                                                                                                                                                                                                                                                                                                                                                                                              |\n| `isolateCharacter`                            | `false`                                                          | Whether or not the denotation character(s) should be isolated. For example, to avoid mentioning in an email.                                                                                                                                                                                                                                                                                                                                                                        |\n| `fixMentionsToQuill`                          | `false`                                                          | When set to true, the mentions menu will be rendered above or below the quill container. Otherwise, the mentions menu will track the denotation character(s);                                                                                                                                                                                                                                                                                                                       |\n| `showDenotationChar`                          | `true`                                                           | Whether to show the used denotation character in the mention item or not                                                                                                                                                                                                                                                                                                                                                                                                            |\n| `defaultMenuOrientation`                      | `'bottom'`                                                       | Options are `'bottom'` and `'top'`. Determines what the default orientation of the menu will be. Quill-mention will attempt to render the menu either above or below the editor. If `'top'` is provided as a value, and there is not enough space above the editor, the menu will be rendered below. Vice versa, if there is not enough space below the editor, and `'bottom'` is provided as a value (or no value is provided at all), the menu will be rendered above the editor. |\n| `blotName`                                    | `'mention'`                                                      | The name of the [Quill Blot](https://github.com/quilljs/parchment#blots) to be used for inserted mentions. A default implementation is provided named 'mention', which may be overidden with a custom blot.                                                                                                                                                                                                                                                                         |\n| `dataAttributes`                              | `['id', 'value', 'denotationChar', 'link', 'target','disabled']` | A list of data values you wish to be passed from your list data to the html node. (`id, value, denotationChar, link, target` are included by default).                                                                                                                                                                                                                                                                                                                              |\n| `onOpen`                                      | `function`                                                       | Callback when mention dropdown is open.                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| `onBeforeClose`                               | `function`                                                       | Callback before the DOM of mention dropdown is removed.                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| `onClose`                                     | `function`                                                       | Callback when mention dropdown is closed.                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| `onSelect(item, insertItem)`                  | `function`                                                       | Callback for a selected item. When overriding this method, `insertItem` should be used to insert `item` to the editor. This makes async requests possible.                                                                                                                                                                                                                                                                                                                          |\n| `linkTarget`                                  | `'_blank'`                                                       | Link target for mentions with a link                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| `listItemClass`                               | `'ql-mention-list-item'`                                         | Style class to be used for list items (may be null)                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| `mentionContainerClass`                       | `'ql-mention-list-container'`                                    | Style class to be used for the mention list container (may be null)                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| `mentionListClass`                            | `'ql-mention-list'`                                              | Style class to be used for the mention list (may be null)                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| `spaceAfterInsert`                            | `true`                                                           | Whether or not insert 1 space after mention block in text                                                                                                                                                                                                                                                                                                                                                                                                                           |\n| `positioningStrategy`                         | `'absolute'`                                                     | Options are `'normal'` and `'fixed'`. When `'fixed'`, the menu will be appended to the body and use fixed positioning. Use this if the menu is clipped by a parent element that's using `overflow:hidden                                                                                                                                                                                                                                                                            | scroll`. |\n| `renderLoading`                               | `function`                                                       | A function that returns the HTML for a loading message during async calls from `source`. The default functions returns `null` to prevent a loading message.                                                                                                                                                                                                                                                                                                                         |\n| `selectKeys`                                  | `[13]`                                                           | An array of keyboard key codes that will trigger the select action for the mention dropdown. Default is ENTER key. See [this reference](http://gcctech.org/csc/javascript/javascript_keycodes.htm) for a list of numbers for each keyboard key.                                                                                                                                                                                                                                     |\n\n### Methods\n\nYou may retrieve the module from Quill like `quill.getModule('mention')` then call one of the imperative methdos below.\n\n| Method                                 | Example                                          | Description                                                 |\n| -------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------- |\n| `insertItem(data, programmaticInsert)` | `insertItem({id:'123',value:'My Mention'},true)` | Inserts the given mention into the editor.                  |\n| `openMenu(denotationChar)`             | `openMenu('@')`                                  | Opens the mentions menu for the given denotation character. |\n\n### Styling\n\nTo allow styling based on the menu orientation, a class is added depending on the orientation and the `mentionContainerClass` option. By default this will be `ql-mention-list-container-bottom` or `ql-mention-list-container-top`.\n\n### Headers and Informational Items\n\nSometimes you may want to display a menu item that should not be selectable. These items may be group headers, hint text, or even a message saying there were no matching results. To show items like these, add `disabled:true` to items passed to `renderList` from your `source` method. Disabled items are shown but not selectable with the mouse or keyboard. If you need to style the disabled items differently, you will need to override the `renderItem` method.\n\n## Authors\n\n**Fredrik Sundqvist** ([MadSpindel](https://github.com/MadSpindel))\n\nSee also the list of [contributors](https://github.com/quill-mention/quill-mention/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","readmeFilename":"README.md"}