diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-06-09 12:29:14 +0300 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2022-06-30 17:56:17 +0300 |
commit | 0752577c5e8b8b05f6c7d51452a76cdc3fdc5bd1 (patch) | |
tree | 1b7bfca2842196944692f17248b71db8de2e1187 /src | |
parent | 6301ad5438a98330d7882d03901a17237861edea (diff) |
Avoid loading the image before the node view
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/nodes/Image.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nodes/Image.js b/src/nodes/Image.js index 78470f670..14410189a 100644 --- a/src/nodes/Image.js +++ b/src/nodes/Image.js @@ -29,6 +29,12 @@ const Image = TiptapImage.extend({ selectable: false, + renderHTML() { + // 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 + return ['img'] + }, + addOptions() { return { ...this.parent?.(), |