@tiptap/core 3.0.0-beta.3 → 3.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/core",
3
3
  "description": "headless rich text editor",
4
- "version": "3.0.0-beta.3",
4
+ "version": "3.0.0-beta.5",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -51,10 +51,10 @@
51
51
  "jsx-runtime"
52
52
  ],
53
53
  "devDependencies": {
54
- "@tiptap/pm": "3.0.0-beta.3"
54
+ "@tiptap/pm": "3.0.0-beta.5"
55
55
  },
56
56
  "peerDependencies": {
57
- "@tiptap/pm": "3.0.0-beta.3"
57
+ "@tiptap/pm": "3.0.0-beta.5"
58
58
  },
59
59
  "repository": {
60
60
  "type": "git",
package/src/Editor.ts CHANGED
@@ -287,6 +287,7 @@ export class Editor extends EventEmitter<EditorEvents> {
287
287
  composing: false,
288
288
  dragging: null,
289
289
  editable: true,
290
+ isDestroyed: false,
290
291
  } as EditorView,
291
292
  {
292
293
  get: (obj, key) => {
@@ -361,7 +362,7 @@ export class Editor extends EventEmitter<EditorEvents> {
361
362
  const name = typeof nameOrPluginKey === 'string' ? `${nameOrPluginKey}$` : nameOrPluginKey.key
362
363
 
363
364
  // @ts-ignore
364
- plugins = prevPlugins.filter(plugin => !plugin.key.startsWith(name))
365
+ plugins = plugins.filter(plugin => !plugin.key.startsWith(name))
365
366
  })
366
367
 
367
368
  if (prevPlugins.length === plugins.length) {
@@ -717,8 +718,7 @@ export class Editor extends EventEmitter<EditorEvents> {
717
718
  * Check if the editor is already destroyed.
718
719
  */
719
720
  public get isDestroyed(): boolean {
720
- // @ts-ignore
721
- return !this.view?.docView
721
+ return this.editorView?.isDestroyed ?? true
722
722
  }
723
723
 
724
724
  public $node(selector: string, attributes?: { [key: string]: any }): NodePos | null {