Comments (6)
It looks like my problem was due to using the Formats Whitelist with react-quill, I added mention to this list. The solution was given in issue #78
Editor.formats = [
'header', 'font', 'size',
'bold', 'italic', 'underline', 'strike', 'blockquote',
'list', 'bullet', 'indent',
'link', 'image', 'video', 'mention'
]
from quill-mention.
I'm now having this issue, nad have added mention to the formats list:
<ReactQuill
theme="snow"
value={quillValue.text}
onChange={(e) => setQuillValue({ text: e })}
modules={{ mention: mentionModule }}
formats={[
'header',
'font',
'size',
'bold',
'italic',
'underline',
'strike',
'blockquote',
'list',
'bullet',
'indent',
'link',
'image',
'video',
'mention',
]}
/>
And here is my current mentionModule:
const mentionModule = {
allowedChars: /^[A-Za-z\s]*$/,
mentionDenotationChars: ['@'],
source: (searchTerm: string, renderList: (data: any, searchText: string) => void) => {
const mentionsToList = atValues.filter(
(av) => av.value.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1
);
if (mentionsToList.length > 0) {
renderList(mentionsToList, searchTerm);
}
},
};
Was kind of a pain getting it to work typescript but I got there.
Anyone have any suggestions?
from quill-mention.
I have the same issue using quill-mention with VueJS using the sample config from the readme: https://gist.github.com/nemmons/a18674264984c07afed8d1430fcb0c60
from quill-mention.
same here
from quill-mention.
How are you defining the modules in react-quill?
from quill-mention.
I probably should have attached the file to begin with.
Editor.txt
from quill-mention.
Related Issues (20)
- HTML Special Character Escape
- Making an AJAX request in the source callback
- Positioning strategy: fixed, Mention list remains open on clicking on scrollbar HOT 1
- Mention item list shows up as html on UI HOT 1
- Inserting an a mention with insertItem adds an "undefined" before the denotation char HOT 2
- Fixed Quill v2.0.0-dev.4 implementation HOT 5
- Getting error when code is deployed in Dev environment - [Parchment] Unable to create mention blot HOT 1
- Typescript declaration error while importing quill-mention HOT 1
- Links do not work anymore HOT 1
- window.addEventListener("mention-clicked"... not triggering HOT 2
- Release notes / changes HOT 3
- Quill-mention does not consider the searchterm which contains the mentiondenotationchar as a single term.
- Denotation char span in blot is being flattened by setting innerText HOT 1
- How to solve the problem of not supporting Chinese search?
- renderItem and styled pop-up in Angular 14 HOT 1
- quill-mention should support Quill Version 2.0.0-rc.0 HOT 2
- Quill 2 Support HOT 1
- quill Cannot import modules/mention. Are you sure it was registered? HOT 1
- mentionDenotationChars if it is a special symbol regular match is not correct
- what is the problem with my code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quill-mention.