This PR adds support for including/excluding specific items from team filtering. Users can use the filter modal to only show teams that include specific items, only show teams that _don't_ include specific items, or combine the two to create a very powerful filter.
26 lines
664 B
TypeScript
26 lines
664 B
TypeScript
import { Extension } from '@tiptap/core'
|
|
import { Plugin, PluginKey } from 'prosemirror-state'
|
|
|
|
const NoNewLine = Extension.create({
|
|
name: 'no_new_line',
|
|
|
|
addProseMirrorPlugins() {
|
|
return [
|
|
new Plugin({
|
|
key: new PluginKey('eventHandler'),
|
|
props: {
|
|
handleKeyDown: (view, event) => {
|
|
if (event.key === 'Enter' && !event.shiftKey) {
|
|
console.log('enter pressed')
|
|
return true
|
|
}
|
|
},
|
|
// … and many, many more.
|
|
// Here is the full list: https://prosemirror.net/docs/ref/#view.EditorProps
|
|
},
|
|
}),
|
|
]
|
|
},
|
|
})
|
|
|
|
export default NoNewLine
|