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:
Dominik
2022-06-20 11:45:37 +02:00
committed by GitHub
parent 2fa2c22e6f
commit 1ebc8f8e14
56 changed files with 2440 additions and 6727 deletions

View File

@@ -27,13 +27,14 @@
"dependencies": {
"@tiptap/extension-code-block": "^2.0.0-beta.40",
"@types/lowlight": "^0.0.3",
"prosemirror-model": "^1.16.1",
"prosemirror-state": "^1.3.4",
"prosemirror-view": "^1.23.6"
"lowlight": "^1.20.0",
"prosemirror-model": "^1.17.0",
"prosemirror-state": "^1.4.0",
"prosemirror-view": "^1.25.0"
},
"repository": {
"type": "git",
"url": "https://github.com/ueberdosis/tiptap",
"directory": "packages/extension-code-block-lowlight"
}
}
}

View File

@@ -74,7 +74,7 @@ export function LowlightPlugin({ name, lowlight, defaultLanguage }: { name: stri
throw Error('You should provide an instance of lowlight to use the code-block-lowlight extension')
}
return new Plugin({
const lowlightPlugin: Plugin<any> = new Plugin({
key: new PluginKey('lowlight'),
state: {
@@ -129,8 +129,10 @@ export function LowlightPlugin({ name, lowlight, defaultLanguage }: { name: stri
props: {
decorations(state) {
return this.getState(state)
return lowlightPlugin.getState(state)
},
},
})
return lowlightPlugin
}