diff --git a/main.ts b/main.ts index 44161a6..aeda32b 100644 --- a/main.ts +++ b/main.ts @@ -104,7 +104,7 @@ class ImageSelectorModal extends Modal { const imgElement = imageDiv.createEl("img"); imgElement.src = thumbUrl; imgElement.width = (totalWidth / 2) - 1; - imgElement.onclick = () => this.editor.replaceRange(insertionText, this.editor.getCursor()); + imgElement.onclick = () => this.editor.replaceSelection(insertionText); } }, {threshold: [0.1]}); diff --git a/manifest.json b/manifest.json index db92c29..c0732bc 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-immich", "name": "Immich", - "version": "0.0.1", + "version": "0.0.2", "minAppVersion": "0.15.0", "description": "Link your Immich images within Obsidian.", "author": "Talal Abou Haiba",