Skip to content

Commit

Permalink
Avoid loading the image before the node view
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
Signed-off-by: Max <[email protected]>
  • Loading branch information
juliusknorr authored and max-nextcloud committed Aug 21, 2023
1 parent 00a4456 commit 85f11c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nodes/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export default class Image extends TiptapImage {
return {
...super.schema,
selectable: false,
// Avoid the prosemirror node creation to trigger image loading as we use a custom node view anyways
// Otherwise it would attempt to load the image from the current location before the node view is even initialized
toDOM: () => ['img'],
}
}

Expand Down

0 comments on commit 85f11c4

Please sign in to comment.