Giter Site home page Giter Site logo

Comments (6)

crazypenguinguy avatar crazypenguinguy commented on May 24, 2024 5

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.

just-Bri avatar just-Bri commented on May 24, 2024 1

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.

nemmons avatar nemmons commented on May 24, 2024

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.

xrado avatar xrado commented on May 24, 2024

same here

from quill-mention.

MadSpindel avatar MadSpindel commented on May 24, 2024

How are you defining the modules in react-quill?

from quill-mention.

crazypenguinguy avatar crazypenguinguy commented on May 24, 2024

I probably should have attached the file to begin with.
Editor.txt

from quill-mention.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.