Brian Hung
Brian Hung
> this literal example of a word count plugin is actually quite well suited to living entirely in React state The implementation of the word count plugin I had was...
Updated the PR to just use `useEditorState`. Note that it would be a breaking change for consumers of this library.
> add transaction middleware You could do this by having a trUpdate plugin that just emits the tr on state.apply. > can't just do it all in the React component...
> How bad is it now if you have to both add the plugin and the component separately? Right now, it means for every different editor surface, they can’t share...
Thought of another example today: https://github.com/ProseMirror/prosemirror-search/blob/main/src/search.ts ```tsx ```
Think we could do both? Worked on a diff / changes view plugin where I had ProseMirror state for tracking changes, and then had to make my own React decorations...
LMK if I can assist with a PR review 😎
I would just create a hook like `useColumnSort` that maps `allRows` => `visibleRows`. Probably pass back `rows` and `getCellContent` appropriately. This can be handled outside of data grid editor already.
Might update PR to show grid lines in between singleton column selections, as opposed to continuous column ranges.