Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-06-09 12:29:14 +0300
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-06-30 17:56:17 +0300
commit0752577c5e8b8b05f6c7d51452a76cdc3fdc5bd1 (patch)
tree1b7bfca2842196944692f17248b71db8de2e1187 /src
parent6301ad5438a98330d7882d03901a17237861edea (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.js6
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?.(),