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

@@ -198,7 +198,7 @@ export class Editor extends EventEmitter<EditorEvents> {
*/
public registerPlugin(plugin: Plugin, handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[]): void {
const plugins = isFunction(handlePlugins)
? handlePlugins(plugin, this.state.plugins)
? handlePlugins(plugin, [...this.state.plugins])
: [...this.state.plugins, plugin]
const state = this.state.reconfigure({ plugins })
@@ -271,7 +271,7 @@ export class Editor extends EventEmitter<EditorEvents> {
dispatchTransaction: this.dispatchTransaction.bind(this),
state: EditorState.create({
doc,
selection,
selection: selection || undefined,
}),
})