npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quill-mentions

v0.2.4

Published

a module for integrating at-style mentions into quill.js

Downloads

432

Readme

:construction: quill-mentions

Under construction

An at-style mentions module for quilljs.

Get it.

You can get quill-mentions through npm

$ npm install quill-modules

Or you can just take the files from the dist folder. That works too.

Use it.

quill-mentions exposes a single global variable, QuillMentions.

To include mentions in your Quill project, simply add the stylesheet and all the Javascripts to your page.

Pass the global QuillMentions contsructor to Quill's registerModule function, and add mentions to your module config when you instantiate your editor(s).

<head>
  ...
  <link rel="stylesheet" href="/path/to/quill-mentions.css">
  ...
</head>
<body>
  ...
  <script src="/path/to/quill.min.js"></script>
  <script src="/path/to/quill-mentions.min.js"></script>
  <script>
    Quill.registerModule("mentions", QuillMentions);
    var editor = new Quill('#editor-container', {
      modules: {
        'mentions': { /* add your configuration here */ },
      }
    });
  </script>

</body>

Docs

The docs are not as exhaustive as they should be, but they live (nonetheless) in the docs folder.

:warning: If you build the docs, be warned that your build will fail if the full path to your clone/fork of the repo includes any folders with an underscore. See the issue and fix here.

Style Dependencies...

Not Yet Written

v-3 goals

  • ~~inject choices (as array)~~
  • ~~parse contents~~
  • ~~use @ to summon popover with possible choices matched to text~~
  • ~~vertically align popover to position of calling @~~

v-2 goals

  • ~~Customizable no-match-found messages~~ TODO - figre out how to configure so there's no message. Was running into issues trying this out.
  • ~~Keyboard events for up and down arrows~~ Also for escape and enter!
  • ~~Insert data with mention into markup (this might require deviating from custom quill format because custom formats are too nascent :confused:)~~ Currently, the data-mention attribute from a matching li is appended to the class of a mention span. This is hacky, but it avoids having to manually insert HTML...
  • Horizontally align the popover

V-1 goals

  • ~~Refactor with MVC~~
  • Break out defaultFactory (the main default object has toooo much :shit: on it.)
  • Horizontally align the popover
  • Refactor styles to not rely on dom elements

V-0 goals

  • More flexible templates, allow custom value accessor functions
  • Allow config to turn of quill custom format
  • Customizable hotkeys

TODO

  • Determine horizontal rendering of mentions container.
  • Find alternative to current use of transform: translateZ on the popover list items...
  • ~~Write more robust regex for parsing names (separate for work)~~
  • ~~Hide view after insert~~
  • ~~Add keyboard events for up and down arrows~~
  • ~~Don't allow 'womp womp' message to be clicked~~
  • ~~Render ql-mentions container in a more logical position~~