chore: migrate to new versions of prosemirror packages (#2854)
* refactor: upgrade prosemirror packages to new typescript versions * refactor: migrate to new typings from prosemirror * style: fix linting issues * style: fix linting issues * style: fix linting issues * fix(ci): fix build process by reimplement filterTransaction * fix(extension-test): fix broken build because of wrong output file names * fix: fix prosemirror-tables not being bundled correctly for ES6 * fix: move to prosemirror-tables-contently until es6 build is working * fix: fix tests for youtube * fix: fix youtube test * fix(demos): fix demos build
This commit is contained in:
@@ -74,7 +74,7 @@ export function Suggestion<I = any>({
|
||||
let props: SuggestionProps<I> | undefined
|
||||
const renderer = render?.()
|
||||
|
||||
return new Plugin({
|
||||
const plugin: Plugin<any> = new Plugin({
|
||||
key: pluginKey,
|
||||
|
||||
view() {
|
||||
@@ -241,7 +241,7 @@ export function Suggestion<I = any>({
|
||||
props: {
|
||||
// Call the keydown hook if suggestion is active.
|
||||
handleKeyDown(view, event) {
|
||||
const { active, range } = this.getState(view.state)
|
||||
const { active, range } = plugin.getState(view.state)
|
||||
|
||||
if (!active) {
|
||||
return false
|
||||
@@ -252,7 +252,7 @@ export function Suggestion<I = any>({
|
||||
|
||||
// Setup decorator on the currently active suggestion.
|
||||
decorations(state) {
|
||||
const { active, range, decorationId } = this.getState(state)
|
||||
const { active, range, decorationId } = plugin.getState(state)
|
||||
|
||||
if (!active) {
|
||||
return null
|
||||
@@ -268,4 +268,6 @@ export function Suggestion<I = any>({
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
return plugin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user