Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Quill-mention does not insert the selected mention in quill content

$
0
0

I am using QuillJs as an input field and quill-mention does not insert the selected mention in quill content.

  quillEditor = new Quill(editor, {  formats: ['mention'],  modules: {    mention: {      allowedChars: /^[A-Za-z\sÅÄÖåäö]*$/,      mentionDenotationChars: ['#'],      source: function (searchTerm, renderList, mentionChar) {        let values        if (mentionChar === '#') {          values = tags.map((i) => {            return { value: i.name, id: i.name }          })        }        if (searchTerm.length === 0) {          renderList(values, searchTerm)        } else {          const matches = []          for (let i = 0; i < values.length; i++)            if (~values[i].value.toLowerCase().indexOf(searchTerm.toLowerCase())) matches.push(values[i])          renderList(matches, searchTerm)        }      },    },  },

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>