Josh Lind

Results 80 comments of Josh Lind
trafficstars

### SOLVED Turns out the magic 🪄 is using `_rawDataCategories` rather than `categories` in the source object!

Same. This plugin is consistently broken on the first click everywhere I've used it.

Partial workaround... _Still creates DOM and uses named classes._ ```jsx const SuggestionList = ({ items }) => ( {items && items.map(i => {i.name} )} ) const getSuggestionsHTML = (items, type)...

Thanks. Looks like there's a complication with the state property to check. It's attached to the editor state with an ID number appended, example... `state.autosuggestions$50` or `state.autosuggestions$51` You end up...

I was adding this to my ProseMirror instance, rather than editing the plugin. Where does `handleDOMEvents` go inside the plugin?

Here's the working code in my fork. https://github.com/themaven-net/prosemirror-mentions/pull/2/files

I have a PR ready for this repo if you grant permissions :)

It should have been using the local copy of rollup declared in `prosemirror-mentions/package.json` which is 0.50.1. I was able to use the workaround, but it seems like the main build...

Workarounds... `/src/@types/prosemirror-mentions/index.d.ts` ```ts /// declare module 'prosemirror-mentions' { import { getMentionsPlugin, addMentionNodes, addTagNodes, tagNode, mentionNode } from 'prosemirror-mentions' export const getMentionsPlugin export const addMentionNodes export const addTagNodes export const tagNode...

Instead of the above workaround, I recommend looking at **this TypeScript fork for now...** https://github.com/themaven-net/prosemirror-mentions